[Top][All Lists]

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

Re: font-lock-face-attributes not changing

From: John Mastro
Subject: Re: font-lock-face-attributes not changing
Date: Thu, 30 Apr 2015 19:08:42 -0700

Hi Ken,

> I have a common .emacs file that I use across Linux and Windows
> platforms. One one (24.3.1, a bit newer than the others) ,
> font-lock-face-attributes has no effect. I get the default colors.
> When I start .emacs, I don't see any warnings, and messages says the
> .emacs is being read. What else should I look for?

It looks like the variable `font-lock-face-attributes' was made
obsolete. I found this in the NEWS (a file distributed with Emacs)
dating back to Emacs 20.1:

  The variables font-lock-face-attributes, font-lock-display-type and
  font-lock-background-mode are now obsolete; the recommended way to
  specify the faces to use for Font Lock mode is with M-x
  customize-group on the new custom group font-lock-faces. If you set
  font-lock-face-attributes in your ~/.emacs file, Font Lock mode will
  respect its value. However, you should consider converting from
  setting that variable to using M-x customize.

I wasn't familiar with it before your question, but I take it
`font-lock-face-attributes' was still respected for some time after
that, though seemingly no longer. (Which seems reasonable to me,
considering how long ago Emacs 20.1 was released.)

> The other hint is that it claims this is an invalid face, but it works
> on several other Linux platforms.
> (set-face-foreground 'modeline     "navy")
> (set-face-background 'modeline     "lightblue1")

I didn't look into the history (if any) here, but on my Emacs (24.5) the
face to use is `mode-line'.

Hope that helps


reply via email to

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