[Top][All Lists]

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

Re: Debugging SMIE for sh-script.el

From: Stefan Monnier
Subject: Re: Debugging SMIE for sh-script.el
Date: Mon, 06 Sep 2021 10:01:56 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> indent the subsequent lines at a fixed offset from the first line
> The key question here is how do we calculate that offset.

No.  The rule "indent the subsequent lines at a fixed offset from the
first line" is the one used when `sh-indent-after-continuation` is set
to `always`, which is a different case than the one under discussion.

> Currently it is the offset to the start of the second token of the
> parent line.

No.  This indentation is the one you get when we use the *other* rule
which tries to indent depending on the structure of the code on the
line.  E.g. you get that when `sh-indent-after-continuation` is nil.

> Kevin wants to change it, so that it would be the start
> of the first token of the parent non-continuation line +
> sh-basic-offset.

We're miscommunicating, then.

Those who want that just need

    (setq sh-indent-after-continuation 'always)

AFAIK this thread is about fixing the indentation from

    $(catfood)/foo bar \


    $(catfood)/foo bar \

[ and AFAIK it's a plain bug-fix, not a change in style.  ]


reply via email to

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