Tassilo Horn <[email protected]> writes:

>>> The backtrace is helpful but having your test file as well would be
>>> perfect.  Could you please send (maybe gzipped)?
>>
>> Sure, here it is (if attachment are allowed).
>
> Thanks, but I can't reproduce the error.  I can open your test file
> without issues both with the current auctex master and emacs master as
> well as with auctex 13.0.3 and emacs 27.1.
>
> Given that there is just one `looking-at' funcall in
> `TeX-auto-parse-region', we should be able to debug it anyway.  Could
> you please apply the attached patch to tex.el, restart emacs, and open
> the test file again?  I should log lines like
>
> --8<---------------cut here---------------start------------->8---
> entry: ("\\\\declaretheorem[
> \11\n\15%]*\\(?:\\[[^][]*\\(?:{[^}{]*\\(?..." 1
> LaTeX-auto-thmtools-declaretheorem)
> --8<---------------cut here---------------end--------------->8---
>
> into *Messages*, the last one being logged before you get the error is
> the culprit.  Then we have to find out where this entry comes from.

Of course, I forgot to attach the patch (as I always do).  Here it is.
diff --git a/tex.el b/tex.el
index 915702f4..a73c9ed6 100644
--- a/tex.el
+++ b/tex.el
@@ -4253,6 +4253,7 @@ you should not use something like `[\\(]' for a character range."
                  (symbol (nth 2 entry))
                  (match (nth 1 entry)))
             (unless (TeX-in-comment)
+              (message "entry: %S" entry)
               (looking-at (nth 0 entry))
               (if (fboundp symbol)
                   (funcall symbol match)
Bye,
Tassilo

Reply via email to