emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Initial fontification in sh-mode with tree-sittter


From: Yuan Fu
Subject: Re: Initial fontification in sh-mode with tree-sittter
Date: Thu, 17 Nov 2022 10:25:57 -0800


> On Nov 16, 2022, at 7:57 AM, João Paulo Labegalini de Carvalho 
> <jaopaulolc@gmail.com> wrote:
> 
>  
> +(provide 'sh-mode)
> +;;; sh-mode.el ends here
> 
> Is there any particular reason why you changed sh-script to sh-mode?
> 
> Good catch. That must have been the result of an unintended replace-string.
> 
> Here is the patch without that silly change. (It might not be that silly, as 
> other progmodes are named <lang>-mode? But that can be a separate patch).

Thanks! I applied your patch and made a few changes, the fist commit has 
stylistic changes, the second has some feature changes:

For the stylistic changes:

1. I added commit message for your patch as an example. For future patches it’s 
best if you can also have this ChangeLog style commit message, I think you can 
find more detailed explanation in in CONTRIBUTE file.

(I don’t know if you know the following already, bug FYI:)

2. Docstring sentences always end with a period
3. All comments and sentences should be complete sentences, with two spaces at 
the end.
4. The first line of a docstring shouldn’t exceeds 80 columns.

For the second commit, I changed all the feature names to singular, and 
decl-commands to declaration-command. I also simplified the rule for 
declaration-command, IIUC you want to highlight the command keywords?

Also, right now these command keywords are highlighted in builtin face, should 
they be fontified in keyword face? I’m no expert of bash so I can’t tell. But 
keyword face seems more natural to me.

Yuan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]