bug-auctex
[Top][All Lists]
Advanced

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

bug#51762: 13.0.14; environment formating


From: Arash Esbati
Subject: bug#51762: 13.0.14; environment formating
Date: Sat, 13 Nov 2021 17:04:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50

Hi Keita,

Ikumi Keita <ikumi@ikumi.que.jp> writes:

>>>>>> Ikumi Keita <ikumi@ikumi.que.jp> writes:
>> I think the attached patch fixes the problem. Could you test whether it
>> works on your side?
>
> Hmm, the patch also fails to identify the following form of code
> comment:
>  \\% This is a code comment.
> That is, a line beginning with 0 or more whitespaces, followed by even
> number of back slashes, followed by percent sign(s) and comment body.

Thank you for looking into this.  The way I understand this regexp:

  "\\([^ \r\n%\\]\\|\\\\%\\)\\([ \t]\\|\\\\\\\\\\)*"
                    ^^^^^^^

is there to exclude the control symbol \%, i.e., being parsed as comment
start.  Would it help if we generlize the control symbol idea by saying:

  "\\([^ \r\n%\\]\\|\\\\[^a-zA-Z0-9\\]\\)\\([ \t]\\|\\\\\\\\\\)*"
                        ^^^^^^^^^^^^^^

> Maybe we should give up regexp-based approach to find out code comments
> accurately.

Are you thinking about `syntax-ppss'?

Best, Arash





reply via email to

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