GNU bug report logs - #17721
sh-mode indentation of {} or () inside do or if

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Fri, 6 Jun 2014 23:18:02 UTC

Severity: minor

Found in version 24.3.91

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Glenn Morris <rgm <at> gnu.org>
Subject: bug#17721: closed (Re: bug#17721: sh-mode indentation of {} or ()
 inside do or if)
Date: Fri, 20 Jun 2014 14:25:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#17721: sh-mode indentation of {} or () inside do or if

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 17721 <at> debbugs.gnu.org.

-- 
17721: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17721
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 17721-done <at> debbugs.gnu.org
Subject: Re: bug#17721: sh-mode indentation of {} or () inside do or if
Date: Fri, 20 Jun 2014 10:24:37 -0400
> for foo in bar; do
>     [ -e $foo ] && {
>     echo t
> }
> done

Should be fixed now,


        Stefan

[Message part 3 (message/rfc822, inline)]
From: Glenn Morris <rgm <at> gnu.org>
To: submit <at> debbugs.gnu.org
Subject: sh-mode indentation of {} or () inside do or if
Date: Fri, 06 Jun 2014 19:17:54 -0400
Package: emacs
Version: 24.3.91

emacs -Q foo.sh

for foo in bar; do
    [ -e $foo ] && {
        echo t
    }
done


The above is how 24.3 indents it. 24.3.91 does the following:

for foo in bar; do
    [ -e $foo ] && {
    echo t
}
done


Same issue with if...fi rather than do...done,
and with () rather than {}.



This bug report was last modified 11 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.