From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: twb@cyber.com.au (Trent W. Buck) Newsgroups: gmane.emacs.bugs Subject: bug#11582: 23.4; sh indentation wrong for main() function Date: Tue, 29 May 2012 17:07:33 +1000 Message-ID: <7czk8rwjm2.fsf@twb.cyber.com.au> NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1338341090 5558 80.91.229.3 (30 May 2012 01:24:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 30 May 2012 01:24:50 +0000 (UTC) To: 11582@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 30 03:24:49 2012 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 1SZXeX-0002hd-Ok for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 May 2012 03:24:45 +0200 Original-Received: from localhost ([::1]:56152 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZXeX-0005Xv-D7 for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 May 2012 21:24:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZXeT-0005SO-HR for bug-gnu-emacs@gnu.org; Tue, 29 May 2012 21:24:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SZXeQ-0001iq-D7 for bug-gnu-emacs@gnu.org; Tue, 29 May 2012 21:24:41 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39437) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZXeQ-0001ig-9G for bug-gnu-emacs@gnu.org; Tue, 29 May 2012 21:24:38 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SZXfn-0006Qb-Px for bug-gnu-emacs@gnu.org; Tue, 29 May 2012 21:26:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: twb@cyber.com.au (Trent W. Buck) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 May 2012 01:26:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11582 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.133834111124611 (code B ref -1); Wed, 30 May 2012 01:26:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 May 2012 01:25:11 +0000 Original-Received: from localhost ([127.0.0.1]:48975 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SZXeu-0006On-RU for submit@debbugs.gnu.org; Tue, 29 May 2012 21:25:11 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55155) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SZGZG-0007x1-Dm for submit@debbugs.gnu.org; Tue, 29 May 2012 03:10:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SZGXm-0007rq-Qf for submit@debbugs.gnu.org; Tue, 29 May 2012 03:08:43 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:39832) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZGXm-0007ri-Mr for submit@debbugs.gnu.org; Tue, 29 May 2012 03:08:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZGXg-0004hI-4Z for bug-gnu-emacs@gnu.org; Tue, 29 May 2012 03:08:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SZGXd-0007qW-TJ for bug-gnu-emacs@gnu.org; Tue, 29 May 2012 03:08:31 -0400 Original-Received: from stomp.cyber.com.au ([203.7.155.6]:45546) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZGXd-0007pY-70 for bug-gnu-emacs@gnu.org; Tue, 29 May 2012 03:08:29 -0400 Original-Received: from localhost (twb.cyber.com.au [203.7.155.89]) by stomp.cyber.com.au (Postfix) with ESMTPSA id 95329602 for ; Tue, 29 May 2012 17:08:21 +1000 (EST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Tue, 29 May 2012 21:25:05 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:60486 Archived-At: To reproduce: 1. run "emacs -Q tmp.sh" 2. enter the following text foo () { foo } main () { foo } 3. use C-x h C-M-\ to reindent everything. 4. observe that sh-mode indents incorrectly: foo () { foo } main () { foo } 16:59 twb: For some reason, after main () {, (sh-get-indent-info) returns two function indentations. In addition to version the below, this issue does not appear in GNU Emacs 23.3.1 (arm-unknown-linux-gnueabi) of 2011-08-15 on cushaw, modified by Debian. A bash script with a main() function has commits from me ca. Dec 2009 to Mar 2010, and they are indented correctly (four space), which indicates that whatever Emacs I was using at the time was not affected. In GNU Emacs 23.4.1 (x86_64-pc-linux-gnu) of 2012-04-08 on trouble, modified by Debian 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/emacs23:/etc/emacs:/usr/local/share/emacs/23.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.4/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=no' '--without-gconf' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -DDEBIAN -O2' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: C value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_AU.utf8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: xterm-mouse-mode: t ido-everywhere: t savehist-mode: t icomplete-mode: t partial-completion-mode: t show-paren-mode: t delete-selection-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: Recent messages: Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done Loading /etc/emacs/site-start.d/50dpkg-dev-el.el (source)...done Loading /etc/emacs/site-start.d/50festival.el (source)...done Loading /etc/emacs/site-start.d/50ledger.el (source)...done Loading /etc/emacs/site-start.d/50psvn.el (source)...done Loading /etc/emacs/site-start.d/50python-docutils.el (source)...done Loading /etc/emacs/site-start.d/50w3m-el-snapshot.el (source)...done Loading /etc/emacs/site-start.d/51debian-el.el (source)...done Ido mode enabled For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: /usr/share/emacs/23.4/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /usr/share/emacs/site-lisp/rst hides /usr/share/emacs/23.4/lisp/textmodes/rst /usr/share/emacs23/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/23.4/lisp/textmodes/ispell /usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/23.4/lisp/textmodes/flyspell Features: (shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml easymenu mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1 hex-util hashcash mail-utils emacsbug jka-compr edmacro kmacro xt-mouse ido savehist icomplete complete paren delsel saveplace debian-el debian-el-loaddefs w3m-load dpkg-dev-el dpkg-dev-el-loaddefs ediff-hook vc-hooks lisp-float-type lisp-mode register page menu-bar rfn-eshadow timer select mldrag 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 loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind multi-tty emacs)