From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Harald_J=C3=B6rg?= Newsgroups: gmane.emacs.devel Subject: Enhancing cperl-mode (was: Re: Does Emacs need two Perl modes?) Date: Mon, 19 Jun 2023 14:34:39 +0000 Message-ID: <878rcfbjwg.fsf_-_@oook.m.uunet.de> References: <16da6ae7-66d8-fc43-cb84-6d104d3a2ef8@mavit.org.uk> <4d18a051-07d5-fba7-1c36-ae2eb72bf71c@vodafonemail.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8850"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Corwin Brust Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jun 19 16:37:03 2023 Return-path: Envelope-to: ged-emacs-devel@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 1qBG07-000246-CN for ged-emacs-devel@m.gmane-mx.org; Mon, 19 Jun 2023 16:37:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qBFyR-0001Hv-TK; Mon, 19 Jun 2023 10:35:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBFxv-000193-FQ for emacs-devel@gnu.org; Mon, 19 Jun 2023 10:34:52 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBFxr-0004Fo-Qn for emacs-devel@gnu.org; Mon, 19 Jun 2023 10:34:46 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 9D693240028 for ; Mon, 19 Jun 2023 16:34:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1687185280; bh=m+pNEj+XPl7Nri8MkAf+tQJF/S+yjaR3KVBooBGogZc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=X9QpIF86Sp+CP+g9JXeFreYq3+c2AC07ZaCfo3EsAWpLueZ38QzsrKGAFrddVr/rZ QIUW+XpwpqUaXrQ6qL/4n4qBQozxpaevmW1Ag/3SeTtVGc3IBjmtyHcl5rNguga+x5 Wx41PEKOUYVfR8Q/Mba06tmNWYEWbrjK40likdaRyEcrYxPipijgF4a1lQOzlqhSch BJNvI+hDhCTAwK4ok87bbG7r1kjBxFEy6A6onNGqzvpDmY3/p2rVb4OTJAlOWRSU9Q EVwK5nKre6R4N5okiMSAw+m+myh8IbNABRSdHyVkRMBTKITw1qxWs89bCzJfeHDgLi NzAccfP3Hjuag== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QlC2l4gFfz6twD; Mon, 19 Jun 2023 16:34:39 +0200 (CEST) In-Reply-To: (Corwin Brust's message of "Mon, 19 Jun 2023 08:01:59 -0500") Received-SPF: pass client-ip=185.67.36.65; envelope-from=haj@posteo.de; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:307046 Archived-At: Corwin Brust writes: > I was thinking about this just yesterday while whipping up this rather > naive patch for cperl (adding class/method/ADJUST and async/await): > https://bpa.st/VPAW4 Nice! Are you going to commit this? I'm working on adapting cperl-mode to Perl 5.38 as well, and unsurprisingly my patch looks very similar (but isn't committed yet either). > [...] > My sense has been that perl-mode is wired up by default specifically > because it's the less frills choice, and thus more likely to perform > well on older and underpowered systems. The performance was indeed a point of criticism when I started using cperl-mode. But that was in another century - I doubt that it is a serious issue today. But yes, perl-mode is less ambitious (e.g. it doesn't look into regular expressions and doesn't offer code reformatting). Its code is cleaner, and it uses the "Simple Minded Indentation Engine", which in many cases gets it right. I guess that in some areas both Perl modes will converge (for example, they are using the same test suite). Once the tree-sitter grammar for Perl is reasonably complete (it isn't today), both modes might want to use that. Also, I've been dreaming of adding support for Perl's syntax extensions as minor modes which can be activated on top of perl-mode and cperl-mode. -- Cheers, haj