unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: haj@posteo.de (Harald Jörg)
Cc: 26850@debbugs.gnu.org
Subject: bug#26850: perl-mode and cperl-mode: Recognize regex after "return"
Date: Tue, 17 Nov 2020 00:24:42 +0100	[thread overview]
Message-ID: <87lff0sx51.fsf@gnus.org> (raw)
In-Reply-To: <87k0ulne6b.fsf@hajtower> ("Harald Jörg"'s message of "Mon, 16 Nov 2020 23:13:16 +0100")

haj@posteo.de (Harald Jörg) writes:

> I don't know whether I have the authority to merge bugs, but they
> clearly are the same issue, so I'll just give it a try.

Oh, sure, I think everybody can.  Hm...  but it doesn't seem to have
gone through in this case?  When the statuses of the bugs involved
aren't the same, you have to use "forcemerge" to make it actually
happened; I did that now.

> There are several workarounds: You could, for example, explicitly write
> the regexes as $_ =~ /.../; ... but of course, why would you do that,
> since $_ is superfluous.  Alternatively, you could just omit the
> "return", which is also superfluous in the examples provided.
>
> Nevertheless, the patch fixes the issue, which happens in both perl-mode
> and cperl-mode.  I guess that in neither mode the list of keywords which
> precede a regex is actually complete, but "return" is a use case
> relevant enough to be fixed.

Thanks for the patch; applied to Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





      reply	other threads:[~2020-11-16 23:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-08 22:50 bug#26850: perl-mode: apostrophes trigger color change in wrong situation 積丹尼 Dan Jacobson
2020-11-16 22:13 ` bug#26850: perl-mode and cperl-mode: Recognize regex after "return" Harald Jörg
2020-11-16 23:24   ` Lars Ingebrigtsen [this message]

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=87lff0sx51.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=26850@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).