unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#17621: sh-mode indentation of continued lines in case statements
@ 2014-05-28 21:57 Glenn Morris
  2014-05-29  2:33 ` Stefan Monnier
  2014-06-20 11:59 ` Stefan Monnier
  0 siblings, 2 replies; 3+ messages in thread
From: Glenn Morris @ 2014-05-28 21:57 UTC (permalink / raw)
  To: 17621

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).





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#17621: sh-mode indentation of continued lines in case statements
  2014-05-28 21:57 bug#17621: sh-mode indentation of continued lines in case statements Glenn Morris
@ 2014-05-29  2:33 ` Stefan Monnier
  2014-06-20 11:59 ` Stefan Monnier
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2014-05-29  2:33 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 17621

> 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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#17621: sh-mode indentation of continued lines in case statements
  2014-05-28 21:57 bug#17621: sh-mode indentation of continued lines in case statements Glenn Morris
  2014-05-29  2:33 ` Stefan Monnier
@ 2014-06-20 11:59 ` Stefan Monnier
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2014-06-20 11:59 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 17621-done

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

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


        Stefan





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-20 11:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-28 21:57 bug#17621: sh-mode indentation of continued lines in case statements Glenn Morris
2014-05-29  2:33 ` Stefan Monnier
2014-06-20 11:59 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).