all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* font-lock-face-attributes not changing
@ 2015-04-30 13:17 Ken Goldman
  2015-05-01  2:08 ` John Mastro
       [not found] ` <mailman.2082.1430446147.904.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Ken Goldman @ 2015-04-30 13:17 UTC (permalink / raw)
  To: help-gnu-emacs

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?

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")

The relevant line is:

(setq font-lock-face-attributes
       ;; FACE			      FG		 BG	 bold italic underline
       '((font-lock-comment-face	      "gold"		 nil	 nil  nil	  nil)
	(font-lock-string-face	      "lightskyblue2"	 nil	 nil  nil	  nil)
	(font-lock-reference-face     "palegreen2"	 nil	 nil  nil	  nil)
	(font-lock-constant-face      "palegreen2"	 nil	 nil  nil	  nil)
	(font-lock-variable-name-face "wheat"		 nil	 nil  nil	  nil)
	(font-lock-function-name-face "yellow"		 nil	 nil  nil	    1)
	(font-lock-type-name-face     "salmon"		 nil	 nil  nil	  nil)
	(font-lock-doc-name-face      "magenta"		 nil	 nil  nil	  nil)
	(font-lock-keyword-face	      "pink"		 nil	 nil  nil	  nil)
	(font-lock-type-face	      "lightsalmon"	 nil	 nil  nil	  nil)
	(font-lock-builtin-face	      "palegreen2"	 nil	 nil  nil	  nil)
	(font-lock-warning-face	      "red"		 nil	 nil  nil	  nil)
	(font-lock-fatal-face	      "black"            "red"   nil  nil 
  nil)
	(show-paren-match-face	      "black"		 "green" nil  nil	  nil)
	(paren-face-match	      "black"		 "green" nil  nil	  nil)
	(flyspell-incorrect-face      "wheat"		 nil	 nil  nil	    1)
	(flyspell-duplicate-face      "wheat"		 nil	 nil  nil	    1)
	))




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: font-lock-face-attributes not changing
       [not found] <mailman.2013.1430399851.904.help-gnu-emacs@gnu.org>
@ 2015-05-01  1:31 ` Emanuel Berg
  0 siblings, 0 replies; 4+ messages in thread
From: Emanuel Berg @ 2015-05-01  1:31 UTC (permalink / raw)
  To: help-gnu-emacs

Ken Goldman <kgoldman@us.ibm.com> writes:

> 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")

These do not work for my either so it is nothing you
have by default. On the platforms where they work, use
`describe-face' to find out where they are defined.
Then look for that file where they don't work.
Probably, it isn't there.

-- 
underground experts united
http://user.it.uu.se/~embe8573


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: font-lock-face-attributes not changing
  2015-04-30 13:17 Ken Goldman
@ 2015-05-01  2:08 ` John Mastro
       [not found] ` <mailman.2082.1430446147.904.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 4+ messages in thread
From: John Mastro @ 2015-05-01  2:08 UTC (permalink / raw)
  To: Ken Goldman, help-gnu-emacs@gnu.org

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

-- 
john



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: font-lock-face-attributes not changing
       [not found] ` <mailman.2082.1430446147.904.help-gnu-emacs@gnu.org>
@ 2015-05-01  2:21   ` Emanuel Berg
  0 siblings, 0 replies; 4+ messages in thread
From: Emanuel Berg @ 2015-05-01  2:21 UTC (permalink / raw)
  To: help-gnu-emacs

John Mastro <john.b.mastro@gmail.com> writes:

> It looks like the variable
> `font-lock-face-attributes' was made obsolete.

Indeed! So I was wrong. I *do* have "navy". It doesn't
turn up in apropos but neither does for example
"green" when I look close: those who do are my custom
variables. So you see? My config is even better than
Emacs. Ehm...

-- 
underground experts united
http://user.it.uu.se/~embe8573


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-01  2:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.2013.1430399851.904.help-gnu-emacs@gnu.org>
2015-05-01  1:31 ` font-lock-face-attributes not changing Emanuel Berg
2015-04-30 13:17 Ken Goldman
2015-05-01  2:08 ` John Mastro
     [not found] ` <mailman.2082.1430446147.904.help-gnu-emacs@gnu.org>
2015-05-01  2:21   ` Emanuel Berg

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.