X-Git-Url: https://git.shemshak.org/gitweb.cgi/~bandali/configs/blobdiff_plain/057a83828a8bf86b27a70031f41c9a99d333bf56..9a5ffb3364a8d0704cbcd4eb96ce31010fcbe065:/.emacs.d/init.el 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)