From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier 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, 24 Sep 2023 18:54:11 -0400 Message-ID: References: <4963b74f-7723-c473-afe3-2c3f84324217@gmail.com> <87jzsfw6t8.fsf@oook.m.uunet.de> Reply-To: Stefan Monnier 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="4111"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Corwin Brust , 66050@debbugs.gnu.org, Mauro Aranda , rms@gnu.org, Stefan Kangas To: Harald =?UTF-8?Q?J=C3=B6rg?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 25 00:55:07 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 1qkY0J-0000ta-HR for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Sep 2023 00:55:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkY04-0001uH-0f; Sun, 24 Sep 2023 18:54:52 -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 1qkY02-0001u9-ET for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 18:54:50 -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 1qkY02-0006zW-6W for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 18:54:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qkY0E-00087R-6o for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 18:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Sep 2023 22:55: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.169559607931174 (code B ref 66050); Sun, 24 Sep 2023 22:55:02 +0000 Original-Received: (at 66050) by debbugs.gnu.org; 24 Sep 2023 22:54:39 +0000 Original-Received: from localhost ([127.0.0.1]:43733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkXzp-00086j-FK for submit@debbugs.gnu.org; Sun, 24 Sep 2023 18:54:39 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:33581) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkXzj-00086S-Ft for 66050@debbugs.gnu.org; Sun, 24 Sep 2023 18:54:36 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id E1AF7100068; Sun, 24 Sep 2023 18:54:13 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1695596052; bh=Ed4EJ+IkmEE1uoPWFowlWbcCZT0zJkQSpMgMOM3frAw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=lQfXrC0Uvpq5hQFkpMK8Qn+y83JfnWVYok7SICf8dqnG36EBNW7YKTD31SHDMPofZ rsLbBTEXiHPAHHwKfEzzJzt3n5yk8ZRCQglScd9yAA2TJ3GYzBi83eCxpRMp0hKsHx q2uj6f3JT3MwDcPq0o6tJADieuFpxyjslwVRl8jvI801VoNeqcm5Gydw9aiNC18uJt eX2a4deDbcyy6DsxV4czGQKcHyb/3G0GFsuU8VUamrEs0KHWaP7OBWo4u2N6s2tqg4 c0krsyaTmEaJDJNTMrFxDfV1AteevACezwMrA8bLvdn0oaXZ6Z28UR4K4KdwkpEB4q dV6Ko2nVqUe4Q== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id DD519100033; Sun, 24 Sep 2023 18:54:12 -0400 (EDT) Original-Received: from pastel (unknown [108.175.235.15]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A1DD312022A; Sun, 24 Sep 2023 18:54:12 -0400 (EDT) In-Reply-To: <87jzsfw6t8.fsf@oook.m.uunet.de> ("Harald =?UTF-8?Q?J=C3=B6rg?="'s message of "Sun, 24 Sep 2023 22:21:55 +0000") 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:271281 Archived-At: >> 1. If I have something like: >> my $some_code =3D ""; >> $some_code.=3D q( >> my $counter =3D 0; >> ); >> >> If I put point at column 0 of the line "my $counter", and hit TAB, I get >> indentation in perl-mode. I don't in cperl-mode. I tried to look into >> options for making this work but I couldn't find anything. > > I consider the behavior of perl-mode to be a bug. The behavior looks right to me, tho I haven't checked the code if it's by accident (i.e. because of a bug in `perl-mode`) or not. > Whatever is within the parens of q(...) is a string, and will be > assigned to the variable $some_code. By "indenting", perl-mode changes > the value of $some_code by adding spaces. In my opinion, indenting > should change the optical layout, but not the code! Agreed in the sense that `indent-according-to-mode` (and `indent-region`) should not touch this line. But TAB should, using this part of `indent-line-function`: indent-line-function is a variable defined in =E2=80=98indent.el=E2=80= =99. [...] If it is called somewhere where it cannot auto-indent, the function should return =E2=80=98noindent=E2=80=99 to signal that it didn=E2=80= =99t. [...] > The message is technically correct, and generally I consider the ability > of cperl-mode to locate syntax errors useful. But I understand that it > can be annoying while you're typing (I myself don't see these messages > because I use paredit-mode, but I understand that not everyone wants > this electricity). I guess that a way to optionally suppress these > messages can be found. I think the way we usually solve these tensions is to replace those error messages with some kind of highlighting (and if necessary `help-echo` properties to help the user figure out what this highlighting is for). E.g. in ELisp mode, a non-terminated string results in a string-highlight that bleeds into the subsequent code. And an argument wrongly placed on the same line as something already indented within a subexpression as in: (foo arg1 (some sub expression) badarg2) gets a `font-lock-warning-face` together with a `help-echo`. Stefan