From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jens Schmidt via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66050: Making perl-mode.el obsolete Date: Sun, 17 Sep 2023 22:59:19 +0200 Message-ID: <87fs3cv7mg.fsf@sappc2.fritz.box> References: <87il88vjvd.fsf@sappc2.fritz.box> Reply-To: Jens Schmidt Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6230"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cc: 66050@debbugs.gnu.org, Harald =?UTF-8?Q?J=C3=B6rg?= , Stefan Monnier To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 17 23:00:13 2023 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 1qhysG-0001Nd-V3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Sep 2023 23:00:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qhys0-0002EL-VJ; Sun, 17 Sep 2023 16:59:56 -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 1qhyrz-0002Ds-CY for bug-gnu-emacs@gnu.org; Sun, 17 Sep 2023 16:59:55 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qhyrz-0006Va-4L for bug-gnu-emacs@gnu.org; Sun, 17 Sep 2023 16:59:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qhys6-00046n-M1 for bug-gnu-emacs@gnu.org; Sun, 17 Sep 2023 17:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jens Schmidt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Sep 2023 21:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66050 X-GNU-PR-Package: emacs Original-Received: via spool by 66050-submit@debbugs.gnu.org id=B66050.169498440115757 (code B ref 66050); Sun, 17 Sep 2023 21:00:02 +0000 Original-Received: (at 66050) by debbugs.gnu.org; 17 Sep 2023 21:00:01 +0000 Original-Received: from localhost ([127.0.0.1]:51556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhys4-000464-Rc for submit@debbugs.gnu.org; Sun, 17 Sep 2023 17:00:01 -0400 Original-Received: from mr5.vodafonemail.de ([145.253.228.165]:51846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhyry-00045m-SU for 66050@debbugs.gnu.org; Sun, 17 Sep 2023 16:59:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1694984380; bh=Fdps6Xl/WITbyPaNVk0vp5z5LarweJR0DXw5c2qsHn4=; h=From:To:Subject:References:Date:In-Reply-To:Message-ID:User-Agent: Content-Type:From; b=JAgT3Vb2nNrD6ZtEXcUHwJp9QS2/NoitqdzV1nMqSPDRaNAVtuPD6sA5SV3++WS/G N8j6YmwQDR9ey507n/FICoOvuTfYCjTiZ3udo/1jlG2CyjKPrjmFBAFjrabB+399gs muTRK9RRES3nwNW03uz8x7co6kHIzFbPs8/gb0bg= Original-Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr5.vodafonemail.de (Postfix) with ESMTPS id 4RpgKS3203z1yBc; Sun, 17 Sep 2023 20:59:40 +0000 (UTC) Original-Received: from sappc2 (port-92-194-41-223.dynamic.as20676.net [92.194.41.223]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4RpgK73lMYz9rxg; Sun, 17 Sep 2023 20:59:20 +0000 (UTC) In-Reply-To: (Stefan Kangas's message of "Sun, 17 Sep 2023 11:20:28 -0700") X-purgate-type: clean X-purgate: clean X-purgate-size: 3262 X-purgate-ID: 155817::1694984376-94FF4E22-42E3D9DA/0/0 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:270721 Archived-At: Stefan Kangas writes: > Jens Schmidt writes: > >> cperl-mode already has some big-config-sweep-knobs, like it seems >> (`cperl-hairy'). It would certainly be nice to also have some >> "make-things-work-like-in-perl-mode-but-sans-its-bugs" knob if it came >> to obsoleting perl-mode. For me, the most important things to cover >> here would be a nearly-identical look-and-feel for indentation and >> syntax highlighting. > > Which features would be covered by `like-perl-mode-sans-bugs', that are > not already covered by `cperl-hairy'? Just to avoid misunderstandings: I have tried so far everything with `cperl-hairy' unchanged from default nil. I guess that non-nil makes cperl-mode even more electric, etc., which is actually the opposite direction of what I'm heading for. > Is it just a matter of setting some already existing options or is > "more work" needed? That's more a question for Harald, I think, since I'm not very well acquainted with cperl-mode. I can state only what I have noticed this afternoon, after some very cursory comparison and review. Hoping this is the right place for such a wish list: 1. All scalar references should be hightlighted with font-lock-variable-name-face. Seems that `cperl-highlight-variables-indiscriminately' provides that. 2. Arrays and hashes should be highlighted just like scalars, in font-lock-variable-name-face. 3. Variable sigils ("$", "%", "@") should not be highlighted at all. 4. Builtins ("shift", "ref", "defined") should not be highlighted at all. 5. Package names should be highlighted as font-lock-constant-face rather than font-lock-function-face. 6. Unquoted hash keys before "=>" should not be highlighted at all. 7. Regexps should be highlighted as font-lock-string-face. When I switch on cperl-mode, there is little left which is *not* highlighted ... 8. Re-indentation of blocks should not merge else/elsif keywords with preceeding curlies. 9. Re-indenting a region should not adjust positions of after-code comments. Ah, cperl-style "PBP" covers 8. and 9. above! 10. Some parts of cperl-mode look, well, over-engineered. Function `cperl-find-pods-heres' is a stunning 1000+ lines long and obviously features regexps with more than 20 subres. BTW, on Image/ExifTool.pm as of version 12.16 I get errors in "emacs -Q" when switching on cperl-mode, I think because of that function. 11. Last not least, these pseudo-variables on the page labeled "Short extra-docs." always bug me. Packing arbitrary documentation in variables seems rather strange and rather non-standard. While that does not sound much: - I have the impression that, despite so many options in cperl-mode being available, just the right ones to "turn cperl-mode into perl-mode" are missing. But that could also be because I haven't found them yet ... - There's probably more to it than that. Having some `like-perl-mode-sans-bugs' umbrella would be not only helpful to make this more easily customizable, but also to have something to "attach" future development to. Not sure how to express that better.