[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: Fri, 03 Sep 2021 09:09:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Stefan Monnier via Users list for the GNU Emacs text editor
<> writes:

>> I guess TRT would be to add a third step to check whether (char-before
>> (point)) is a closing delimiter, and if so, skip back to its matching
>> opener?  With (forward-sexp -1)?  And then assert whether we've hit a $
>> sign?
> Could be but that could also be dangerous, since we don't want to treat
> $(cat food) as a single token.  I think we'd want something a bit less 
> generic.

Not sure why we wouldn't want to treat $(cat food) as a single token?
Do you mean, as opposed to ${cat_food}?  IIUC, I'd like both $() and ${}
to be skipped over for the purposes of indentation:

#+begin_src sh
${top_dir}/foo --bar \

$(git rev-parse --show-toplevel)/foo --bar \

> Also, the ...-backward-token and ...-forward-token need to be kept in-sync.


reply via email to

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