From 9b5d3846bb5f6dade16676c0fe9362df956ad634 Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Wed, 22 Apr 2015 09:24:54 +0200 Subject: [PATCH] Fix reftex-citation bug * reftex-cite.el (reftex-extract-bib-entries): Fix `wrong-type-argument stringp nil' error that occurs when AUCTeX integration is enabled and there are no citations in the document so far. --- lisp/textmodes/reftex-cite.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el index fa09efb64a4..b22e8b1dcc0 100644 --- a/lisp/textmodes/reftex-cite.el +++ b/lisp/textmodes/reftex-cite.el @@ -197,7 +197,7 @@ Return list with entries." "[" default "]: ") (if reftex-mode (if (fboundp 'LaTeX-bibitem-list) - (LaTeX-bibitem-list) + (or (LaTeX-bibitem-list) '("")) (cdr (assoc 'bibview-cache (symbol-value reftex-docstruct-symbol)))) nil) @@ -228,11 +228,11 @@ Return list with entries." (message "No such BibTeX file %s (ignored)" buffer) (message "Scanning bibliography database %s" buffer1) (unless (verify-visited-file-modtime buffer1) - (when (y-or-n-p - (format "File %s changed on disk. Reread from disk? " - (file-name-nondirectory - (buffer-file-name buffer1)))) - (with-current-buffer buffer1 (revert-buffer t t))))) + (when (y-or-n-p + (format "File %s changed on disk. Reread from disk? " + (file-name-nondirectory + (buffer-file-name buffer1)))) + (with-current-buffer buffer1 (revert-buffer t t))))) (set-buffer buffer1) (reftex-with-special-syntax-for-bib -- 2.39.5