[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
<help-gnu-emacs@gnu.org> 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 \
--baz
$(git rev-parse --show-toplevel)/foo --bar \
--baz
#+end_src
> Also, the ...-backward-token and ...-forward-token need to be kept in-sync.
Gotcha.
- Debugging SMIE for sh-script.el, Kévin Le Gouguec, 2021/09/02
- Re: Debugging SMIE for sh-script.el, Nikolay Kudryavtsev, 2021/09/05
- Re: Debugging SMIE for sh-script.el, Stefan Monnier, 2021/09/05
- Re: Debugging SMIE for sh-script.el, Nikolay Kudryavtsev, 2021/09/05
- Re: Debugging SMIE for sh-script.el, Stefan Monnier, 2021/09/05
- Re: Debugging SMIE for sh-script.el, Nikolay Kudryavtsev, 2021/09/05
- Re: Debugging SMIE for sh-script.el, Stefan Monnier, 2021/09/05
- Re: Debugging SMIE for sh-script.el, Nikolay Kudryavtsev, 2021/09/06
- Re: Debugging SMIE for sh-script.el, Stefan Monnier, 2021/09/06
- Re: Debugging SMIE for sh-script.el, Nikolay Kudryavtsev, 2021/09/06