emacs-devel
[Top][All Lists]
Advanced

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

Re: New custom faces for rmail.el


From: Bastien Guerry
Subject: Re: New custom faces for rmail.el
Date: Tue, 12 Feb 2008 06:49:59 +0000
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux)

Glenn Morris <address@hidden> 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 via email to

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