diff options
-rw-r--r-- | .emacs.d/init.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index d0d5307..6c17967 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -1564,6 +1564,23 @@ For disabling the behaviour for certain buffers and/or modes." (use-package biblio) +(use-package reftex + :hook (latex-mode . reftex-mode)) + +(use-package reftex-cite + :after reftex + :disabled ; enable to disable + ; reftex-cite's default choice + ; of previous word + :config + (defun reftex-get-bibkey-default () + "If the cursor is in a citation macro, return the word before the macro." + (let* ((macro (reftex-what-macro 1))) + (save-excursion + (when (and macro (string-match "cite" (car macro))) + (goto-char (cdr macro))) + (reftex-this-word))))) + ;;; Email (with Gnus) |