Backport regexp stack overflow fix from emacs-24.

* textmodes/reftex-parse.el (reftex-using-biblatex-p): Make search
for comment lines non-greedy and stopping at newlines to fix stack
overflows with large files. [Backport]

Signed-off-by: Tassilo Horn <tsdh@gnu.org>
This commit is contained in:
Leonard Randall 2014-11-27 09:38:21 +01:00 committed by Tassilo Horn
parent 7bf7edf53f
commit b66511f768
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2014-11-27 Leonard Randall <leonard.a.randall@gmail.com>
* textmodes/reftex-parse.el (reftex-using-biblatex-p): Make search
for comment lines non-greedy and stopping at newlines to fix stack
overflows with large files. [Backport]
2014-11-27 Fabián Ezequiel Gallina <fgallina@gnu.org>
* progmodes/python.el (python-shell-completion-setup-code): Use

View file

@ -357,7 +357,7 @@ of master file."
(member "biblatex" TeX-active-styles)
;; poor-man's check...
(save-excursion
(re-search-forward "^[^%]*\\\\usepackage.*{biblatex}" nil t))))
(re-search-forward "^[^%\n]*?\\\\usepackage.*{biblatex}" nil t))))
(defun reftex-locate-bibliography-files (master-dir &optional files)
"Scan buffer for bibliography macros and return file list."