From: Roland Winkler Date: Thu, 29 Dec 2005 17:10:53 +0000 (+0000) Subject: (bibtex-text-in-field-bounds): Handle case that assoc-string returns X-Git-Tag: emacs-pretest-22.0.90~4997 X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/e8606202de5c495fd51c03cd5f1fac4a588146b5 (bibtex-text-in-field-bounds): Handle case that assoc-string returns nil. --- diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index a98fc2ddee..fd84d749b8 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