diff options
author | Amin Bandali <bandali@gnu.org> | 2019-08-26 19:42:37 -0400 |
---|---|---|
committer | Amin Bandali <bandali@gnu.org> | 2019-08-26 19:42:37 -0400 |
commit | 9a5ffb3364a8d0704cbcd4eb96ce31010fcbe065 (patch) | |
tree | 34d60413c7604cda294a9461c378b825635d7851 | |
parent | 057a83828a8bf86b27a70031f41c9a99d333bf56 (diff) | |
download | configs-9a5ffb3364a8d0704cbcd4eb96ce31010fcbe065.tar.gz configs-9a5ffb3364a8d0704cbcd4eb96ce31010fcbe065.tar.xz configs-9a5ffb3364a8d0704cbcd4eb96ce31010fcbe065.zip |
emacs: add reftex
-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) |