From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Harald =?UTF-8?Q?J=C3=B6rg?= Newsgroups: gmane.emacs.bugs Subject: bug#11733: Indentation has been fixed in the master branch. Date: Sat, 01 Jul 2023 22:50:07 +0000 Message-ID: <875y73nt5s.fsf@oook.m.uunet.de> References: <871ulcdhkv.fsf@ypig.lip.ens-lyon.fr> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16795"; mail-complaints-to="usenet@ciao.gmane.io" To: 11733-done@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 02 00:51:32 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 1qFjRD-0004AP-Hg for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Jul 2023 00:51:31 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qFjQm-00082U-NK; Sat, 01 Jul 2023 18:51:04 -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 1qFjQk-00081R-9d for bug-gnu-emacs@gnu.org; Sat, 01 Jul 2023 18:51:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qFjQk-0006oD-0d for bug-gnu-emacs@gnu.org; Sat, 01 Jul 2023 18:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qFjQj-0002ub-SR for bug-gnu-emacs@gnu.org; Sat, 01 Jul 2023 18:51:01 -0400 In-Reply-To: <871ulcdhkv.fsf@ypig.lip.ens-lyon.fr> Resent-From: Harald =?UTF-8?Q?J=C3=B6rg?= Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Jul 2023 22:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 11733 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Mail-Followup-To: 11733@debbugs.gnu.org, haj@posteo.de, vincent@vinc17.net Original-Received: via spool by 11733-done@debbugs.gnu.org id=D11733.168825181811135 (code D ref 11733); Sat, 01 Jul 2023 22:51:01 +0000 Original-Received: (at 11733-done) by debbugs.gnu.org; 1 Jul 2023 22:50:18 +0000 Original-Received: from localhost ([127.0.0.1]:58872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFjQ2-0002tX-3p for submit@debbugs.gnu.org; Sat, 01 Jul 2023 18:50:18 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:36377) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFjPz-0002tH-5M for 11733-done@debbugs.gnu.org; Sat, 01 Jul 2023 18:50:17 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id B7530240027 for <11733-done@debbugs.gnu.org>; Sun, 2 Jul 2023 00:50:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1688251808; bh=NzM9gigrqnAAS49jxrLCovwKIiapp85/uSccHS0kPNQ=; h=From:To:Subject:Date:Message-ID:MIME-Version:From; b=BVEQ6oAnhtgqxlF6a62Ff08UMUL6W+0uxWeFckohynjIz1AXApXUe8Ri3kMCRTdmw k6CmKA59o6sMTyrUFuypl9Pj/U3BGsJhjRHSs7esZN2ZXnqQWq6o1hwr1Cygq4G+Zb a7dM+10pmxZxmdeZYO9athRiwNO9RCLVGt55H3fmxi9dnMvmJrnYKaeM18/QXQDzg+ fHhAoQvm2lM3jESHw7k7W5ZG4kqOBzCApkZVKL1nl2uU+l/Da9Pn7yHMXwcp0sTmT4 cpWFkVyDXgGSjesBhVhMyKf0IPbrRWGKfbDivIhNK+ia6HEC5hsejf9myrZLjOubGt EKhZhL8SbzjSQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QtnSw2Rlyz6tsB for <11733-done@debbugs.gnu.org>; Sun, 2 Jul 2023 00:50:08 +0200 (CEST) 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:264434 Archived-At: Eventually, the reworking of the indentation code allows to fix these bugs (again, thanks for the clear recipes). The first example will now be indented like this: -------------------------------------------------- #!/usr/bin/env perl # -*- mode: cperl -*- sub foo { } sub bar { } -------------------------------------------------- This is in line with the Perl style guide https://perldoc.perl.org/perlstyle. The second example is a masterpiece of edge cases: -------------------------------------------------- #!/usr/bin/env perl # -*- mode: cperl -*- while (<>) { m:^ \d+ p: or die; m:^ \d+ : or die; } -------------------------------------------------- The strings 'm:' and 'p:' look like labels, and cperl-mode must take extra measures to detect these situations. This is now done. When indented line-by-line, cperl-mode will now the leave the indentation unchanged. cperl-mode.el from the repository works with Emacs versions 27 and newer. Therefore, I am declaring this bug "done". -- Cheers, haj