From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#26850: perl-mode and cperl-mode: Recognize regex after "return" Date: Tue, 17 Nov 2020 00:24:42 +0100 Message-ID: <87lff0sx51.fsf@gnus.org> References: <87ziendku7.fsf@jidanni.org> <87k0ulne6b.fsf@hajtower> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16066"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 26850@debbugs.gnu.org To: haj@posteo.de (Harald =?UTF-8?Q?J=C3=B6rg?=) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 17 00:27:05 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kentn-00041x-Tk for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Nov 2020 00:27:03 +0100 Original-Received: from localhost ([::1]:35646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kentm-0007c9-RR for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Nov 2020 18:27:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kenrr-00068u-8y for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2020 18:25:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46198) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kenrq-0005Id-S1 for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2020 18:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kenrq-000387-Gb for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2020 18:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Nov 2020 23:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26850 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 26850-submit@debbugs.gnu.org id=B26850.160556910012019 (code B ref 26850); Mon, 16 Nov 2020 23:25:02 +0000 Original-Received: (at 26850) by debbugs.gnu.org; 16 Nov 2020 23:25:00 +0000 Original-Received: from localhost ([127.0.0.1]:57744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kenrk-00037k-AN for submit@debbugs.gnu.org; Mon, 16 Nov 2020 18:25:00 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:40410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kenri-00037U-1L for 26850@debbugs.gnu.org; Mon, 16 Nov 2020 18:24:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=7GT/l8BIVxY8evudOaxNRlgVL5W9xO3oXN7c2h6LiOA=; b=Df0bIHoddlL3XD98pm+bCTxc+7 LtEShkTNHj0pVRx5eqMYO4FSaF5ivIar0R/hwV9NWGeY9YbbGTP7V2fLd4t+2u1fnKnt89IJf2jaA 5cT3UtlLO/d3MqnJhv5xx4VwIDS8+epdVow7Z8qK+o7pZkVgkA9YQT1Ut8UkCYE/r/tM=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kenrY-0007FC-0L; Tue, 17 Nov 2020 00:24:48 +0100 X-Now-Playing: Yes's _The Yes Album_: "Perpetual Change" In-Reply-To: <87k0ulne6b.fsf@hajtower> ("Harald =?UTF-8?Q?J=C3=B6rg?="'s message of "Mon, 16 Nov 2020 23:13:16 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:193503 Archived-At: haj@posteo.de (Harald J=C3=B6rg) 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 $_ =3D~ /.../; ... 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. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no