GNU bug report logs - #78587
[PATCH] TeX-find-macro-end

Previous Next

Package: auctex;

Reported by: "Paul D. Nelson" <ultrono <at> gmail.com>

Date: Sun, 25 May 2025 15:15:02 UTC

Severity: normal

Tags: patch

Done: Arash Esbati <arash <at> gnu.org>

Full log


View this message in rfc822 format

From: Arash Esbati <arash <at> gnu.org>
To: "Paul D. Nelson" <ultrono <at> gmail.com>
Cc: 78587 <at> debbugs.gnu.org
Subject: bug#78587: [PATCH] TeX-find-macro-end
Date: Tue, 27 May 2025 14:32:11 +0200
Hi Paul,

"Paul D. Nelson" <ultrono <at> gmail.com> writes:

> I get the right answer ("]" "]" "]" "]"), but for the wrong reason:
> evaluating
>
> (mapcar
>  (lambda (str)
>    (with-temp-buffer
>      (LaTeX-mode)
>      (insert str)
>      (char-to-string (char-before (1- (TeX-find-macro-end-helper (point-min)))))))
>  '("\begin{enumerate}[a{]}]"))
>
> yields ("{"), which shows that it's picking up the wrong "]".

This is also what I thought, sorry for not being explicit about it in my
last message, was a bit in hurry.

> I guess this case could be covered by adding "{" and "}" to the syntax
> table.  Can you imagine any further issues with that approach?

My answer to that exercise is basically this:

https://cgit.git.savannah.gnu.org/cgit/auctex.git/commit/font-latex.el?id=7de5f1bbdd186bc84a8bd764e843a308f798210f

This was the best I could come up with as I tried to fix this
fontification bug:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57516

I'm not sure if that solution is applicable to the issue at hand.

Best, Arash




This bug report was last modified 15 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.