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

From: Stefan Monnier <[email-masked]>
Date: Mon, 14 Apr 2025 20:23:06 -0400

> Thank you for suggesting a solution for dabbrev.  However,
> this won't address the issue with symbol highlighting
> using the built-in (highlight-symbol-at-point) function.

No, indeed.  There's probably another setting available that can fix
that case, tho.

> For context: I have been using the syntax table introduced
> by this patch for over a year in extensive Bash scripting (I
> write hundreds of Bash scripts annually), and I have not
> encountered any issues with `sh-mode` or `bash-ts-mode` when
> this patch is applied.

It's possible that your patch is actually safe.

Someone™ just needs to take a close look at the syntax-propertize,
font-lock, and indentation code to assess the potential effects (I think
it's the only two cases that deserve such close scrutiny, because other
cases are usually more like dabbrev in the sense that there isn't as
clear a "right-vs-wrong" distinction).

Another option, might be to combine your patch with another patch which
sets the syntax-table used for font-lock, indentation, and syntax-ppss.

        Stefan