Subject: bug#77746: [PATCH] sh-mode: Fix incorrect word syntax for punctuation in sh-mode

From: Eli Zaretskii <[email-masked]>
Date: Sun, 13 Apr 2025 12:45:13 +0300

> Date: Fri, 11 Apr 2025 10:55:02 -0400
> From: James Cherti <[email-masked]>
> 
> In sh and Bash, the characters !%^~:.,= and are not valid in variable or
> function names.
> 
> Assigning them the "_" syntax causes Emacs to treat them as word
> constituents, disrupting navigation and completion
> (e.g. dabbrev-expand, forward-word, etc.).
> 
> The attached patch updates the syntax table in sh-mode to mark
> these characters as punctuation, correcting the issue.

Thanks.

TBH, such a change sounds scary, as it could cause all kinds of
unintended changes in behavior.

I've added a couple of people who might know this mode better than I
do, in the hope that they will have comments or opinions.