unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* 20.7 => 21.2: How to keep old font-lock faces?
@ 2002-10-29 17:32 Da Witch
  2003-04-26 19:15 ` Ed L Cashin
  0 siblings, 1 reply; 2+ messages in thread
From: Da Witch @ 2002-10-29 17:32 UTC (permalink / raw)




I just switched from 20.7.2 to 21.2.1, and my fontification faces are
all screwed up, even though I'm using the same .emacs file.  How can I
recover the fontification colors I had with 20.7.2?  Is there a way to
do this simply while retaining jit-lock-mode (the reason I switched to
21.x in the first place)?

Thanks,

hk

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

* Re: 20.7 => 21.2: How to keep old font-lock faces?
  2002-10-29 17:32 20.7 => 21.2: How to keep old font-lock faces? Da Witch
@ 2003-04-26 19:15 ` Ed L Cashin
  0 siblings, 0 replies; 2+ messages in thread
From: Ed L Cashin @ 2003-04-26 19:15 UTC (permalink / raw)
  Cc: Da Witch

Da Witch <heather710101@yahoo.com> writes:

> I just switched from 20.7.2 to 21.2.1, and my fontification faces are
> all screwed up, even though I'm using the same .emacs file.  How can I
> recover the fontification colors I had with 20.7.2?  Is there a way to
> do this simply while retaining jit-lock-mode (the reason I switched to
> 21.x in the first place)?

I was using an old piece of emacs lisp (that I got from the djgpp
_emacs.xmpl file by Eli Zaretskii) in my .emacs file.  It broke after
font-lock-reference-face went away.  The old code set
font-lock-face-attributes directly, but the code below uses the
documented set-face-foreground command instead.  

(progn        ; Font-locking faces set-up
  (setq
   font-lock-maximum-decoration t
   font-lock-maximum-size (if font-lock-maximum-decoration
			      (* 70 1024)
			      (* 150 1024)))
  (defvar elc-font-lock-faces-alist
    '((font-lock-comment-face . "lightgreen")
      (font-lock-string-face . "yellow")
      (font-lock-keyword-face . "white")
      (font-lock-type-face . "white")
      (font-lock-function-name-face . "gold")
      (font-lock-variable-name-face . "lightblue")
      (font-lock-constant-face . "lightblue"))
    "mapping of font lock faces to my favorite corresponding colors")
  (mapc '(lambda (p) 
	  (let ((face (car p))
		(color (cdr p)))
	    (set-face-foreground face color))) 
	elc-font-lock-faces-alist))


-- 
--Ed L Cashin     PGP public key: http://noserose.net/e/pgp/

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

end of thread, other threads:[~2003-04-26 19:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-29 17:32 20.7 => 21.2: How to keep old font-lock faces? Da Witch
2003-04-26 19:15 ` Ed L Cashin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).