[ESS] Font-locking (Syntax highlighting) color choices
Rodney Sparapani
rsparapa at mcw.edu
Fri May 8 21:17:36 CEST 2009
Hi Gang:
This must be a FAQ. I suppose we should get around to writing up such a
document. Today, I re-discovered the ess-font-lock.el file. For me,
the default color choices draw no distinction between keywords and
functions :o( This can be fixed by something like this in your init file:
(require 'ess-site)
(require 'ess-font-lock)
(ess-font-lock-db)
There are some other choices possible as well, but for XEmacs they need
some tweaking (committing for next release RSN). For example:
(defun ess-font-lock-wheat ()
"Set font-lock colors to Richard Heiberger's wheat color scheme."
(interactive)
(if (featurep 'xemacs) nil ; line added to workaround XEmacs bug/feature
(set-foreground-color "Black")
(set-background-color "Wheat")
) ; line added to workaround XEmacs bug/feature
(set-face-foreground 'modeline "Wheat")
(set-face-background 'modeline "Sienna")
(set-face-foreground 'font-lock-comment-face "Firebrick")
(set-face-foreground 'font-lock-function-name-face "Blue")
(set-face-foreground 'font-lock-keyword-face "Purple")
(if (eq font-lock-reference-face 'font-lock-constant-face )
(set-face-foreground 'font-lock-constant-face "Brown")
(set-face-foreground 'font-lock-reference-face "Brown"))
(set-face-foreground 'font-lock-string-face "VioletRed")
(set-face-foreground 'font-lock-type-face "Sienna")
(set-face-foreground 'font-lock-variable-name-face "Black"))
Rodney
More information about the ESS-help
mailing list