unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Bastien Guerry <bzg@altern.org>
To: Glenn Morris <rgm@gnu.org>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: New custom faces for rmail.el
Date: Tue, 12 Feb 2008 06:49:59 +0000	[thread overview]
Message-ID: <87myq66548.fsf@bzg.ath.cx> (raw)
In-Reply-To: <r1abm6sp5f.fsf@fencepost.gnu.org> (Glenn Morris's message of "Tue, 12 Feb 2008 00:46:20 -0500")

Glenn Morris <rgm@gnu.org> writes:

> Bastien wrote:
>
>> +(defface rmail-header-name-face
>> +  '((t (:inherit font-lock-function-name-face)))
>> +  "Face to use for highlighting the header names."
>> +  :group 'rmail-headers
>> +  :version "22.1")
>
> "23.1"
>
> Face names should not end in -face.

Yes, I know, typo: my intent was to name the face `rmail-header-name'
and to name `rmail-header-name-face' the variable that is set to it.

>> +(defcustom rmail-header-name 'rmail-header-name-face "\
>> +*Face to use for highlighting the header names."
>> +  :type '(choice (const :tag "Default" nil)
>> +		 face)
>> +  :group 'rmail-headers)
>
> There's no need for a variable, just the face is enough.

Okay.  

But AFAICS there are many places where we have both mistakes: 1) have a
face *and* a variable, and 2) name them with the *-face suffix.

See for example, font-lock.el: 

,----
| (defvar font-lock-comment-delimiter-face 'font-lock-comment-delimiter-face
|   "Face name to use for comment delimiters.")
| 
| (defvar font-lock-string-face		'font-lock-string-face
|   "Face name to use for strings.")
| 
| (defvar font-lock-doc-face		'font-lock-doc-face
|   "Face name to use for documentation.")
`----

I think this is very confusing for those who think font-lock.el might be
a good place to learn about faces.  Shall I fix this?

I will fix it in rmail.el when rms tells me when people agree on having
(or not) one single face for all rmail headers.

-- 
Bastien




  reply	other threads:[~2008-02-12  6:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-11 21:55 New custom faces for rmail.el Bastien Guerry
2008-02-12  3:51 ` Richard Stallman
2008-02-12  4:15   ` Bastien
2008-02-12  5:46     ` Glenn Morris
2008-02-12  6:49       ` Bastien Guerry [this message]
2008-02-12  6:53         ` Miles Bader
2008-02-12  7:26           ` Bastien Guerry
2008-02-13  2:00             ` Xavier Maillard
2008-02-13 10:15               ` Andreas Schwab
2008-02-14  2:00                 ` Xavier Maillard
2008-02-13 21:15               ` OT: A non-text attachment was scrubbed... (was: New custom faces for rmail.el) Reiner Steib
2008-02-13 22:05             ` New custom faces for rmail.el Bastien Guerry
2008-02-12 13:21         ` Stefan Monnier
2008-02-12 13:24           ` Bastien Guerry

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=87myq66548.fsf@bzg.ath.cx \
    --to=bzg@altern.org \
    --cc=emacs-devel@gnu.org \
    --cc=rgm@gnu.org \
    --cc=rms@gnu.org \
    /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).