The description of
(info "(elisp) Defining Faces")
says that the name of a face should not end in
most faces declared in
font-lock.el do use the suffix
How does this fit together?
There are exceptions. ;-)
Some may be vestiges. In the Olden Days it was common to have both a variable for the face and the face itself, and the variable, or both, had a name that ended in
Some are not just vestiges, at least for the variables. One reason to have a variable is to be able to bind it, to temporarily change which face is used. This is not common.
In the case of font-lock faces, there is this comment (from @Stefan Monnier) in the code (
font-lock.el), which explains things:
;; Originally these variable values were face names such as `bold' etc. ;; Now we create our own faces, but we keep these variables for compatibility ;; and they give users another mechanism for changing face appearance. ;; We now allow a FACENAME in `font-lock-keywords' to be any expression that ;; returns a face. So the easiest thing is to continue using these variables, ;; rather than sometimes evalling FACENAME and sometimes not. sm. ;; Note that in new code, in the vast majority of cases there is no ;; need to create variables that specify face names. Simply using ;; faces directly is enough. Font-lock is not a template to be ;; followed in this area. (defvar font-lock-comment-face 'font-lock-comment-face "Face name to use for comments.")