sh-script: Mark + and * as punctuation rather than a symbol constituent

In Bash, the characters + and * are not valid in variable names.
In sh, they are also disallowed in both function and variable
names.  Treating them as punctuation is appropriate, as they most
commonly appear as operators.

Examples:
   . Arithmetic: $((var1*var2))
   . Compound assignment: list_name+=("item")

* lisp/progmodes/sh-script.el (sh-mode-syntax-table): Mark + and *
as punctuation in the syntax table.  (Bug#80280)

Copyright-paperwork-exempt: yes
This commit is contained in:
James Cherti
2026-01-29 08:29:39 -05:00
committed by Eli Zaretskii
parent f88d4a0d7b
commit b3c0aee42b

View File

@@ -406,6 +406,8 @@ name symbol."
;; to work fine. This is needed so that dabbrev-expand
;; $VARNAME works.
?$ "'"
?* "."
?+ "."
?! "."
?% "."
?: "."