Function: reftex-get-bibkey-default

reftex-get-bibkey-default is a byte-compiled function defined in reftex-cite.el.gz.

Signature

(reftex-get-bibkey-default)

Documentation

Return the word before the cursor.

If the cursor is in a citation macro, return the word before the macro.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/reftex-cite.el.gz
(defun reftex-get-bibkey-default ()
  "Return the word before the cursor.
If the cursor is in a citation macro, return the word before the macro."
  (let* ((macro (reftex-what-macro 1)))
    (save-excursion
      (if (and macro (string-match "cite" (car macro)))
          (goto-char (cdr macro)))
      (skip-chars-backward "^a-zA-Z0-9")
      (reftex-this-word))))