unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: "Jostein Kjønigsen" <jostein@secure.kjonigsen.net>
Cc: jostein@kjonigsen.net, emacs-devel@gnu.org
Subject: Re: Regarding adding additional default font-lock faces
Date: Thu, 09 Aug 2018 09:57:47 -0400	[thread overview]
Message-ID: <jwv4lg3abwj.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <1533812663.2257232.1468575768.4605098F@webmail.messagingengine.com> ("Jostein Kjønigsen"'s message of "Thu, 09 Aug 2018 13:04:23 +0200")

> 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	other threads:[~2018-08-09 13:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-01 19:24 Regarding adding additional default font-lock faces Jostein Kjønigsen
2018-08-01 21:53 ` Stefan Monnier
2018-08-02  7:03   ` Jostein Kjønigsen
2018-08-02 11:53     ` Stefan Monnier
2018-08-03  7:46       ` Nathan Moreau
2018-08-09 11:04       ` Jostein Kjønigsen
2018-08-09 13:57         ` Stefan Monnier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv4lg3abwj.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=jostein@kjonigsen.net \
    --cc=jostein@secure.kjonigsen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).