From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Darren Embry Newsgroups: gmane.emacs.bugs Subject: bug#28640: 25.2; cperl-mode indentation after package BLOCKs Date: Fri, 29 Sep 2017 00:37:00 -0400 Message-ID: <86zi9ece8j.fsf@barnacle2.webonastick.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1506659838 21258 195.159.176.226 (29 Sep 2017 04:37:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 29 Sep 2017 04:37:18 +0000 (UTC) To: 28640@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 29 06:37:14 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxn2z-0004i5-B7 for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Sep 2017 06:37:09 +0200 Original-Received: from localhost ([::1]:33683 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxn36-000070-Rh for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Sep 2017 00:37:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxn2w-0008Ud-2W for bug-gnu-emacs@gnu.org; Fri, 29 Sep 2017 00:37:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxn2s-0004Ng-O2 for bug-gnu-emacs@gnu.org; Fri, 29 Sep 2017 00:37:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56934) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dxn2s-0004NY-Kr for bug-gnu-emacs@gnu.org; Fri, 29 Sep 2017 00:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dxn2s-0007Pc-BX for bug-gnu-emacs@gnu.org; Fri, 29 Sep 2017 00:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Darren Embry Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Sep 2017 04:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28640 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.150665977928440 (code B ref -1); Fri, 29 Sep 2017 04:37:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Sep 2017 04:36:19 +0000 Original-Received: from localhost ([127.0.0.1]:37382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxn2A-0007Oe-Lp for submit@debbugs.gnu.org; Fri, 29 Sep 2017 00:36:18 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxn29-0007OR-84 for submit@debbugs.gnu.org; Fri, 29 Sep 2017 00:36:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxn22-0003cg-P1 for submit@debbugs.gnu.org; Fri, 29 Sep 2017 00:36:11 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:45991) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dxn22-0003cY-MO for submit@debbugs.gnu.org; Fri, 29 Sep 2017 00:36:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43430) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxn21-000885-4P for bug-gnu-emacs@gnu.org; Fri, 29 Sep 2017 00:36:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxn1y-0003ZD-0p for bug-gnu-emacs@gnu.org; Fri, 29 Sep 2017 00:36:09 -0400 Original-Received: from barnacle2.webonastick.com ([52.71.72.97]:39176 helo=barnacle2) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxn1x-0003Ya-S3 for bug-gnu-emacs@gnu.org; Fri, 29 Sep 2017 00:36:05 -0400 Original-Received: by barnacle2 (Postfix, from userid 1001) id A7D4EC011B; Fri, 29 Sep 2017 00:37:00 -0400 (EDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:137557 Archived-At: Hello GNU Emacs developers, I'm getting the following automatic indentation in cperl-mode for a script containing more than one BLOCK: #!/usr/bin/env perl use warnings; use strict; package Foo { use Moose; } package Bar { use Moose; } # Local Variables: # mode: cperl # End: Package BLOCKs were created in Perl 5.14 as an alternative syntax that only applies the specified namespace to a BLOCK: https://www.perl.com/pub/2011/05/new-features-of-perl-514-package-block= .html Obviously the second package BLOCK in my opinion should be indented the same as the first: package Foo { use Moose; } package Bar { use Moose; } With opening braces on their own lines, auto-indentation becomes a little bit weirder: #!/usr/bin/env perl use warnings; use strict; package Foo { use Moose; } package Bar { use Moose; } # Local Variables: # mode: cperl # End: My present workaround is to append a ; to every package BLOCK: package Foo { use Moose; }; I've also discovered another workaround: change the value of `cperl-continued-statement-offset' to 0. That may help guide you to what cperl-mode thinks is going on, as well as where to look for and/or fix the problem. Thanks, Darren In GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu) of 2017-08-03 built on barnacle2.webonastick.com System Description: Ubuntu 14.04.4 LTS Configured using: 'configure --prefix=3D/usr/local' Configured features: SOUND NOTIFY 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 electric-indent-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. next-line: End of buffer Saving file /home/dse/foo.pl... Wrote /home/dse/foo.pl You can run the command =E2=80=98normal-mode=E2=80=99 with M-x nor-m RET Mark set [3 times] Quit Saving file /home/dse/foo.pl... Wrote /home/dse/foo.pl Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode cl-loaddefs pcase cl-lib mail-prsvr mail-utils cperl-mode easymenu perl-mode regexp-opt term/xterm xterm time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select mouse jit-lock font-lock syntax facemenu font-core frame cl-generic 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 charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote inotify multi-tty make-network-process emacs) Memory information: ((conses 16 90853 5234) (symbols 48 19556 0) (miscs 40 49 124) (strings 32 16289 5349) (string-bytes 1 483067) (vectors 16 10278) (vector-slots 8 392683 13537) (floats 8 147 274) (intervals 56 222 23) (buffers 976 19) (heap 1024 26088 633))