all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: haj@posteo.de (Harald Jörg)
To: 997@debbugs.gnu.org
Subject: bug#997: perl-mode: Merging was not quite correct
Date: Tue, 17 Nov 2020 18:52:00 +0100	[thread overview]
Message-ID: <87tutn98hr.fsf@hajtower> (raw)
In-Reply-To: <871vzhoasd.fsf@jidanni.org>

unmerge 997
reopen 997
thanks

So that's another attempt to exercise my super powers...

It turns out that 997, which had been merged with 26850, is actually a
different issue, and it is not fixed by the recent patch which
successfully dealt with Bug#26850 and Bug#26745 for Perl mode.
CPerl mode handles the examples correctly.

The issues are all related to each other because they all deal with the
difficulties to distinguish between a slash as a division sign and a
slash as a regex introduction.  The apostrophe "'" is a red herring - it
increases the visibility of the bug, but isn't the root cause.

Right now, Perl mode tries to detect regexes based on what's before
them.  Therefore, 26850 could be fixed by adding "return" to the stuff
which can occur before a regex.  However, the examples in this bug
demonstrate regexes with *nothing* before them: Regular expressions can
start a statement just fine, they have a return value and set some
variables as side effects.

Correctly detecting "nothing" in a regex needs some care.  So I'd like
to treat this as a separate bug which remains open for now.
-- 
Cheers,
haj





  parent reply	other threads:[~2020-11-17 17:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-18 13:15 bug#997: perl mode blows "'" etc jidanni
2020-02-29  2:58 ` Stefan Kangas
2020-02-29  3:12   ` 積丹尼 Dan Jacobson
2020-11-17 17:52 ` Harald Jörg [this message]
2020-11-19 16:07   ` bug#997: perl-mode: Merging was not quite correct Noam Postavsky
2020-11-19 17:07 ` bug#997: perl-mode: Un-merging an unrelated bug Harald Jörg
2022-09-19 16:03 ` bug#997: perl-mode: Incorrect syntax highlighting for regex at top-level Mauro Aranda
2022-09-19 18:37   ` Lars Ingebrigtsen

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tutn98hr.fsf@hajtower \
    --to=haj@posteo.de \
    --cc=997@debbugs.gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.