From: Eli Zaretskii <eliz@gnu.org>
To: "Harald Jörg" <haj@posteo.de>
Cc: 42168@debbugs.gnu.org
Subject: bug#42168: 26.1; cperl-mode: Bad interpretation of $a++ / $b
Date: Sat, 11 Jul 2020 12:53:49 +0300 [thread overview]
Message-ID: <83v9iunzrm.fsf@gnu.org> (raw)
In-Reply-To: <da546d18-f862-ba5f-aa0d-22e8fa8e9581@posteo.de> (message from Harald Jörg on Thu, 2 Jul 2020 20:19:21 +0200)
> 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.
next prev parent reply other threads:[~2020-07-11 9:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-02 18:19 bug#42168: 26.1; cperl-mode: Bad interpretation of $a++ / $b Harald Jörg
2020-07-11 9:53 ` Eli Zaretskii [this message]
2020-08-13 0:40 ` Stefan Kangas
2020-08-13 7:30 ` Harald Jörg
2020-08-13 7:55 ` Stefan Kangas
2020-08-13 8:17 ` Stefan Kangas
2020-08-13 20:40 ` Harald Jörg
2020-08-14 9:06 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83v9iunzrm.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=42168@debbugs.gnu.org \
--cc=haj@posteo.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).