emacs-devel
[Top][All Lists]
Advanced

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

Re: font-lock-delimiter-face - what for?


From: Dmitry Gutov
Subject: Re: font-lock-delimiter-face - what for?
Date: Wed, 28 Dec 2022 20:32:15 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 28/12/2022 19:06, Randy Taylor wrote:
On Wednesday, December 28th, 2022 at 10:13, Dmitry Gutov <dgutov@yandex.ru> 
wrote:

Maybe it would be better to remove font-lock-misc-punctuation-face, though?

People can still use font-lock-punctuation-face for everything
punctuation-like that doesn't match the category of "brackets" or
"delimiters".

Just like font-lock-doc-face inherits from font-lock-string-face, or
font-lock-comment-delimiter-face inherits from font-lock-comment-face.

We don't seem to have a practice of "parent faces" which are otherwise
unused. font-lock-punctuation-face's docstring doesn't suggest this kind
of purpose either.

Then we should get rid of font-lock-punctuation-face instead. If we keep it and 
use it in place of misc-punctuation, then changing punctuation-face would also 
change the bracket and delimiter faces, since they inherit from it.

That's usually how inheriting works, yes.

Do we anticipate misc-punctuation to often have unique attributes? If so, it might be at least some reason to keep that face.

font-lock-punctuation-face wouldn't be a great name either since it's no longer 
referring to all punctuation (which is its current goal, and the docstring can 
always be updated).

Why wouldn't it be referring to all punctuation? All attributes that are not overridden by bracket- and delimiter- faces will show up in them.




reply via email to

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