bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#58940: [PATCH] feature/tree-sitter: Add more font lock faces


From: Eli Zaretskii
Subject: bug#58940: [PATCH] feature/tree-sitter: Add more font lock faces
Date: Sat, 05 Nov 2022 11:24:29 +0200

> Date: Sat, 05 Nov 2022 02:46:30 +0000
> From: Randy Taylor <dev@rjt.dev>
> Cc: casouri@gmail.com, 58940@debbugs.gnu.org
> 
> Sorry for the delay, furniture building took longer than anticipated
> and desired.

We all have our lives, no need to apologize.

> +@item font-lock-delimiter-face
> +@vindex font-lock-delimiter-face
> +for delimiters (e.g. @code{;}, @code{:}, @code{,}).

You need a comma or a @: after "e.g.", to avoid its being interpreted
as the end of a sentence.

> +@item font-lock-escape-face
> +@vindex font-lock-escape-face
> +for escape sequences in strings.

I suggest an example of an escape sequence here, ideally from 2 or
more programming languages.

> +@smallexample
> +typedef struct
> +@{
> +  int prop;
> +//    ^ property
> +@} obj;
> +
> +int main()
> +@{
> +  obj o;
> +  o.prop = 3;
> +//  ^ property
> +@}
> +@end smallexample

Please use @group..@end group here, since the two parts of this can be
typeset on separate pages, but we don't want each one of thgem to be
broken between pages.

> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -732,6 +732,13 @@ If the current buffer is visiting a file that is 
> executable, the
>  This determines how long to pause Emacs after a process
>  filter/sentinel error has been handled.
>  
> ++++
> +** New faces for font-lock.
> +'font-lock-bracket-face', 'font-lock-delimiter-face',
> +'font-lock-escape-face', 'font-lock-number-face',
> +'font-lock-misc-punctuation-face', 'font-lock-operator-face',
> +'font-lock-property-face', 'font-lock-punctuation-face'.

Should this say that they are primarily meant for use with
tree-sitter?

> +(defvar font-lock-property-face      'font-lock-property-face
> +  "Face name to use for properties.")

This doc string is too concise to be useful.  Please add some
information from the detailed descriptions above.

> +(defface font-lock-bracket-face
> +  '((t :inherit font-lock-punctuation-face))

It is better to have the parent face font-lock-punctuation-face
defined before it is used.

Thanks.





reply via email to

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