Richard Stallman wrote:
> Until recently the behavior of Shell-script[bash] mode was to
> not indent the second of the following two lines when tab was hit:
>
> export VARIABLE=/path/to/here\
> :/path/to/there
>
> Now it indents it like this:
>
> export VARIABLE=/path/to/here\
> :/path/to/there
>
> I loaded a version of sh-script.el from September and it gave the
> latter result. So this is not, I believe, the result of a recent
> change.
For the record, the behaviour is the same in Emacs-21.3 as well. I
don't recall ever seeing the former result. It seems to have worked
the way it does now for >~ 5 years.
> I am surprised by the existence of sh-indent-for-continuation. In
> shell syntax, are spaces after backslash-newline ignored? I did an
> experiment and they do not seem to be ignored.
They are not ignored.
> That being so, isn't it simply an error to reindent the continuation
> line?
Sometimes (as in this case) yes, but most of the time (for the shell
scripts I write) no. My continuation lines tend to look like:
command_with_a_lot_of_arguments arg1 arg2 arg3 arg4 \
arg5 arg6...
or:
command1 && \
command2
Personally, I like and find useful the indentation of the continued
lines. It's almost never inappropriate (for me); though one could even
write weird things like:
this_is_a_single_\
command_name
which should not be indented. There's no way to tell whether
indentation of a continued line is wrong, so it's a question of what
the default should be. I vote for the current arrangement.
_______________________________________________
Emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug