From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#46889: cperl-mode: Fix indentation issues [PATCH] Date: Thu, 4 Mar 2021 19:07:28 +0100 Message-ID: <726A49CD-3D7F-44A3-A09F-F5C32F22EB28@acm.org> References: <87im68uwld.fsf@hajtower> <87tupqvn9i.fsf@gnus.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7278"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46889@debbugs.gnu.org, Harald =?UTF-8?Q?J=C3=B6rg?= To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 04 19:08:37 2021 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 1lHsOq-0001lQ-28 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Mar 2021 19:08:36 +0100 Original-Received: from localhost ([::1]:57544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHsOp-00074g-19 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Mar 2021 13:08:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHsOJ-0006ic-TO for bug-gnu-emacs@gnu.org; Thu, 04 Mar 2021 13:08:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48614) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHsOI-00080G-6z for bug-gnu-emacs@gnu.org; Thu, 04 Mar 2021 13:08:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lHsOI-0003YB-2C for bug-gnu-emacs@gnu.org; Thu, 04 Mar 2021 13:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Mar 2021 18:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46889 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 46889-submit@debbugs.gnu.org id=B46889.161488125913619 (code B ref 46889); Thu, 04 Mar 2021 18:08:02 +0000 Original-Received: (at 46889) by debbugs.gnu.org; 4 Mar 2021 18:07:39 +0000 Original-Received: from localhost ([127.0.0.1]:60160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHsNv-0003Xa-5S for submit@debbugs.gnu.org; Thu, 04 Mar 2021 13:07:39 -0500 Original-Received: from mail226c50.megamailservers.eu ([91.136.10.236]:43732 helo=mail36c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHsNp-0003XN-72 for 46889@debbugs.gnu.org; Thu, 04 Mar 2021 13:07:38 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1614881251; bh=+4Uf6MrXv2tmreLhwLCHNEzX/UEzIAzQPglOtbZtDm0=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=F3iVwLdSeRSEyt/cpHCmV6eV3WMxHT9erjJrhvFakW2QgfiXJ6GwPpGa7j/a5aTqV qFHd1rZa1OlMkbu37qfmwk32wCERUkQpVNH/Yy2n/q2atA7GfngF+N13HpsuE6EVnN rTK5ckRIj6hbqKMTIl5OkX4Hxx+MSnY+Vqivz32M= Feedback-ID: mattiase@acm.or Original-Received: from stanniol.lan (c-b952e353.032-75-73746f71.bbcust.telenor.se [83.227.82.185]) (authenticated bits=0) by mail36c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 124I7Te1012574; Thu, 4 Mar 2021 18:07:30 +0000 In-Reply-To: <87tupqvn9i.fsf@gnus.org> X-Mailer: Apple Mail (2.3445.104.17) X-CTCH-RefID: str=0001.0A742F1A.604121E3.0054, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=M4oz1B4s c=1 sm=1 tr=0 a=von4qPfY+hyqc0zmWf0tYQ==:117 a=von4qPfY+hyqc0zmWf0tYQ==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=OocQHUDgAAAA:8 a=6vf2Kgs8V_9uYtELBEoA:9 a=CjuIK1q_8ugA:10 a=xUZTl98r3Qw_uB5NK3jt:22 X-Origin-Country: SE 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:201430 Archived-At: 4 mars 2021 kl. 18.31 skrev Lars Ingebrigtsen : > I'm thinking of the rx `eval' things everywhere. Wouldn't defining > these rx expressions with `rx-define' be more straighforward, and then > you'd have: `rx-define` is new in Emacs 27, and the patch was apparently intended to = work with 26.1. >> +(defconst cperl-maybe-white-and-comment-rex >> + (rx-to-string `(group cperl--ws*-rx)) >=20 > (Similarly for basically all the rx `eval' bits. >=20 > Now, rx expands the `eval' at compile time, I think, so it doesn't > really make that much difference in practice, but it seems slightly > clearer, perhaps? Even in Emacs 26, there are several more or less equivalent ways of = expressing the same thing. I'm sure it will be fine. A minor detail -- ignore it if you like -- is that some backquote forms = now no longer have any substitutions (, or ,@) and could therefore be = plain quoted forms. Or, if you prefer, you could keep the backquotes and = use comma-substitution instead of `eval` instead of mixing the two. It = may also be a good idea to use `rx` instead of `rx-to-string` in some = places to ensure that the translation is done at compile time instead of = when the module is loaded.