From debbugs-submit-bounces@debbugs.gnu.org Tue May 29 21:25:11 2012 Received: (at submit) by debbugs.gnu.org; 30 May 2012 01:25:11 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 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 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 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 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 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) From: twb@cyber.com.au (Trent W. Buck) To: bug-gnu-emacs@gnu.org Subject: 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> 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-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit 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 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) 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) From debbugs-submit-bounces@debbugs.gnu.org Wed May 30 14:46:49 2012 Received: (at 11582-done) by debbugs.gnu.org; 30 May 2012 18:46:49 +0000 Received: from localhost ([127.0.0.1]:50728 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SZnuz-0001Ma-5S for submit@debbugs.gnu.org; Wed, 30 May 2012 14:46:49 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:36099 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SZnux-0001MU-UG for 11582-done@debbugs.gnu.org; Wed, 30 May 2012 14:46:48 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SZntV-00084B-70; Wed, 30 May 2012 14:45:17 -0400 From: Glenn Morris To: 11582-done@debbugs.gnu.org Subject: Re: bug#11582: 23.4; sh indentation wrong for main() function References: <7czk8rwjm2.fsf@twb.cyber.com.au> X-Spook: 9705 Samford Road BRLO UOP Delta Force gamma top secret X-Ran: r3'S^$l}X[#f7'UcI.U!E}!F?+Vy2ug2Qa!;gV7A}w>Bq7qkgJ1-~``lN3W;l$z$>K4G=J X-Hue: magenta X-Debbugs-No-Ack: yes X-Attribution: GM Date: Wed, 30 May 2012 14:45:17 -0400 In-Reply-To: <7czk8rwjm2.fsf@twb.cyber.com.au> (Trent W. Buck's message of "Tue, 29 May 2012 17:07:33 +1000") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 11582-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Version: 24.0.97 Thanks for the report. I see this in 23.4, but not in 24.0.97, so I think it is already fixed. From unknown Sun Aug 17 04:18:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 28 Jun 2012 11:24:03 +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