[Top][All Lists]

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

Re: Debugging SMIE for sh-script.el

From: Nikolay Kudryavtsev
Subject: Re: Debugging SMIE for sh-script.el
Date: Thu, 2 Sep 2021 15:07:11 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

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)

P. S. Incidentally I've spent like the entire last week writing SMIE indentation logic for some proprietary language with a really terrible syntax, and I'm not even close to getting it done, so that's how I know this stuff.

reply via email to

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