bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#42168: 26.1; cperl-mode: Bad interpretation of $a++ / $b


From: Stefan Kangas
Subject: bug#42168: 26.1; cperl-mode: Bad interpretation of $a++ / $b
Date: Wed, 12 Aug 2020 17:40:19 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Harald Jörg <haj@posteo.de>
>> Date: Thu, 2 Jul 2020 20:19:21 +0200
>>
>> How to reproduce:
>> In a buffer, activate cperl-mode (M-x cperl-mode), then enter:
>>
>> $a++ / $b;
>>
>> This is supposed to be a division.  However, cperl-mode interprets the
>> slash as the start of a regular expression.  Accordingly, the following
>> text is displayed with the wrong face, and also cperl-mode might
>> complain that it can't find the end of the regular expression.
>>
>> Emacs does not crash.
>>
>> Attached: A patch which fixes the issue for $a++ and $a--, and also
>> includes a test to verify that the very similar text "$a+ / $b" is still
>> correctly interpreted as a regular expression.
>
> Thanks.
>
> To accept a substantial contribution such as this one, we will need
> you to assign the copyright of your code to the FSF.  If you are okay
> with starting your legal paperwork, I will send you the form to sign
> and email.
>
> Thank you for your interest in Emacs.

Harald, would you be willing to sign the copyright papers?  Please find
out more about the reason for this here:

    https://www.gnu.org/licenses/why-assign.html

Best regards,
Stefan Kangas





reply via email to

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