[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: font-lock-comment-face not working in latest CVS
From: |
Eli Zaretskii |
Subject: |
Re: font-lock-comment-face not working in latest CVS |
Date: |
28 Jan 2004 08:55:29 +0200 |
> From: Kenneth Rose <kenrose@rogers.com>
> Newsgroups: gnu.emacs.help
> Date: Tue, 27 Jan 2004 23:42:07 GMT
>
> I downloaded the latest CVS sources and built emacs 21 for Mac OS X.
> When I loaded emacs, it started complaining because I had the line:
>
> ( set-face-foreground 'font-lock-comment-face "cyan" )
>
> in my .emacs. It was complaining that font-lock-comment-face wasn't a
> valid face. However, if I opened my .emacs and evaluated the entire
> buffer (this is an option in the menu), the buffer evaluated fine and
> comments were in cyan. What's more, doing 'M-x set-face-foreground' and
> using tab completion showed me that font-lock-comment-face was a valid face.
The problem here is that font-lock-comment-face does not yet exist at
the point where set-face-foreground line from your .emacs is
evaluated.
The usual method to overcome that is to create the face with a call
to make-face just before that line. Alternatively, figure out what
part of your .emacs causes font-lock to be loaded, and place the
set-face-foreground line after that.