From e8606202de5c495fd51c03cd5f1fac4a588146b5 Mon Sep 17 00:00:00 2001 From: Roland Winkler Date: Thu, 29 Dec 2005 17:10:53 +0000 Subject: [PATCH] (bibtex-text-in-field-bounds): Handle case that assoc-string returns nil. --- lisp/textmodes/bibtex.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index a98fc2ddee1..fd84d749b86 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1415,9 +1415,9 @@ If `bibtex-expand-strings' is non-nil, also expand BibTeX strings." (while (< (setq opoint (point)) epoint) (if (looking-at bibtex-field-const) (let ((mtch (match-string-no-properties 0))) - (push (if bibtex-expand-strings - (cdr (assoc-string mtch (bibtex-strings) t)) - mtch) content) + (push (or (if bibtex-expand-strings + (cdr (assoc-string mtch (bibtex-strings) t))) + mtch) content) (goto-char (match-end 0))) (let ((bounds (bibtex-parse-field-string))) (push (buffer-substring-no-properties -- 2.39.5