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 10:06:14 -0400

On 2025-04-15 08:48, Eli Zaretskii wrote:
>> Date: Tue, 15 Apr 2025 07:21:08 -0400
>> Cc: [email-masked], [email-masked], [email-masked]
>> From: James Cherti <[email-masked]>
>>
>> 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.

Here are a few screenshots that show exactly the issue. The
mode used when I took the screenshot was bash-ts-mode.

- without-patch1-highlight.png: Only varname should have
   been highlighted
- without-patch2-highlight.png: varname in the comment
   should have been highlighted
- without-patch3-completion.png: The completion included
   invalid variable names.
- without-patch4-major-mode.png: The major mode is
   bash-ts-mode. The same issue happens with sh-mode
   without this patch.

Here are screenshots with this patch applied:
- with-patch1.png: varname highlighted correctly
- with-patch2.png: only complete valid variable names

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