[Top][All Lists]

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

Re: Debugging SMIE for sh-script.el

From: Kévin Le Gouguec
Subject: Re: Debugging SMIE for sh-script.el
Date: Thu, 02 Sep 2021 19:19:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Nikolay Kudryavtsev <> writes:

> SMIE funcalls smie-indent-functions until one of them returns
> non-nil. If we do smie-config-show-intent on your line we get:
> Rules used: :list-intro "" -> nil
> This means that our line has been indented by the default logic of
> smie-indent-exps. If we go through it we'll see that it's trying to
> align with the first arg of sexp which it thinks is "/bar". So in
> effect it's treating your expression as if it was:
> ({foo} /bar
>            --baz \ --quux)

Thanks, smie-config-show-intent looks like a neat debugging tool, I'm
sure it will help me understand how to achieve what I want (cf. commit
6392bc37a, which was reverted because of bug#50320).

I'm still at a loss regarding why this snippet returns 6, despite
sh-smie--indent-continuation returning nil:

#+begin_src elisp
(let ((sh-indent-after-continuation nil))

This is not necessarily an SMIE-related issue; it feels like there is
something more fundamental I don't understand about what's going on.
This specific question is what prompted my message to help-gnu-emacs.

reply via email to

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