GNU bug report logs - #11582
23.4; sh indentation wrong for main() function

Previous Next

Package: emacs;

Reported by: twb <at> cyber.com.au (Trent W. Buck)

Date: Wed, 30 May 2012 01:26:03 UTC

Severity: normal

Found in version 23.4

Fixed in version 24.0.97

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11582 in the body.
You can then email your comments to 11582 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11582; Package emacs. (Wed, 30 May 2012 01:26:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to twb <at> cyber.com.au (Trent W. Buck):
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 30 May 2012 01:26:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: twb <at> cyber.com.au (Trent W. Buck)
To: bug-gnu-emacs <at> gnu.org
Subject: 23.4; sh indentation wrong for main() function
Date: Tue, 29 May 2012 17:07:33 +1000
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 <forcer> 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)




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Wed, 30 May 2012 18:47:02 GMT) Full text and rfc822 format available.

Notification sent to twb <at> cyber.com.au (Trent W. Buck):
bug acknowledged by developer. (Wed, 30 May 2012 18:47:02 GMT) Full text and rfc822 format available.

Message #10 received at 11582-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 11582-done <at> debbugs.gnu.org
Subject: Re: bug#11582: 23.4; sh indentation wrong for main() function
Date: Wed, 30 May 2012 14:45:17 -0400
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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 28 Jun 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 52 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.