emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shell-script[bash] indention broken (or fixed?)


From: Richard Stallman
Subject: Re: Shell-script[bash] indention broken (or fixed?)
Date: Tue, 14 Jun 2005 03:46:16 -0400

    > In Lisp mode, TAB leaves continuation lines unchanged.
    > It seems to me that that is the right thing to do.
    > What do people think of changing sh-script.el to do that?

    I think it would be good as an option, but the default should stay as it is.
    Continuation lines in sh are used in many more cases than in Lisp.
    Quite often they're used to spread command arguments on several lines,
    in which case indentation is really what you want.

Often it is ok, but if it cannot tell WHEN this is ok, it is likely to
turn correct shell code into incorrect shell code.  I don't think that
is a good idea.

    Maybe a compromise would be to do the following: if the "\\\n" is preceded
    by a space or a tab, then the following line should be indented, otherwise
    it should be left untouched.

This might make it safe most of the time, but I think there will still
be cases of strings where it gets fooled.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]