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

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

bug#26850: perl-mode and cperl-mode: Recognize regex after "return"


From: Lars Ingebrigtsen
Subject: bug#26850: perl-mode and cperl-mode: Recognize regex after "return"
Date: Tue, 17 Nov 2020 00:24:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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 via email to

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