From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: avarab@gmail.com (=?UTF-8?Q?=C3=86var_?= =?UTF-8?Q?Arnfj=C3=B6r=C3=B0?= Bjarmason) Newsgroups: gmane.emacs.bugs Subject: bug#18985: 24.3; cperl-mode misindents hash keys that start with an auto-quoted keyword Date: Fri, 07 Nov 2014 10:24:13 +0000 Message-ID: <878ujns3zm.fsf@u.nix.is> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1415378700 16349 80.91.229.3 (7 Nov 2014 16:45:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Nov 2014 16:45:00 +0000 (UTC) To: 18985@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 07 17:44:53 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xmmea-0000m6-Ob for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Nov 2014 17:44:52 +0100 Original-Received: from localhost ([::1]:32800 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xmmea-0001Ek-ET for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Nov 2014 11:44:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56843) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xmmdv-0000Xm-8T for bug-gnu-emacs@gnu.org; Fri, 07 Nov 2014 11:44:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xmmdm-0002DC-62 for bug-gnu-emacs@gnu.org; Fri, 07 Nov 2014 11:44:11 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xmmdm-0002D6-3f for bug-gnu-emacs@gnu.org; Fri, 07 Nov 2014 11:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xmmdl-0001Se-Ph for bug-gnu-emacs@gnu.org; Fri, 07 Nov 2014 11:44:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: avarab@gmail.com (=?UTF-8?Q?=C3=86var_?= =?UTF-8?Q?Arnfj=C3=B6r=C3=B0?= Bjarmason) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 Nov 2014 16:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18985 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.14153786045517 (code B ref -1); Fri, 07 Nov 2014 16:44:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Nov 2014 16:43:24 +0000 Original-Received: from localhost ([127.0.0.1]:53073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XmmdA-0001Qs-1x for submit@debbugs.gnu.org; Fri, 07 Nov 2014 11:43:24 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:47000) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xmgif-0007HF-Vk for submit@debbugs.gnu.org; Fri, 07 Nov 2014 05:24:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XmgiW-0005ms-Pe for submit@debbugs.gnu.org; Fri, 07 Nov 2014 05:24:41 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:34002) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmgiW-0005ml-Mh for submit@debbugs.gnu.org; Fri, 07 Nov 2014 05:24:32 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmgiQ-00083j-Bl for bug-gnu-emacs@gnu.org; Fri, 07 Nov 2014 05:24:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XmgiJ-0005ji-B8 for bug-gnu-emacs@gnu.org; Fri, 07 Nov 2014 05:24:26 -0500 Original-Received: from u.nix.is ([5.9.157.150]:47628) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmgiJ-0005im-4v for bug-gnu-emacs@gnu.org; Fri, 07 Nov 2014 05:24:19 -0500 Original-Received: from u.nix.is (localhost [127.0.0.1]) by u.nix.is (Postfix) with ESMTP id 5998016A655E for ; Fri, 7 Nov 2014 10:24:17 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Fri, 07 Nov 2014 11:43:22 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:95676 cperl-mode has a nasty bug in M-x indent-region, if you write this to a file: my %x = ( for_me => "cookie", ); And indent it you end up with: my %x = ( for _me => "cookie", ); Note the space between the "for" and "_me", the indenter falsely thought that "for" was a keyword and suffixed it with a space, changing the semantics of the code. The same issue happens with some other keywords, e.g. "if" and "until", but interestingly not "unless". In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu) of 2014-09-08 on binet, modified by Debian System Description: Debian GNU/Linux testing (jessie) Configured using: `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=no' '--without-gconf' '--without-gsettings' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall' 'LDFLAGS=-Wl,-z,relro' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' Important settings: value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: CPerl Minor modes in effect: 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 input: C-@ C-x h C-w i f SPC ( DEL DEL DEL DEL f o r _ m e SPC = > SPC " c o o k i e " ; DEL , C-a C-@ C-e ESC x i n d e n t - r e g TAB RET ESC x c p e r l - m o d e RET C-a C-p RET C-p m y SPC % x SPC = SPC ( C-n TAB C-e RET ) TAB ; C-@ C-p C-p C-a ESC x i n d e n t - r e g TAB RET C-_ C-@ C-n C-g C-@ C-p C-p C-a ESC w C-x b C-g ESC x r e p o r t - e m a TAB RET Recent messages: Mark set [3 times] Mark activated You can run the command `indent-region' with C-M-\ byte-code: Beginning of buffer End of `mf ... f' string/RE not found: (scan-error Unbalanced parentheses 3 22) Mark set Undo! Mark set Quit Mark set Quit Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail regexp-opt rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cperl-mode easymenu time-date ediff-hook vc-hooks lisp-float-type tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind multi-tty emacs)