From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 19 12:17:51 2025 Received: (at submit) by debbugs.gnu.org; 19 Aug 2025 16:17:51 +0000 Received: from localhost ([127.0.0.1]:54602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uoP1y-0000eW-PW for submit@debbugs.gnu.org; Tue, 19 Aug 2025 12:17:51 -0400 Received: from lists.gnu.org ([2001:470:142::17]:33484) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uoP1v-0000e3-2Q for submit@debbugs.gnu.org; Tue, 19 Aug 2025 12:17:49 -0400 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 1uoP1i-0004mg-Ke for bug-gnu-emacs@gnu.org; Tue, 19 Aug 2025 12:17:34 -0400 Received: from mail-westus2azon11012064.outbound.protection.outlook.com ([52.101.48.64] helo=MW6PR02CU001.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uoP1f-0000vV-7E for bug-gnu-emacs@gnu.org; Tue, 19 Aug 2025 12:17:34 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=D8UKC5/JjMzVl+2cSWPv70S97SkE4k/5rv/ens0WaidyXtChBCt2MXvUEDBv61ZxnYZueR21iSnEqI4LrvuTECW5RtrMi8Beifwoj2cKkfs+PeSrtzvNG/NVYqwQVieJPsKsKkoOUQwHfM4sU61aRRQXo+0XK4Pk/ksIJNZ/gaSGoPh6CfNnRjsahJXS4SXzX3jBbCYzDxOkqF4b/QP5a2cynPEIkgWoOHW6hizqSYJD9TFvObRTI5EpS5AuILpD5sZi3ZdZmtRJet2maV3wWYlvprE5lzA0mUQL/nHbBxlvED0Jp6e0JKaQUG6GLfsFhnbVYsnOgEgFpF9VFtS+WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ynbkYpafI95SL1jgKeCt9yZsUUrCj54F6JzCfFiOQfA=; b=d0fJLxlHOHoPn/WYQRMYlK7XiCK+JIMEIQv/WZT1WA8OEAzZOKJc9pe3gg/4ya/zek6s8Rmgl6lrplDacxUCFA30SpZVzmkOF5TnwHtzGAZTSPnUdBY4Mk2RVU0S6T04lrLRH5+dmacgtPk/Khx9GGeTrKVFZNsPMoPWNLUvL+V/EYgKf4fD4cxRJrnorDV9rIGcrghbYP04kBEcIT42MZ3rExsvicCIKEdgv+AxqpA3ik5Jx8hYKjXOROcs5blcESEohzZJY5MA9N+buP+wHRNU6aFEVddaEYgCjf9zbiD1QCEpyJyEjo3wCMDtNXxPsoypNgUUupfKH/EtVIKltw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 144.212.248.35) smtp.rcpttodomain=gnu.org smtp.mailfrom=mathworks.com; dmarc=fail (p=none sp=quarantine pct=100) action=none header.from=gmail.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mathworks.onmicrosoft.com; s=selector2-mathworks-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ynbkYpafI95SL1jgKeCt9yZsUUrCj54F6JzCfFiOQfA=; b=NpN2AMCDheP3znAZN44kE0QUFYwuhcOoRGphsw2T4syCcUjMhdVrfRsS6Z0Hjdz6hLONRJyT7VJGRJ/MoxW59mHaS0ElPaQiB/KaRTs+8Xg1GzlvYJzfh+9NX6rSSVskoRoziZW0HywZFZbDVdcCtk4pn7d7lp42tH2yecHlhjUHZsH8FspIrVRzt4HQLmhhQjbq/5CnM0MMHgK2DwWFxJrk4trRi47JeyOCXmlHSMaR5v0Bu3qcEXgF8UQ9RT6Ql0g9ieGtOMKHagkP9xyFhPPPOAUWtv6/kB5F2MD68iEvpX+bIuXHXeI5evp07s+kocMaLvix6SirQnSuIwTF4g== Received: from SJ0PR13CA0217.namprd13.prod.outlook.com (2603:10b6:a03:2c1::12) by SA1PR05MB8408.namprd05.prod.outlook.com (2603:10b6:806:1d7::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9031.24; Tue, 19 Aug 2025 16:06:22 +0000 Received: from SJ5PEPF000001CF.namprd05.prod.outlook.com (2603:10b6:a03:2c1:cafe::f) by SJ0PR13CA0217.outlook.office365.com (2603:10b6:a03:2c1::12) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9052.12 via Frontend Transport; Tue, 19 Aug 2025 16:06:22 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 144.212.248.35) smtp.mailfrom=mathworks.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=gmail.com; Received-SPF: Pass (protection.outlook.com: domain of mathworks.com designates 144.212.248.35 as permitted sender) receiver=protection.outlook.com; client-ip=144.212.248.35; helo=exedge.mathworks.com; pr=C Received: from exedge.mathworks.com (144.212.248.35) by SJ5PEPF000001CF.mail.protection.outlook.com (10.167.242.43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9052.8 via Frontend Transport; Tue, 19 Aug 2025 16:06:21 +0000 Received: from EX1901LS.mathworks.com (172.20.16.221) by EX19EDGE00LS.mathworks.com (172.29.251.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.36; Tue, 19 Aug 2025 12:06:21 -0400 Received: from EX1901LS.mathworks.com (172.20.16.221) by EX1901LS.mathworks.com (172.20.16.221) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.36; Tue, 19 Aug 2025 12:06:20 -0400 Received: from mail-vif.mathworks.com (144.212.95.101) by EX1901LS.mathworks.com (172.20.16.221) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.36 via Frontend Transport; Tue, 19 Aug 2025 12:06:20 -0400 Received: from ah-ciolfi-l.dhcp.mathworks.com (ah-ciolfi-l.dhcp.mathworks.com [172.21.82.138]) by mail-vif.mathworks.com (8.14.7/8.14.7) with ESMTP id 57JG6Kee030850 for ; Tue, 19 Aug 2025 12:06:20 -0400 Received: from ah-ciolfi-l.dhcp.mathworks.com (localhost [127.0.0.1]) by ah-ciolfi-l.dhcp.mathworks.com (8.17.1.9/8.17.1.9/Debian-2+deb12u2) with ESMTP id 57JG6Kwr3671970 for ; Tue, 19 Aug 2025 12:06:20 -0400 Received: (from ciolfi@localhost) by ah-ciolfi-l.dhcp.mathworks.com (8.17.1.9/8.17.1.9/Submit) id 57JG6KjQ3671968; Tue, 19 Aug 2025 12:06:20 -0400 From: John Ciolfi To: Subject: 30.1; cperl-mode does not handle signatures correctly X-Debbugs-Cc: Date: Tue, 19 Aug 2025 12:05:37 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ5PEPF000001CF:EE_|SA1PR05MB8408:EE_ X-MS-Office365-Filtering-Correlation-Id: c5b71d44-0c33-42e9-b1f4-08dddf3a5735 X-MS-Exchange-SenderADCheck: 0 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|61400799027|7093399015|48200799018|82310400026|35450700002; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?+ZJmfuYBYBja1qZd4eSTpQ6Dx4y9RysTAUePrDNZDQd5wf6ISlL2pUK+B6L7?= =?us-ascii?Q?qtV2ITK5QLVsGLMpX2/OjNXmh0qotZRQUckmKBntU5KnETuR8HZe48c5i7mc?= =?us-ascii?Q?hcqROqH5LuLAxTsVMzN5jdAlCXf109Uq9XMOP20OMo1wrfnZ0A8XBkjkJ5Fd?= =?us-ascii?Q?9E4q1Vc5ln4fWnfEtcKIPcTh4nZJXLmqDJGMHg2YhmPOIYxjSgnzpWwjhc97?= =?us-ascii?Q?7/RT12FDtt9Rk7WerTYJSCB3uLJl7K4zP4EqLvGwoXE1rzDYH5GKeYGS/A/V?= =?us-ascii?Q?Bls/NetqzHu1d5GQNy6oAQMKoxccearnGC5mm5rtkIU0+63TvI/S61EUMxol?= =?us-ascii?Q?/NX29EaJlRPXW+fGuyQRdoGoxYqmsgiScKjXVaUPgwa1fnYPBoMg5tXibfkG?= =?us-ascii?Q?VfGgL5FscKI1xaqCV/HGAhxpb00diI+F+A3NirCowmmT4LetqkOT+FZmBbr1?= =?us-ascii?Q?fdQTxATYU33GTDOflVOsGJUi+9d6WLvwkltxRS85aTjeIgAT+jgeHaGOWzpN?= =?us-ascii?Q?0lkPJjDK0aep4O3YiITIETgdJ0e9v4ZT3Mmi5pY/0okZwMAraocrAZ5a8Q53?= =?us-ascii?Q?UlifD3D/CWv40nVIJOo3mHh6w5B3+8zTETyUFfHr50InSh5WbA62my8TqO0+?= =?us-ascii?Q?0oit7xaDtI7JtIzwhNtnzO5LwSl968DYMLcXqwLzKxj1xZwA7iEKSwYwwfmw?= =?us-ascii?Q?z6bbF1G6QaKSANeuFH8FwQyAkMMkGDOwnlK0SnGgWOwqH886l560nCV24AXD?= =?us-ascii?Q?Xxorv1Y/zgPwmRu3nYNimvZoEqtDo8v/kjFYYTdGuGLDm6FSJcSrcCyKQ7Oo?= =?us-ascii?Q?BrMYsgFAr13CHNeizkNvmS76CJSHy2ENKwHu4uVw+WdYm8AR/O7KcAMS5TIj?= =?us-ascii?Q?y4auDw9V39hLlgsDOHkBjzqnqEknId72RMn6Qt0LZLOofNz+AJ2tXvbmQEc4?= =?us-ascii?Q?MeCwajtV90UH81Lea3LuMizBfAoIdvysKksqp2FXM3M1LX2TAH1TWPzGA3Ef?= =?us-ascii?Q?GYl+Iqh0P1KOe2TOUdYGqZU0/Pjhz9katAVF7AyW+n/w0IQaQ6mN7SnbW7xc?= =?us-ascii?Q?z8Qp/cdD8xpcIL5wMRj7YPEA3CYFDMT+xdzawlMlggzTf9z+jAM7533afh/8?= =?us-ascii?Q?Huoek0q9gDOmgEJVFW/3v3GKX80mtkhJYYewmjAYtukzpgxfWfa8dF+SyqEE?= =?us-ascii?Q?usb0ZpISqBnS95KPrOvpops7cDxC545O/TMxTOv5BRBpArUPAjGOxvY/zcBZ?= =?us-ascii?Q?acinDXKmEBQkZLYstEZDt24FIZBo2Jt1A3qrWcaRIdcw5qf2zxjGnaDXmz0E?= =?us-ascii?Q?sUN8/0e0Q42MKmDbKMHsM0yz+irq0CwG+t3KlG8difzqBi9PgfStJ5SKu9Eo?= =?us-ascii?Q?RD4rHCK8X8KzfGnjTlGrrFYshOjviZZiZvvJMhf6V6jyfWrJ7t3W67gz+tjK?= =?us-ascii?Q?CQi5AyxdvxJ+lJ7zUUgbkQ2fQWmaMvzBCps/vsozBDBBP3+KQNvgy27ixUKO?= =?us-ascii?Q?8cu4iVS7RjLF3OrsIj4C52d48LdwxZegi690?= X-Forefront-Antispam-Report: CIP:144.212.248.35; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:exedge.mathworks.com; PTR:mxgw-ls.mathworks.com; CAT:NONE; SFS:(13230040)(36860700013)(376014)(61400799027)(7093399015)(48200799018)(82310400026)(35450700002); DIR:OUT; SFP:1101; X-OriginatorOrg: mathworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2025 16:06:21.8028 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c5b71d44-0c33-42e9-b1f4-08dddf3a5735 X-MS-Exchange-CrossTenant-Id: 99dd3a11-4348-4468-9bdd-e5072b1dc1e6 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=99dd3a11-4348-4468-9bdd-e5072b1dc1e6; Ip=[144.212.248.35]; Helo=[exedge.mathworks.com] X-MS-Exchange-CrossTenant-AuthSource: SJ5PEPF000001CF.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR05MB8408 Received-SPF: pass client-ip=52.101.48.64; envelope-from=ciolfi@mathworks.com; helo=MW6PR02CU001.outbound.protection.outlook.com X-Spam_score_int: 1 X-Spam_score: 0.1 X-Spam_bar: / X-Spam_report: (0.1 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.054, NML_ADSP_CUSTOM_MED=0.9, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 3.5 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 1. In a temporary directory, say ~/tmp/, get latest cperl-mode.el from https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/cperl-mode.el I used the Jul-28-2025 version https://github.com/ [...] Content analysis details: (3.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 1.0 FORGED_GMAIL_RCVD 'From' gmail.com does not match 'Received' headers 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (john.ciolfi.32[at]gmail.com) 0.1 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 0.0 SPOOFED_FREEMAIL No description available. 1.5 SPOOF_GMAIL_MID From Gmail but it doesn't seem to be... X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) 1. In a temporary directory, say ~/tmp/, get latest cperl-mode.el from https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/cperl-mode.el I used the Jul-28-2025 version https://github.com/emacs-mirror/emacs/blob/cef4302d309e26c2191821ba998518fb89fff54e/lisp/progmodes/cperl-mode.el 2. cd ~/tmp 3. emacs -Q -L . # Using emacs 30.1 4. M-x byte-compile-file RET cperl-mode.el RET 5. C-x C-f foo.pl C-x h # select all of foo.pl C-M-\ # indent foo.pl Here's the indented foo.pl. Notice that there are a couple problems which appears to be due to the incorrect handling of perl signatures. Note, perl-mode.el seems to handle signatures correctly, so maybe that code can be borrowed for cperl-mode.el? # -*- mode: cperl -*- use strict; use warnings; use experimental 'signatures'; foo(1); sub foo ( $in1, $optionsHPtr = {}, $otherOption1 = 1, # Bug: wrong face for this option ) { my $a = 1; # Bug: should be indented by 2 spaces # Bug: following are not indented due to use of signatures my $b = 2; return $a + $b + $in1; } In GNU Emacs 30.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.16.0) of 2025-04-04, modified by Debian built on sbuild Windowing system distributor 'The X.Org Foundation', version 11.0.12101006 System Description: Debian GNU/Linux 12 (bookworm) Configured using: 'configure --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/libexec --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/30.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/30.1/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/libexec --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/30.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/30.1/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --with-cairo --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2 -ffile-prefix-map=/build/reproducible-path/emacs-30.1+1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: CPerl Minor modes in effect: tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /home/ciolfi/tmp/cperl-mode hides /usr/share/emacs/30.1/lisp/progmodes/cperl-mode Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils compile text-property-search comint subr-x ansi-osc ansi-color ring comp-run bytecomp byte-compile comp-common cperl-mode rx facemenu rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar make-network-process native-compile emacs) Memory information: ((conses 16 84401 12096) (symbols 48 7366 0) (strings 32 20464 1856) (string-bytes 1 700197) (vectors 16 11848) (vector-slots 8 163636 10525) (floats 8 26 34) (intervals 56 418 0) (buffers 992 12)) From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 19 12:36:45 2025 Received: (at 79269) by debbugs.gnu.org; 19 Aug 2025 16:36:45 +0000 Received: from localhost ([127.0.0.1]:54643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uoPKG-0001cA-FN for submit@debbugs.gnu.org; Tue, 19 Aug 2025 12:36:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57918) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uoPK3-0001bg-U7 for 79269@debbugs.gnu.org; Tue, 19 Aug 2025 12:36:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uoPJx-000464-6d; Tue, 19 Aug 2025 12:36:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=90QP9Nle7677azxRSIbSi1BSyTbab5Vm7YkkVv1jVJQ=; b=dXhHP/H+bOJWCa5EyWS+ bSpDmo9f1PQwpSIY6ZzHG/N42JXAuVm8IMUr0+rdQ3LamCODIFj1sG1fY1yGpvm/smHZn+k4AN5/7 OJyvnsh5O7AUlShLPFRUzuevelMegMkoAw0gCq1zUfgk3XgD5ScV3PZxtYvnYPcRcZqNG5j3o411M WJGa+jZ7h/6PBfaGdXGiQ9r4/1FJlOL5NQG1XA5nJ20rwp2xSCThOvuEmEn7AIRN2f+WAMBQxr7eg eYKFcfe7FCIIvIvvGxQ+JIuXx92k6IMdobMEU7jcfi6RdRD3Gyk+E1gsX0IskcGhzlAPwc/HraYmW BOsGymWyt0bwuA==; Date: Tue, 19 Aug 2025 19:36:21 +0300 Message-Id: <86zfbvfeuy.fsf@gnu.org> From: Eli Zaretskii To: John Ciolfi , Harald =?iso-8859-1?Q?J=F6rg?= In-Reply-To: (message from John Ciolfi on Tue, 19 Aug 2025 12:05:37 -0400) Subject: Re: bug#79269: 30.1; cperl-mode does not handle signatures correctly References: MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79269 Cc: 79269@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: John Ciolfi > Date: Tue, 19 Aug 2025 12:05:37 -0400 > > > 1. In a temporary directory, say ~/tmp/, get latest cperl-mode.el from > https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/cperl-mode.el > I used the Jul-28-2025 version > https://github.com/emacs-mirror/emacs/blob/cef4302d309e26c2191821ba998518fb89fff54e/lisp/progmodes/cperl-mode.el > > 2. cd ~/tmp > > 3. emacs -Q -L . # Using emacs 30.1 > > 4. M-x byte-compile-file RET cperl-mode.el RET > > 5. C-x C-f foo.pl > > C-x h # select all of foo.pl > C-M-\ # indent foo.pl > > Here's the indented foo.pl. Notice that there are a couple problems > which appears to be due to the incorrect handling of perl signatures. > Note, perl-mode.el seems to handle signatures correctly, so maybe that > code can be borrowed for cperl-mode.el? > > > # -*- mode: cperl -*- > use strict; > use warnings; > use experimental 'signatures'; > > foo(1); > > sub foo ( > $in1, > $optionsHPtr = {}, > $otherOption1 = 1, # Bug: wrong face for this option > ) { > > my $a = 1; # Bug: should be indented by 2 spaces > > # Bug: following are not indented due to use of signatures > my $b = 2; > return $a + $b + $in1; > } Thanks. Harald, any comments or suggestions? From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 20 09:45:29 2025 Received: (at 79269) by debbugs.gnu.org; 20 Aug 2025 13:45:29 +0000 Received: from localhost ([127.0.0.1]:56532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uoj85-00017n-6D for submit@debbugs.gnu.org; Wed, 20 Aug 2025 09:45:29 -0400 Received: from mout01.posteo.de ([185.67.36.65]:34025) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uoj81-000176-R5 for 79269@debbugs.gnu.org; Wed, 20 Aug 2025 09:45:27 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 3A825240027 for <79269@debbugs.gnu.org>; Wed, 20 Aug 2025 15:45:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.de; s=2017; t=1755697518; bh=eDsAv3uJoJI6OZs3fwlCsiKxqAH3EOsElBS64bDZ9bU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=DGpjTfa62rdXlj5dNL6URKeWDR29MfPqEGox/1upQxefH4Y6llF3sQA2AM3H4GFn/ y24XkZzulUVlYdIUHrkr2V2cknK2f7yBMGNlLDS8bNDG7LMuBmiMegGGJN7pYuVpb4 TgCat0cnCd6wH25YfLXowHLNI7A3WDyRlKz6AiX/qQzu87TP2kx0DiyJ3yIy7IPxdt g9BQFeLePWKbSVEMLMYXTI+tMzVC640mEU6XZX03N9zq8wR+AeAp4PQA9zMEXjGXha FBCCDQ67IKhPrNZwTMYvZ42b+++AIRGAyovgqgB3c438+JBwd2hCpN+e0pdBSpabRk qTq8oCt//HHCg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4c6SPn2kl2z6v1S; Wed, 20 Aug 2025 15:45:17 +0200 (CEST) From: =?utf-8?Q?Harald_J=C3=B6rg?= To: Eli Zaretskii Subject: Re: bug#79269: 30.1; cperl-mode does not handle signatures correctly In-Reply-To: <86zfbvfeuy.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 19 Aug 2025 19:36:21 +0300") References: <86zfbvfeuy.fsf@gnu.org> Date: Wed, 20 Aug 2025 13:45:17 +0000 Message-ID: <871pp6xg2a.fsf@oook.m.uunet.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79269 Cc: 79269@debbugs.gnu.org, John Ciolfi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> From: John Ciolfi >> Date: Tue, 19 Aug 2025 12:05:37 -0400 >> >> >> 1. In a temporary directory, say ~/tmp/, get latest cperl-mode.el from >> https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/cperl-mode.el >> I used the Jul-28-2025 version >> https://github.com/emacs-mirror/emacs/blob/cef4302d309e26c2191821ba998518fb89fff54e/lisp/progmodes/cperl-mode.el >> >> 2. cd ~/tmp >> >> 3. emacs -Q -L . # Using emacs 30.1 >> >> 4. M-x byte-compile-file RET cperl-mode.el RET >> >> 5. C-x C-f foo.pl >> >> C-x h # select all of foo.pl >> C-M-\ # indent foo.pl >> >> Here's the indented foo.pl. Notice that there are a couple problems >> which appears to be due to the incorrect handling of perl signatures. >> Note, perl-mode.el seems to handle signatures correctly, so maybe that >> code can be borrowed for cperl-mode.el? >> >> >> # -*- mode: cperl -*- >> use strict; >> use warnings; >> use experimental 'signatures'; >> >> foo(1); >> >> sub foo ( >> $in1, >> $optionsHPtr = {}, >> $otherOption1 = 1, # Bug: wrong face for this option >> ) { >> >> my $a = 1; # Bug: should be indented by 2 spaces >> >> # Bug: following are not indented due to use of signatures >> my $b = 2; >> return $a + $b + $in1; >> } > > Thanks. > > Harald, any comments or suggestions? Yes :) I am glad to see some different code layouts than I use myself, especially when they expose bugs. I did expect this to happen with signatures, and even more with classes. There isn't much code in the wild using these features. I am afraid that borrowing from perl-mode.el is no viable solution. perl-mode treats signatures correctly ... by not recognizing them at all. As for the indentation, I am optimistic that this can be fixed by fiddling with some regular expressions. In a slightly different coding style where the opening brace of the subroutine is on a new line, indentation works as it should: # ---------------------------------------------------------- use experimental 'signatures'; foo(1); sub foo ( $in1, $optionsHPtr = {}, $otherOption1 = 1, # Bug: wrong face for this option ) { my $a = 1; # Bug: should be indented by 2 spaces # Bug: following are not indented due to use of signatures my $b = 2; return $a + $b + $in1; } # ---------------------------------------------------------- So I'll try to prepare a patch and add one or more test cases. As for the wrong face: This is a bug where cperl-mode trips over its ambitions. Per default, cperl-mode highlights scalar variables when they are declared, but not when they are used. A signature is (sort of) a declaration, so variables ought to have variable-face applied. The challenge comes when declarations come with initializers. For example: sub foo ($editor = $emacs) { ... } Here, "$editor" is a declaration whereas "$emacs" is use of a variable declared elsewhere. Initializers are (almost) arbitrary Perl expressions, so we need to compromise how, and how far we are looking for more declarations in the same signature. The current implementation is rather rigid and takes the first "{" as the beginning of the subroutine body and therefore fails to find declarations after the initializer "{}". I am optimistic that I can come up with a more flexible solution. There will always be limitations, but the empty hash reference "{}" is a reasonable case to treat correctly. BTW: perl-mode does not distinguish between declaration and use and always applies variable-face. In cperl-mode this behaviour can be customized by setting cperl-highlight-variables-indiscriminately to non-nil. -- Cheers, haj From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 22 08:11:55 2025 Received: (at 79269-done) by debbugs.gnu.org; 22 Aug 2025 12:11:55 +0000 Received: from localhost ([127.0.0.1]:35517 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1upQcc-0008GG-Pm for submit@debbugs.gnu.org; Fri, 22 Aug 2025 08:11:55 -0400 Received: from mout01.posteo.de ([185.67.36.65]:54267) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1upQcZ-0008Fq-BZ for 79269-done@debbugs.gnu.org; Fri, 22 Aug 2025 08:11:52 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 5B111240027 for <79269-done@debbugs.gnu.org>; Fri, 22 Aug 2025 14:11:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.de; s=2017; t=1755864704; bh=R+SMh6nkKNDt25gWylh9nf51xkzfG7jTh1T8ph7mn+M=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=h0Sqlo5Ft2gJmokglY2tKe6gyXElcqeO0wFwB/qQAwJiVwUGO8XgPDWkwRs7owRY8 /a0f5SRCTgc0Zu/PVBka2LnMnC6RFC+OOojY9QuXDzcSXtRVFzpBVrKM0j0juw3gVf KSYIbZU49W4B9se9JZ9qf0HRyNwLFyi/30XfapNPJeV58H43b2aiEUnkEc9h0gbssD ViC52ROaEyPGA/eAQJErV0/EOy/AMJ8tkqcB/lUmoLptl28rgaVYhwxcaJKjBuNG0Y S94C661MUY935CEATCHoHEt8zbA6xqFlfb3AVCED30qJL5xlNCiGH0EoJd5WP7sjqY /JjtoVtrJrgDA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4c7fDv6ZhFz9rxK for <79269-done@debbugs.gnu.org>; Fri, 22 Aug 2025 14:11:43 +0200 (CEST) From: =?utf-8?Q?Harald_J=C3=B6rg?= To: 79269-done@debbugs.gnu.org Subject: Indentation and fontification of signatures fixed Date: Fri, 22 Aug 2025 12:11:44 +0000 Message-ID: <87o6s7wo74.fsf@oook.m.uunet.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79269-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Both parts of the bug report (thanks for the excellent recipe) have now been fixed in the "master" branch, tests have been added using the example code from the report. -- Cheers, haj From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 27 20:13:13 2025 Received: (at 79269) by debbugs.gnu.org; 28 Aug 2025 00:13:13 +0000 Received: from localhost ([127.0.0.1]:37439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1urQGN-0004UB-T9 for submit@debbugs.gnu.org; Wed, 27 Aug 2025 20:13:13 -0400 Received: from mail-il1-x134.google.com ([2607:f8b0:4864:20::134]:60434) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1urQGI-0004SU-62 for 79269@debbugs.gnu.org; Wed, 27 Aug 2025 20:13:09 -0400 Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-3ea8b3a64a7so2092095ab.0 for <79269@debbugs.gnu.org>; Wed, 27 Aug 2025 17:13:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756339980; x=1756944780; darn=debbugs.gnu.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=XbHrx5YHXrUI6hGrqmp/oBGjX5qp4A2AyT2rc+0arVo=; b=OBBEJc11r0Yba4eiBJ3EMcqUsnmqkCsyrbXyuzNp0x7jlWHJ2XWhdcCX6XDh62uRxT Q/pzD+CBbuvS7P94c7EX3l8Ly4SeZd6fEB6xXk3OA7QQ/vGpVp0N+hNUJkPCFZgdouy3 VUsIxNq2BoL3w4LRWPo5piwiqMc8h2Yj4v90BoQja8RsH7+1gSqxnFll06Dv7VpJnBU1 BhZvJ55MmPH1CH8Lzxk7LYYjM9RUv4yqgPM6OwNkBPsvM2CQxCgYnpHQWixnLc3mBUcO 4q1i4UQmTr/kx5/uvXqHcDLSCdyRWUXDWnTN6GBRy1Yfg3wmf5pV0Ky4XyIZ8P6AgdxS IBoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756339980; x=1756944780; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XbHrx5YHXrUI6hGrqmp/oBGjX5qp4A2AyT2rc+0arVo=; b=rV1wFkiqwB7vkAE9M4D7tkRLABUj0qwoHXDV8PlVs4MxEDIQdyRHYCtpVli7MHQYyV L65IA1btVKx3evZ9vd8IOKqErlzOOSC+/YNNSaIlai/J+KLTFyuE2EltqPMBYbeq5JOv zr5d+fFksMlj3ifY95qUqP9NRa7JzGWoZyoHU2FSYDNW45FDU7b9h0hHagYnXa5wPHQw /8g7aI/uDCPBGt/qqCeQLXlu5VSQyNRvBNZch0sv6uq5I+N8RpBzenFzR9CaCf36lQGw hvi4G0xSUDgIemGqfIZhpLIzevhVKa5BTmzn0wU20ACdjStwMem27PzC8J9jqPbtjdC1 DWnw== X-Gm-Message-State: AOJu0Yx4ThnTw2LGmoI1oPqHkxcyUoE1XDCUuZEVvIXibmArg64JCnFJ /2SW8ZG8CYuSyqIt5lhoODbuNU5b4L2JgfhkCdz3kYTw6TjFPRjEdRdt+LPmEp7gvzb5S/UVY/0 Tn3qwaVQ62sqqY7AIqtOrzfsfLGE673IHsg== X-Gm-Gg: ASbGncsO7gerVH5KOsZAD7rLzvyK+ow3Ed8geUYIsW1S6JSrbWic6RsoqvhdOzwO1gE S3Vl+pRzIn12KW3uuKmiCFAhbqG9pH5e1pT2kH/jf82btfReIHFrfi3zRyZDDR8/FZOC2h0/RPg tLj0r5y8X9nARizU2E0Q8juP5dpgnfF82hC/42gT4JP+QgP3B6zy5CthDl+HGRQ9khNNG9D+mnz cci2di8WqB5xAkyue7qxUPKRgpGGA== X-Google-Smtp-Source: AGHT+IGgpdAxGWFv4frc7IcaaFJvAFeArffgo7S5/EaXTOy4E1oxRcdRQhO09pFCshzLQtPHBCy3tW0ajy9AKqORTTo= X-Received: by 2002:a92:c26b:0:b0:3e5:5af7:7c92 with SMTP id e9e14a558f8ab-3e92186a063mr291888975ab.14.1756339979697; Wed, 27 Aug 2025 17:12:59 -0700 (PDT) MIME-Version: 1.0 References: <87o6s7wo74.fsf@oook.m.uunet.de> In-Reply-To: From: John C Date: Wed, 27 Aug 2025 20:12:48 -0400 X-Gm-Features: Ac12FXwbDrZ5M6b2KnpkXAaI3GrboHXGsYb5-O4B0HpOnE2N8DiHt3gG82ZmoIY Message-ID: Subject: Re: bug#79269: closed (Indentation and fontification of signatures fixed) To: 79269@debbugs.gnu.org Content-Type: multipart/mixed; boundary="000000000000988ae3063d61c4a8" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 79269 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --000000000000988ae3063d61c4a8 Content-Type: multipart/alternative; boundary="000000000000988ae1063d61c4a6" --000000000000988ae1063d61c4a6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Thanks for trying to fix this, but it seems there's still an issue. In the attached test.pl, the indent is off. Can you take a look? On Fri, Aug 22, 2025 at 8:12=E2=80=AFAM GNU bug Tracking System < help-debbugs@gnu.org> wrote: > Your bug report > > #79269: 30.1; cperl-mode does not handle signatures correctly > > which was filed against the emacs package, has been closed. > > The explanation is attached below, along with your original report. > If you require more details, please reply to 79269@debbugs.gnu.org. > > -- > 79269: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D79269 > GNU Bug Tracking System > Contact help-debbugs@gnu.org with problems > > > > ---------- Forwarded message ---------- > From: "Harald J=C3=B6rg" > To: 79269-done@debbugs.gnu.org > Cc: > Bcc: > Date: Fri, 22 Aug 2025 12:11:44 +0000 > Subject: Indentation and fontification of signatures fixed > Both parts of the bug report (thanks for the excellent recipe) have now > been fixed in the "master" branch, tests have been added using the > example code from the report. > -- > Cheers, > haj > > > > > ---------- Forwarded message ---------- > From: John Ciolfi > To: > Cc: > Bcc: > Date: Tue, 19 Aug 2025 12:05:37 -0400 > Subject: 30.1; cperl-mode does not handle signatures correctly > > 1. In a temporary directory, say ~/tmp/, get latest cperl-mode.el from > > https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/cperl-mo= de.el > I used the Jul-28-2025 version > > https://github.com/emacs-mirror/emacs/blob/cef4302d309e26c2191821ba998518= fb89fff54e/lisp/progmodes/cperl-mode.el > > 2. cd ~/tmp > > 3. emacs -Q -L . # Using emacs 30.1 > > 4. M-x byte-compile-file RET cperl-mode.el RET > > 5. C-x C-f foo.pl > > C-x h # select all of foo.pl > C-M-\ # indent foo.pl > > Here's the indented foo.pl. Notice that there are a couple problems > which appears to be due to the incorrect handling of perl signatures. > Note, perl-mode.el seems to handle signatures correctly, so maybe that > code can be borrowed for cperl-mode.el? > > > # -*- mode: cperl -*- > use strict; > use warnings; > use experimental 'signatures'; > > foo(1); > > sub foo ( > $in1, > $optionsHPtr =3D {}, > $otherOption1 =3D 1, # Bug: wrong face for this option > ) { > > my $a =3D 1; # Bug: should be indented by 2 spaces > > # Bug: following are not indented due to use of signatures > my $b =3D 2; > return $a + $b + $in1; > } > > > > In GNU Emacs 30.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, > cairo version 1.16.0) of 2025-04-04, modified by Debian built on sbuild > Windowing system distributor 'The X.Org Foundation', version 11.0.1210100= 6 > System Description: Debian GNU/Linux 12 (bookworm) > > Configured using: > 'configure --build x86_64-linux-gnu --prefix=3D/usr > --sharedstatedir=3D/var/lib --libexecdir=3D/usr/libexec > --localstatedir=3D/var/lib --infodir=3D/usr/share/info > --mandir=3D/usr/share/man --with-libsystemd --with-pop=3Dyes > > --enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/30.1/site-lis= p:/usr/local/share/emacs/site-lisp:/usr/share/emacs/30.1/site-lisp:/usr/sha= re/emacs/site-lisp > --with-sound=3Dalsa --without-gconf --with-mailutils --build > x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib > --libexecdir=3D/usr/libexec --localstatedir=3D/var/lib > --infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-libsystemd > --with-pop=3Dyes > > --enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/30.1/site-lis= p:/usr/local/share/emacs/site-lisp:/usr/share/emacs/30.1/site-lisp:/usr/sha= re/emacs/site-lisp > --with-sound=3Dalsa --without-gconf --with-mailutils --with-cairo > --with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-toolkit-scroll-bars > 'CFLAGS=3D-g -O2 > -ffile-prefix-map=3D/build/reproducible-path/emacs-30.1+1=3D. > -fstack-protector-strong > -Wformat -Werror=3Dformat-security -Wall' 'CPPFLAGS=3D-Wdate-time > -D_FORTIFY_SOURCE=3D2' LDFLAGS=3D-Wl,-z,relro' > > Configured features: > ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG > LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP > NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF > TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB > > Important settings: > value of $LANG: en_US.UTF-8 > locale-coding-system: utf-8-unix > > Major mode: CPerl > > Minor modes in effect: > tooltip-mode: t > global-eldoc-mode: t > show-paren-mode: t > electric-indent-mode: t > mouse-wheel-mode: t > tool-bar-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > font-lock-mode: t > blink-cursor-mode: t > minibuffer-regexp-mode: t > line-number-mode: t > indent-tabs-mode: t > transient-mark-mode: t > auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > > Load-path shadows: > /home/ciolfi/tmp/cperl-mode hides > /usr/share/emacs/30.1/lisp/progmodes/cperl-mode > > Features: > (shadow sort mail-extr emacsbug message mailcap yank-media puny dired > dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 > epg-config gnus-util time-date mm-decode mm-bodies mm-encode mail-parse > rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail > rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils compile > text-property-search comint subr-x ansi-osc ansi-color ring comp-run > bytecomp byte-compile comp-common cperl-mode rx facemenu rmc iso-transl > tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks > lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd > touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list > replace newcomment text-mode lisp-mode prog-mode register page tab-bar > menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse > jit-lock font-lock syntax font-core term/tty-colors frame minibuffer > nadvice seq simple cl-generic indonesian philippine cham georgian > utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean > japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european > ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop > case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure > cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp > files window text-properties overlay sha1 md5 base64 format env > code-pages mule custom widget keymap hashtable-print-readable backquote > threads dbusbind inotify lcms2 dynamic-setting system-font-setting > font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar > make-network-process native-compile emacs) > > Memory information: > ((conses 16 84401 12096) (symbols 48 7366 0) (strings 32 20464 1856) > (string-bytes 1 700197) (vectors 16 11848) > (vector-slots 8 163636 10525) (floats 8 26 34) (intervals 56 418 0) > (buffers 992 12)) > > > --000000000000988ae1063d61c4a6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

Thanks for trying to fix this, but i= t seems there's still an issue. In the attached test.pl, the indent is off. Can you take a look?



On Fri, Aug 22, 2025 at 8:12=E2=80= =AFAM GNU bug Tracking System <h= elp-debbugs@gnu.org> wrote:
Your bug report

#79269: 30.1; cperl-mode does not handle signatures correctly

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 79269@debbugs.gnu.org.

--
79269: https://debbugs.gnu.org/cgi/bugreport.cg= i?bug=3D79269
GNU Bug Tracking System
Contact help-debb= ugs@gnu.org with problems



---------- Forwarded message ----------
From:=C2=A0"Har= ald J=C3=B6rg" <= haj@posteo.de>
To:=C2=A079269-done@debbugs.gnu.org
Cc:=C2=A0
Bcc:= =C2=A0
Date:=C2=A0Fri, 22 Aug 2025 12:11:44 +0000
Subject:=C2=A0Inden= tation and fontification of signatures fixed
Both parts of the bug repor= t (thanks for the excellent recipe) have now
been fixed in the "master" branch, tests have been added using th= e
example code from the report.
--
Cheers,
haj




---------- Forwarded message ----------
From:=C2=A0John Ciol= fi <john.c= iolfi.32@gmail.com>
To:=C2=A0<bug-gnu-emacs@gnu.org>
Cc:=C2=A0
Bc= c:=C2=A0
Date:=C2=A0Tue, 19 Aug 2025 12:05:37 -0400
Subject:=C2=A030.= 1; cperl-mode does not handle signatures correctly

1. In a temporary directory, say ~/tmp/, get latest cperl-mode.el from
=C2=A0 =C2=A0https://g= ithub.com/emacs-mirror/emacs/blob/master/lisp/progmodes/cperl-mode.el =C2=A0 =C2=A0I used the Jul-28-2025 version
=C2=A0 =C2=A0https://github.com/emacs-mirror/emacs/blob/cef4302= d309e26c2191821ba998518fb89fff54e/lisp/progmodes/cperl-mode.el

2. cd ~/tmp

3. emacs -Q -L .=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# Using emacs 30.1=

4. M-x byte-compile-file RET cperl-mode.el RET

5. C-x C-f f= oo.pl

=C2=A0 =C2=A0C-x h=C2=A0 =C2=A0# select all of foo.pl
=C2=A0 =C2=A0C-M-\=C2=A0 =C2=A0# indent foo.pl

Here's the indented foo.pl. Notice that there are a couple problems
which appears to be due to the incorrect handling of perl signatures.
Note, perl-mode.el seems to handle signatures correctly, so maybe that
code can be borrowed for cperl-mode.el?


# -*- mode: cperl -*-
use strict;
use warnings;
use experimental 'signatures';

foo(1);

sub foo (
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$in1,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$optionsHPtr =3D {},
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$otherOption1 =3D 1,=C2=A0 =C2=A0 =C2=A0#= Bug: wrong face for this option
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ) {

=C2=A0 =C2=A0my $a =3D 1;=C2=A0 # Bug: should be indented by 2 spaces

=C2=A0# Bug: following are not indented due to use of signatures
=C2=A0my $b =3D 2;
=C2=A0return $a + $b + $in1;
}



In GNU Emacs 30.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38,
=C2=A0cairo version 1.16.0) of 2025-04-04, modified by Debian built on sbui= ld
Windowing system distributor 'The X.Org Foundation', version 11.0.1= 2101006
System Description: Debian GNU/Linux 12 (bookworm)

Configured using:
=C2=A0'configure --build x86_64-linux-gnu --prefix=3D/usr
=C2=A0--sharedstatedir=3D/var/lib --libexecdir=3D/usr/libexec
=C2=A0--localstatedir=3D/var/lib --infodir=3D/usr/share/info
=C2=A0--mandir=3D/usr/share/man --with-libsystemd --with-pop=3Dyes
=C2=A0--enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/30.1/site-= lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/30.1/site-lisp:/usr/= share/emacs/site-lisp
=C2=A0--with-sound=3Dalsa --without-gconf --with-mailutils --build
=C2=A0x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib
=C2=A0--libexecdir=3D/usr/libexec --localstatedir=3D/var/lib
=C2=A0--infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-libsyste= md
=C2=A0--with-pop=3Dyes
=C2=A0--enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/30.1/site-= lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/30.1/site-lisp:/usr/= share/emacs/site-lisp
=C2=A0--with-sound=3Dalsa --without-gconf --with-mailutils --with-cairo
=C2=A0--with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-toolkit-scroll-bars
=C2=A0'CFLAGS=3D-g -O2
=C2=A0-ffile-prefix-map=3D/build/reproducible-path/emacs-30.1+1=3D. -fstack= -protector-strong
=C2=A0-Wformat -Werror=3Dformat-security -Wall' 'CPPFLAGS=3D-Wdate-= time
=C2=A0-D_FORTIFY_SOURCE=3D2' LDFLAGS=3D-Wl,-z,relro'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP
NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
=C2=A0 value of $LANG: en_US.UTF-8
=C2=A0 locale-coding-system: utf-8-unix

Major mode: CPerl

Minor modes in effect:
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 show-paren-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode: t
=C2=A0 minibuffer-regexp-mode: t
=C2=A0 line-number-mode: t
=C2=A0 indent-tabs-mode: t
=C2=A0 transient-mark-mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-compression-mode: t

Load-path shadows:
/home/ciolfi/tmp/cperl-mode hides /usr/share/emacs/30.1/lisp/progmodes/cper= l-mode

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util time-date mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils compile
text-property-search comint subr-x ansi-osc ansi-color ring comp-run
bytecomp byte-compile comp-common cperl-mode rx facemenu rmc iso-transl
tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar
menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse
jit-lock font-lock syntax font-core term/tty-colors frame minibuffer
nadvice seq simple cl-generic indonesian philippine cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar make-network-process native-compile emacs)

Memory information:
((conses 16 84401 12096) (symbols 48 7366 0) (strings 32 20464 1856)
=C2=A0(string-bytes 1 700197) (vectors 16 11848)
=C2=A0(vector-slots 8 163636 10525) (floats 8 26 34) (intervals 56 418 0) =C2=A0(buffers 992 12))


--000000000000988ae1063d61c4a6-- --000000000000988ae3063d61c4a8 Content-Type: application/x-perl; name="test.pl" Content-Disposition: attachment; filename="test.pl" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_meungtj80 dXNlIHN0cmljdDsKdXNlIHdhcm5pbmdzOwoKdXNlIGV4cGVyaW1lbnRhbCAnc2lnbmF0dXJlcyc7 CgpNYWluKCk7CgpzdWIgRnVuY3Rpb25XaXRoTXVsdGlMaW5lU2lnbmF0dXJlczEgKAogICAgJHVz ZXJUb01hdGNoLCAkbmFtZVJFLAogICAgJG9wdGlvbnNIUHRyID0ge30sCiAgICAkb3RoZXJPcHRp b24xID0gMSwKICAgICRvdGhlck9wdGlvbjIgPSAxLAogICAgJG90aGVyT3B0aW9uMyA9IDEsCiAg ICAkb3RoZXJPcHRpb240ID0gMQogICAgKSB7CgogICAgIyBGaXJzdCBsaW5lIGluZGVudGVkIGNv cnJlY3RseSwgbGF0ZXIgbGluZXMgYXJlIG91dC1kZW50ZWQKICAgIG15ICVkZWZhdWx0T3B0aW9u cyA9IChvcHRBID0+IDEsIG9wdEIgPT4gdW5kZWYpOwogICAgbXkgJW9wdGlvbnMgICAgICAgID0g KCVkZWZhdWx0T3B0aW9ucywgZGVmaW5lZCAkb3B0aW9uc0hQdHIgPyAlJG9wdGlvbnNIUHRyIDog KCkpOwogICAgcmV0dXJuOwp9CgogICAgc3ViIEZ1bmN0aW9uV2l0aE11bHRpTGluZVNpZ25hdHVy ZXMyICgkdXNlclRvTWF0Y2gsICRuYW1lUkUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICRvcHRpb25zSFB0ciA9IHt9LAogICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAkb3RoZXJPcHRpb24xID0gMSwKICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJG90aGVyT3B0aW9uMiA9IDEsCiAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICRvdGhlck9wdGlvbjMgPSAxLAogICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkb3RoZXJPcHRpb240ID0gMSwKICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7CgogICAgICAgICMgRmlyc3QgbGlu ZSBpbmRlbnRlZCBjb3JyZWN0bHksIGxhdGVyIGxpbmVzIGFyZSBvdXQtZGVudGVkCiAgICAgICAg bXkgJWRlZmF1bHRPcHRpb25zID0gKG9wdEEgPT4gMSwgb3B0QiA9PiB1bmRlZik7CiAgICAgICAg bXkgJW9wdGlvbnMgICAgICAgID0gKCVkZWZhdWx0T3B0aW9ucywgZGVmaW5lZCAkb3B0aW9uc0hQ dHIgPyAlJG9wdGlvbnNIUHRyIDogKCkpOwogICAgICAgIHJldHVybjsKICAgIH0KCiAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1YiBNYWluIHsKICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZ1bmN0aW9uV2l0aE11bHRpTGluZVNp Z25hdHVyZXMxKCJmb28iLCBxci9eW2Etel0rJC8sIHtvcHRBID0+IDEsIG9wdEI9PjJ9LAogICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgMSwgMiwgMywgNCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBGdW5jdGlvbldpdGhNdWx0aUxpbmVTaWduYXR1cmVzMigiZm9v IiwgcXIvXlthLXpdKyQvLCB7YSA9PiAxLCBiPT4yfSwKICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEs IDIsIDMsIDQpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ZXhpdCAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ICMgZW5k IE1haW4K --000000000000988ae3063d61c4a8-- From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 28 01:54:19 2025 Received: (at 79269) by debbugs.gnu.org; 28 Aug 2025 05:54:19 +0000 Received: from localhost ([127.0.0.1]:37977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1urVaU-0004X4-DQ for submit@debbugs.gnu.org; Thu, 28 Aug 2025 01:54:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45802) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1urVaR-0004Vw-U2 for 79269@debbugs.gnu.org; Thu, 28 Aug 2025 01:54:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1urVaM-0008S8-Et; Thu, 28 Aug 2025 01:54:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=4ek6Xgt9eRvTXfoLkpB1iQ6+YRJLqJMRVLbRJOq5k3E=; b=IYw2dkH8bjP6MXHfazwZ FCpvYSg6CnvFvUpTUcBiSW1/Kq6a8aePfRkhwuemQmJDvCWIOpqf3Y53DatlxHt0sRfYM3g9q8vkQ 7BNzYIwQqSnnfnxBe6JxbrcYk3mDtfYMubOgLrguwoMoZ84ipFJUzelDNgWbRjZZ0L14GOr4jJI90 ISwn9h3hxaV0lz5AoIj9buSunFiSVcfqz0w16Hni4W8Nn3TJhp8ryt48dubI8BN40CthiceMadtYQ PgOf8urITDn5JXkKxsaxkrzWdjG0AxR5CHud73uqwHKj/O/epIzYFH763a7k4GxRmIg5WN4CMA7Sw /If7zgFW5RmJhQ==; Date: Thu, 28 Aug 2025 08:54:07 +0300 Message-Id: <864itst2io.fsf@gnu.org> From: Eli Zaretskii To: John C , =?utf-8?Q?Harald_J=C3=B6rg?= In-Reply-To: (message from John C on Wed, 27 Aug 2025 20:12:48 -0400) Subject: Re: bug#79269: Indentation and fontification of signatures fixed References: <87o6s7wo74.fsf@oook.m.uunet.de> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79269 Cc: 79269@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: John C > Date: Wed, 27 Aug 2025 20:12:48 -0400 > > Thanks for trying to fix this, but it seems there's still an issue. In the attached test.pl, the indent is off. Can > you take a look? Please always CC the author of the fix on the followup messages. Many people do not subscribe to the bug list, so they don't see your responses otherwise. Harald, could you please look into this?