diff options
| author | Jostein Kjønigsen | 2025-04-30 11:33:26 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2025-05-10 13:21:32 +0300 |
| commit | 7265be09cebc9ee752b688b7a85fb1ac18b45ef5 (patch) | |
| tree | a70cbba50b3fa9d6dce85334f111b3bf76a2b1ba | |
| parent | 013ed9799e68d83b478320b0a31180f8047d13b1 (diff) | |
| download | emacs-7265be09cebc9ee752b688b7a85fb1ac18b45ef5.tar.gz emacs-7265be09cebc9ee752b688b7a85fb1ac18b45ef5.zip | |
sh-script.el: Improve consistency in variable-use fontification.
sh-mode--treesit-settings: Ensure all variable use is treated the
same way.
Before this patch the following commands would all be treated differently:
echo "${var}"
echo "$var"
echo ${var}
echo $var
Now they are treated the same.
* lisp/progmodes/sh-script.el (sh-mode--treesit-settings): Tweak
rules. (Bug#78167)
| -rw-r--r-- | lisp/progmodes/sh-script.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 7216975ebfd..5075e9a0afc 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -3369,7 +3369,11 @@ See `sh-mode--treesit-other-keywords' and | |||
| 3369 | :language 'bash | 3369 | :language 'bash |
| 3370 | :override t | 3370 | :override t |
| 3371 | '((command_substitution) @sh-quoted-exec | 3371 | '((command_substitution) @sh-quoted-exec |
| 3372 | (string (expansion (variable_name) @font-lock-variable-use-face))) | 3372 | (expansion (variable_name) @font-lock-variable-use-face) |
| 3373 | (expansion ["${" "}"] @font-lock-bracket-face) | ||
| 3374 | (simple_expansion | ||
| 3375 | "$" @font-lock-bracket-face | ||
| 3376 | (variable_name) @font-lock-variable-use-face)) | ||
| 3373 | 3377 | ||
| 3374 | :feature 'heredoc | 3378 | :feature 'heredoc |
| 3375 | :language 'bash | 3379 | :language 'bash |