GNU bug report logs - #17621
sh-mode indentation of continued lines in case statements

Previous Next

Package: emacs;

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

Date: Wed, 28 May 2014 21:58: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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17621 in the body.
You can then email your comments to 17621 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#17621; Package emacs. (Wed, 28 May 2014 21:58:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: submit <at> debbugs.gnu.org
Subject: sh-mode indentation of continued lines in case statements
Date: Wed, 28 May 2014 17:57:04 -0400
Package: emacs
Version: 24.3.91
Severity: minor

emacs -Q --eval '(setq-default indent-tabs-mode nil)' foo.sh, where
foo.sh is as follows:

case $foo in
    bar)
            true && \
                echo foo
            ;;
esac

The above is the 24.3 indentation.
In 24.3.91, it indents like:

case $foo in
    bar)
        true && \
        echo foo
        ;;
esac


1. Body of case branch not indented as far (this may an improvement).
2. Continued line not indented (this is a bug).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17621; Package emacs. (Thu, 29 May 2014 02:34:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 17621 <at> debbugs.gnu.org
Subject: Re: bug#17621: sh-mode indentation of continued lines in case
 statements
Date: Wed, 28 May 2014 22:33:50 -0400
> In 24.3.91, it indents like:
> case $foo in
>     bar)
>         true && \
>         echo foo
>         ;;
> esac
> 1. Body of case branch not indented as far (this may an improvement).

Indeed, the old indentation you show seems like a bug, tho I can't
remember bumping into it.

> 2. Continued line not indented (this is a bug).

I agree that this is a surprising behavior (I'm friends with the
indentation code and I understand where he comes from, so by respect
for him I avoid the "b" word).

The same holds without the "\", by the way.


        Stefan




Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Fri, 20 Jun 2014 12:01:01 GMT) Full text and rfc822 format available.

Notification sent to Glenn Morris <rgm <at> gnu.org>:
bug acknowledged by developer. (Fri, 20 Jun 2014 12:01:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 17621-done <at> debbugs.gnu.org
Subject: Re: bug#17621: sh-mode indentation of continued lines in case
 statements
Date: Fri, 20 Jun 2014 07:59:53 -0400
> case $foo in
>     bar)
>         true && \
>         echo foo
>         ;;
> esac

This should be fixed now (and also when the backslash is absent).


        Stefan




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 19 Jul 2014 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 341 days ago.

Previous Next


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