Hi,
The regexp called in reftex-using-biblatex-p will create a stack overflow
in large files with few or no % marks in the file. This is not usually a
problem with most tex files but it can be a problem if you use reftex with
org-mode or other systems that export latex but do not use %s. This
problem can be solved rather easily by making the search for comment lines
non-greedy, or by making it stop at newlines. The fix below uses both
approaches, as this seems to speed up the search, and avoid stack overflows
in more cases.
Currently the function looks like this
(defun reftex-using-biblatex-p ()
"Return non-nil if we are using biblatex rather than bibtex."
(if (boundp 'TeX-active-styles)
;; the sophisticated AUCTeX way
(member "biblatex" TeX-active-styles)
;; poor-man's check...
(save-excursion
(re-search-forward "^[^%]*\\\\usepackage.*{biblatex}" nil t))))
Proposed fix:
(defun reftex-using-biblatex-p ()
"Return non-nil if we are using biblatex rather than bibtex."
(if (boundp 'TeX-active-styles)
;; the sophisticated AUCTeX way
(member "biblatex" TeX-active-styles)
;; poor-man's check...
(save-excursion
(re-search-forward "^[^%\n]*?\\\\usepackage.*{biblatex}" nil t))))
(By the way, if it matters I have a FSF copyright assignment for emacs,
under my full name, Leonard Avery Randall)
All best,
Leonard
_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex