GNU bug report logs - #48365
13.0.11; Dollars in distinct comments trigger math mode highlighting in text in-between

Previous Next

Package: auctex;

Reported by: jfbu <jfbu <at> free.fr>

Date: Tue, 11 May 2021 19:18:01 UTC

Severity: normal

Found in version 13.0.11

Done: Ikumi Keita <ikumi <at> ikumi.que.jp>

Bug is archived. No further changes may be made.

Full log


Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tassilo Horn <tsdh <at> gnu.org>
To: jfbu <jfbu <at> free.fr>
Cc: bug-auctex <at> gnu.org, 48365 <at> debbugs.gnu.org
Subject: Re: bug#48365: 13.0.11; Dollars in distinct comments trigger math
 mode highlighting in text in-between
Date: Tue, 11 May 2021 22:33:04 +0200
> Sadly, I now have another problem. Consider this:
>
> \def\XINT:NE:f:noeval:from:braced:u:p #1#2%
>     {\detokenize{\romannumeral`$XINT_expr_null\expandafter#1}~expanded{{#2}}}%
>
> There is $ in there, and it triggers math mode highlighting which is a
> priori fine, I can live with that *if I can constrain it to not extend
> beyond that line*
>
> In the past I would control it this way:
>
> \def\XINT:NE:f:noeval:from:braced:u:p #1#2%
>     {\detokenize{\romannumeral`$XINT_expr_null\expandafter#1}~expanded{{#2}}}%$
>
> (observe the added $ at end of second line after the % comment character)
>
> With your patch the %$ does not stop the math highlighting !

Now that you've mentioned it, I remember I wanted to do that change also
in the past and Keita-san stopped me from doing so for exactly this
reason.

I've pushed another commit which ignores $ in comments with the single
exception of the "% $ \n" workaround, i.e., a comment with just a $,
arbitrary spaces/tabs before or after the $, and then the end of the
line.

I'm not sure what is worse.  The restriction to have at least balanced $
also in comments, or the now very restrictive workaround form.  We'll
see if someone complains because that breaks his

  % Workaround fix $.

comment fixes.

Bye,
Tassilo




This bug report was last modified 4 years and 73 days ago.

Previous Next


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