aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Cherti2025-04-11 10:18:19 -0400
committerStefan Monnier2025-05-07 15:04:07 -0400
commit4e1fe56e316c041ed3b07f510ecba428c6b06cd1 (patch)
treeabc210be217ab1e7f21306f252e979dfcba74be0
parent1590a2b3d5473f5bcdf21d63c968db57b88f60b1 (diff)
downloademacs-4e1fe56e316c041ed3b07f510ecba428c6b06cd1.tar.gz
emacs-4e1fe56e316c041ed3b07f510ecba428c6b06cd1.zip
Mark !%:.^~, as punctuation rather than symbol constituents
In Bash, the characters !%:.^~, are not valid in variable names. In sh, they are not permitted in either function or variable names. Treating them as punctuation is convenient, as they are rarely used in function names and never in variable names. Even among commands, their usage is uncommon. The only character among these that is commonly seen in command names is '.', although it is rarely used in function names. Marking these characters as punctuation, rather than symbol constituents, enhances the accuracy of symbol detection. * lisp/progmodes/sh-script.el: Mark !%:.^~, as punctuation in the sh-mode-syntax-table syntax table. Copyright-paperwork-exempt: yes
-rw-r--r--lisp/progmodes/sh-script.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 287f0501350..7216975ebfd 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -406,13 +406,13 @@ name symbol."
406 ;; to work fine. This is needed so that dabbrev-expand 406 ;; to work fine. This is needed so that dabbrev-expand
407 ;; $VARNAME works. 407 ;; $VARNAME works.
408 ?$ "'" 408 ?$ "'"
409 ?! "_" 409 ?! "."
410 ?% "_" 410 ?% "."
411 ?: "_" 411 ?: "."
412 ?. "_" 412 ?. "."
413 ?^ "_" 413 ?^ "."
414 ?~ "_" 414 ?~ "."
415 ?, "_" 415 ?, "."
416 ?= "." 416 ?= "."
417 ?/ "." 417 ?/ "."
418 ?\; "." 418 ?\; "."