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

From: James Cherti <[email-masked]>
Date: Tue, 15 Apr 2025 12:22:08 -0400

On 2025-04-15 11:24, Eli Zaretskii wrote:
 >> From: Stefan Monnier <[email-masked]>
 >> Cc: James Cherti <[email-masked]>,  [email-masked],
 >>    [email-masked]
 >> Date: Tue, 15 Apr 2025 11:17:02 -0400
 >>
 >>>> The issue occurs in both sh-mode and bash-ts-mode.
 >>> I'm surprised that bash-ts-mode should use syntax tables, instead of
 >>> relying on the results of parsing by tree-sitter.
 >>
 >> It's not front-and-center in his bug report, but what he means by
 >> "completion" seems to be mostly dabbrev completion, which doesn't make
 >> use of tree-sitter.
 >
 > He also mentioned font-lock.

Yes, this patch fixes dabbrev, functions such as
(highlight-symbol-at-point), and any other function that
relies on thing-at-point for symbol detection.

(The core issue is inaccurate symbol detection. This patch
improves it by excluding characters that should not be
considered part of a valid variable name.)

--
James Cherti
GitHub: https://github.com/jamescherti
Website: https://www.jamescherti.com/