[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: Sun, 5 Sep 2021 18:48:38 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

The proper solution IMHO should be changing sh-smie--indent-continuation to not rely on other functions to calculate indent. Something along the lines of going (smie-backward-sexp) until you get (smie-rule-bolp), this would get you to the start of the parent line and then you can base your indentation decisions on it. It's generally a bad idea to touch the token grab code, unless you absolutely have to.

Also note, that sh-mode separates default-backward\forward-token functions from the actual backward\forward-token functions, with the latter handling whatever special cases there are and the default functions just doing straight buffer reading.

reply via email to

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