From 5132f910f3426fdb96f1e6e6ec5f8453d6fc5849 Mon Sep 17 00:00:00 2001 From: Leonard Randall Date: Tue, 24 Jun 2014 21:39:22 +0200 Subject: [PATCH] Make search in reftex-using-biblatex-p non-greedy. * 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. --- lisp/ChangeLog | 6 ++++++ lisp/textmodes/reftex-parse.el | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1ce15a3c8b..6d73731fea 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-06-24 Leonard Randall + + * 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. + 2014-06-24 Eli Barzilay * calculator.el (calculator-last-input): drop 'ascii-character property diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el index 5b0433475b..ce73939ac3 100644 --- a/lisp/textmodes/reftex-parse.el +++ b/lisp/textmodes/reftex-parse.el @@ -363,7 +363,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)))) ;;;###autoload (defun reftex-locate-bibliography-files (master-dir &optional files) -- 2.20.1