]> code.delx.au - gnu-emacs/commitdiff
Backport regexp stack overflow fix from emacs-24.
authorLeonard Randall <leonard.a.randall@gmail.com>
Thu, 27 Nov 2014 08:38:21 +0000 (09:38 +0100)
committerTassilo Horn <tsdh@gnu.org>
Thu, 27 Nov 2014 08:38:21 +0000 (09:38 +0100)
* 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>
lisp/ChangeLog
lisp/textmodes/reftex-parse.el

index af75f8db3682f4b34c8e07ace0465396f9cf44fa..d88ecfeb8a8a8886f1f45c22b251464349637afc 100644 (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
index 71bec89a51dd2a77900539c3e2dad0d83c8f19c7..a5572118fffaeecf17c729259050bfd5fddd6c18 100644 (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."