emacs-devel
[Top][All Lists]
Advanced

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

Re: Regarding adding additional default font-lock faces


From: Stefan Monnier
Subject: Re: Regarding adding additional default font-lock faces
Date: Thu, 09 Aug 2018 09:57:47 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> Do I just start hacking at lisp/font-lock.el and send in patches, or
> should we discuss which faces would be useful to add first?

Each face will need to be justified, but you can send a sample patch
along with that justification.

>  * font-lock-function-call-face
>  * font-lock-decorator-face ("decorator" is another commonly used for
>    the "attribute" concept and less likely to be confused with for
>    instance HTML/XML attributes)
> Are there any other nice-to-have default faces anyone can think of?

If you can't think of others right now, then I recommend you stick to
those two for now.

Issues that come to mind:
- For me a "function call" is made of both a function and some number
  of arguments.  So it would be good to clarify to which part
  font-lock-function-call-face is meant to apply (the "function" part,
  I assume).  Also, clarify how it would be used in the case of method
  calls (I guess, just highlight the method name).
- Maybe the more difficult technical part will be to come up with a good
  default definition for those faces: just like for the other
  font-lock-*-faces, it should cover light and dark backgrounds, and it
  should maintain a good contrast.

Finally, to justify their introduction, it would be useful to be able to
point to existing Elisp packages which define/use their own faces for
those uses.

> Besides the actual LISP-code itself... What's the process for
> documenting such changes? What other "house-keeping" needs to go with
> such a code-change?

The addition needs to be mentioned in etc/NEWS and

    grep font-lock-keyword-face **/*.texi

will show you where they're documented (i.e. doc/lispref/modes.texi)


        Stefan



reply via email to

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