emacs-31 27ea7e6c1e2: * lisp/progmodes/sh-script.el (bash-ts-mode): Fix 'sexp-default' thing.
Juri Linkov <[email protected]>
| Newsgroups | gmane.emacs.diffs |
|---|---|
| Message-ID | <[email protected]> |
branch: emacs-31 commit 27ea7e6c1e2655f49a570eb0c599059f08b4d827 Author: Juri Linkov <[email protected]> Commit: Juri Linkov <[email protected]> * lisp/progmodes/sh-script.el (bash-ts-mode): Fix 'sexp-default' thing. Handle 'sexp-default' thing in 'treesit-thing-settings' for "${a}" in addition to "$(a)". --- lisp/progmodes/sh-script.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 0dd90aac42f..1b07311eb13 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1618,11 +1618,11 @@ not written in Bash or sh." "process_substitution") eos)) (sexp-default - ;; For `C-M-f' in "$|(a)" - ("$(" . + ;; For `C-M-f' in "$|{a}" or "$|(a)" + ("$[{(]" . ,(lambda (node) - (equal (treesit-node-type (treesit-node-parent node)) - "command_substitution")))) + (member (treesit-node-type (treesit-node-parent node)) + '("expansion" "command_substitution"))))) (sentence ,(rx bos (or "redirected_statement" "declaration_command"