From unknown Fri Jun 20 07:21:33 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#21647 <21647@debbugs.gnu.org> To: bug#21647 <21647@debbugs.gnu.org> Subject: Status: 24.5; Perl-mode indenting fooled by ...=cut region Reply-To: bug#21647 <21647@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:21:33 +0000 retitle 21647 24.5; Perl-mode indenting fooled by ...=3Dcut region reassign 21647 emacs submitter 21647 =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson severity 21647 minor tag 21647 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 08 09:12:53 2015 Received: (at submit) by debbugs.gnu.org; 8 Oct 2015 13:12:53 +0000 Received: from localhost ([127.0.0.1]:59948 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkB09-0005cF-Ac for submit@debbugs.gnu.org; Thu, 08 Oct 2015 09:12:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44368) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkB06-0005c6-Tr for submit@debbugs.gnu.org; Thu, 08 Oct 2015 09:12:51 -0400 Received: from lists.gnu.org ([208.118.235.17]:45333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkB06-0007xN-Dz for submit@debbugs.gnu.org; Thu, 08 Oct 2015 09:12:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54323) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkB05-0002NW-GS for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 09:12:50 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkB01-0007kf-Cd for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 09:12:49 -0400 Received: from homie.mail.dreamhost.com ([208.97.132.208]:54279 helo=homiemail-a2.g.dreamhost.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkB01-0006YD-5Z for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 09:12:45 -0400 Received: from homiemail-a2.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a2.g.dreamhost.com (Postfix) with ESMTP id C44D5280072 for ; Thu, 8 Oct 2015 06:12:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to :subject:date:message-id:mime-version:content-type; s= jidanni.org; bh=ZpPd8zLiSI7ez/r3OsqRnvRQZdw=; b=BKUzCCzWgH6ip8Er 0HpBWaFx1zcOdZEH+rjg3eluXAE75V4gmXXFFcumld9geG8wIKAI1MoYNT70/L3c KZzEJderOuHpWmaymrKP7ppaQgd66L35xeTChitA/LcPnlBjrza/p/Xt3f53Xkac wVNzuRpIBClcmHIKBQQboHrVf9o= Received: from jidanni.org (111-246-87-245.dynamic.hinet.net [111.246.87.245]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a2.g.dreamhost.com (Postfix) with ESMTPSA id 86EFA280069 for ; Thu, 8 Oct 2015 06:12:06 -0700 (PDT) From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson To: bug-gnu-emacs@gnu.org Subject: 24.5; Perl-mode indenting fooled by ...=cut region Date: Thu, 08 Oct 2015 21:12:02 +0800 Message-ID: <87612ho671.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.97.132.208 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -5.0 (-----) Perl-mode indents the %Y wrong, if %X is commented. If %X is uncommented, then both will be indented correctly. if ( $ARGV[0] eq "TAIWAN" ) { # my %X; =zz my %points = ( A => [ 25.08, 120.61 ], B => [ 25.08, 121.40 ], ); use constant TAIWAN_MAP => ' _aBC _dEF _GH_ jKL_ MNO_ pQR_ _Tu_ _vW'; =cut my %Y; } In GNU Emacs 24.5.1 (i586-pc-linux-gnu, GTK+ Version 3.16.6) of 2015-09-21 on binet, modified by Debian From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 14 18:05:21 2015 Received: (at 21647) by debbugs.gnu.org; 14 Oct 2015 22:05:21 +0000 Received: from localhost ([127.0.0.1]:51227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZmUAi-0001fC-Pu for submit@debbugs.gnu.org; Wed, 14 Oct 2015 18:05:21 -0400 Received: from r0.smtpout1.alwaysdata.com ([176.31.58.0]:58557) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZmUAf-0001f0-Rf for 21647@debbugs.gnu.org; Wed, 14 Oct 2015 18:05:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alwaysdata.net; s=ryuslash; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=NeBEB9Hl/cKRzq+uwnEhWrnP+fPMrJgwvS6OC149w74=; b=VdGFOQd8tYezjv+kbztOZ2OelsJsRAOi6JiTbe2qWjwBABmPiGdgLRyY6YZU0vGm5RgbqW0Kg2xtHE5OQB8VYhLYAavr946OevYMjaAsy973j2fx4E+h6XFWARFstU7qvY9xEW4Kcaz1DyiAILACFqyOId/3IkZrAHjPuDaZqPk=; Received: from [2a02:1812:2518:ce00:f24d:a2ff:fede:451c] (helo=localhost) by smtpout1.roubaix1.alwaysdata.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1ZmUAX-00013M-60 for 21647@debbugs.gnu.org; Thu, 15 Oct 2015 00:05:09 +0200 From: Tom Willemse To: 21647@debbugs.gnu.org Subject: [Patch] Don't let perl indentation get fooled by =cut Date: Thu, 15 Oct 2015 00:05:07 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-alwaysdata-ID: 101307468 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21647 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) --=-=-= Content-Type: text/plain Hey, The attached patch fixes indentation for the situation described above in the master branch. Cheers, Tom --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Fix-indenting-in-perl-functions-with-doc-comments.patch Content-Description: Fix perl indentation >From f9296dc710998577434959f7d5af30792cb2df26 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 12 Oct 2015 00:45:49 +0200 Subject: [PATCH] Fix indenting in perl functions with doc-comments * lisp/progmodes/perl-mode.el (perl-calculate-indent): Skip doc-comments as well as comments and skip the entire comment, not just the line. --- lisp/progmodes/perl-mode.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 55d69bf..b4d7127 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -946,8 +946,8 @@ Returns (parse-state) if line starts inside a string." ;; Skip over comments and labels following openbrace. (while (progn (skip-chars-forward " \t\f\n") - (cond ((looking-at ";?#") - (forward-line 1) t) + (cond ((looking-at ";?#\\|^=\\w+") + (forward-comment 1) t) ((looking-at "\\(\\w\\|\\s_\\)+:[^:]") (setq colon-line-end (line-end-position)) (search-forward ":"))))) -- 2.6.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 05 23:32:57 2019 Received: (at control) by debbugs.gnu.org; 6 Jul 2019 03:32:57 +0000 Received: from localhost ([127.0.0.1]:54074 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjbRY-000098-NR for submit@debbugs.gnu.org; Fri, 05 Jul 2019 23:32:56 -0400 Received: from mail-wm1-f50.google.com ([209.85.128.50]:37692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjbRW-00008u-Aq for control@debbugs.gnu.org; Fri, 05 Jul 2019 23:32:54 -0400 Received: by mail-wm1-f50.google.com with SMTP id f17so11354516wme.2 for ; Fri, 05 Jul 2019 20:32:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=g6hsoiBXBxb4Fl1oPCxufwvaBTm3fR8OqfNe3/j7Nbo=; b=oA4oDIrMxrRFEhEoYOuqfKamXBpVevjrH2LeWSQASac3FE6kCvjpvPg3BkJEMU3TEf rBqqTrOfeeQ+DC3UhzChklR67AjV14lLL3rWyJr+quddF0DSyTKoDhxh5E5eqLba6nDu LyR+6xWnM6lu8+0km8PKQbFfxkFDLsO9iHAUbAu/SiMXzMSPuYYMSvtilW5Y0PYEkzJ0 bd05c75IW82JtwqGWEunKujcEiECkouZGrvnL32ybyAT4IOfHBPk0jkDygeN45mKpqvY FK4K4LFOm2SuZ5EfoivWo6ziBXFw9aC6cbVKekB0NKtyROMD7SVLU69UM9axWe2sNgM0 pUJA== X-Gm-Message-State: APjAAAXa30BF50ml8kf6yxk4Xj8rW7lqE3VNWRdwdTZ4BDVRuHYyzq7U Jox92/lqMHu5f4l+RVx9yXkoVkRffC5PCchKCDZLUg== X-Google-Smtp-Source: APXvYqw2vLVznYBkh6lp18+bu8IfnnUpXMMClwy0moW53NEx4YYXuFc69sFPkjf1ONjlDsTcAvHCZJUpH0CQq2urkRQ= X-Received: by 2002:a1c:f515:: with SMTP id t21mr5913268wmh.39.1562383968142; Fri, 05 Jul 2019 20:32:48 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Sat, 6 Jul 2019 05:32:37 +0200 Message-ID: Subject: bug#21647: [Patch] Don't let perl indentation get fooled by =cut To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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 (-) tags 21647 + patch quit From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 29 18:11:50 2019 Received: (at 21647) by debbugs.gnu.org; 29 Sep 2019 22:11:50 +0000 Received: from localhost ([127.0.0.1]:55994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEhPy-0006Sf-6B for submit@debbugs.gnu.org; Sun, 29 Sep 2019 18:11:50 -0400 Received: from mail-pl1-f182.google.com ([209.85.214.182]:34253) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEhPv-0006SG-K1 for 21647@debbugs.gnu.org; Sun, 29 Sep 2019 18:11:48 -0400 Received: by mail-pl1-f182.google.com with SMTP id k7so3111573pll.1 for <21647@debbugs.gnu.org>; Sun, 29 Sep 2019 15:11:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=0wYaaA9DR+iD104lmvhS01O6tJIrXDHPq0qZWCkH3ls=; b=BSaXJyz5UEY+ayz+GaE3854XgvDhEasVL43O5jpf1JXW28aMK1MQX2A+LuHTkW7p4C mBA+TZL1zdN1WRJfI1dyDI5ajBRWrmx1dWRrlWh7a1ndXliUhg15ZOHrM+7BldQYrtDa Ht/6M1blv5f45Lp0eQ5yVo7/DML/99pZ+4RmzXlMQWWbHwoD0c5kku6goo2Dvk/cW4wp UoPxQjrNreLRAoIe2PN0WOt9Jjsgdw+G++uYOie9i2GwNUX+kIZsI0CBCsTcGIyzqHjw B1f0hck/nZ4vtV8McCvF51YYUKKZ5VRy/dEFghwiFUsWFOfOpjGR6cckFzQ+gXziovdS bIxg== X-Gm-Message-State: APjAAAW4AXuIRLHN6q1jb3tJulJC4ngYTSNbh/W7xShkcyfRcaAj1Gvn 6jwtUUxLq/nyUN13GRiMNJ3SP9QcwRng6kjqqw8= X-Google-Smtp-Source: APXvYqy2fyZQYyPu0mlQXH+Fc3qXGZnNEVq2IVdRqpIg2tYH+wEdSQdZDjKl3GE6dmxHlKcZVficjCYG9SIXzm6cLFo= X-Received: by 2002:a17:902:a515:: with SMTP id s21mr17505040plq.259.1569795101802; Sun, 29 Sep 2019 15:11:41 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Mon, 30 Sep 2019 00:11:30 +0200 Message-ID: Subject: Re: bug#21647: [Patch] Don't let perl indentation get fooled by =cut To: Tom Willemse Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21647 Cc: 21647@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: -1.0 (-) close 21647 27.1 thanks Tom Willemse writes: > Hey, > > The attached patch fixes indentation for the situation described above > in the master branch. Thanks. The patch looks reasonable to me, and also fixes the reported problem. I've therefore pushed it to master, and I'm closing this bug report. Best regards, Stefan Kangas From unknown Fri Jun 20 07:21:33 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 28 Oct 2019 11:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator