auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX-devel] stack overflow in regexp matcher (reftex-using-biblat


From: Tassilo Horn
Subject: Re: [AUCTeX-devel] stack overflow in regexp matcher (reftex-using-biblatex)
Date: Thu, 27 Nov 2014 13:31:50 +0100
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

Tassilo Horn <address@hidden> writes:

> For the time being, you can put
>
> (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))))
>
> into your ~/.emacs.

Ah, not quite.  You have to ensure that it's evaluated after
reftex-parse has been loaded:

--8<---------------cut here---------------start------------->8---
(with-eval-after-load 'reftex-parse
  (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)))))
--8<---------------cut here---------------end--------------->8---

Bye,
Tassilo

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]