[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 9ac8901: Make bibtex-parse-keys more robust
From: |
Lars Ingebrigtsen |
Subject: |
master 9ac8901: Make bibtex-parse-keys more robust |
Date: |
Sun, 17 Nov 2019 03:15:34 -0500 (EST) |
branch: master
commit 9ac8901b0ae5a6bb75c790832caf4ea9be8df16f
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Make bibtex-parse-keys more robust
* lisp/textmodes/bibtex.el (bibtex-parse-keys): Protect against
bugging out just when starting almost-empty bibtex files
(bug#30112).
---
lisp/textmodes/bibtex.el | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index c29e963..2d24178 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -2915,6 +2915,9 @@ for parsing BibTeX keys. If parsing fails, try to set
this variable to nil."
(1+ (match-beginning 3)) (1-
(match-end 3)))))
(unless (assoc key crossref-keys)
(push (list key) crossref-keys))))
+ ;; We have probably have a non-bibtex file.
+ ((not (match-beginning bibtex-type-in-head))
+ (throw 'userkey nil))
;; only keys of known entries
((assoc-string (bibtex-type-in-head)
bibtex-entry-alist t)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 9ac8901: Make bibtex-parse-keys more robust,
Lars Ingebrigtsen <=