[ESS] ESS and font-lock support.

Rodney Sparapani rsparapa at mcw.edu
Fri Dec 17 15:51:23 CET 2010


On 12/17/10 07:42 AM, gerald.jean at dgag.ca wrote:
SNIP

> (require 'ess-site)
> (require 'ess-font-lock)
> (ess-font-lock-db)  ;;  This single function caused the problem.
>
> I went to "ess-font-lock.el" and found:
>
> (defun ess-font-lock-db ()
>    "Set font-lock colors (leave fore-/back-ground alone) courtesy David
> Brahm<David.Brahm at fmr.com>"
>    (interactive)
>    (set-face-foreground 'font-lock-comment-face       "Firebrick")  ; #...
> %...
>    (set-face-foreground 'font-lock-string-face        "SeaGreen")   ; "..."
> "..."
>    (set-face-foreground 'font-lock-keyword-face       "MediumBlue") ; if
> \end
>    (set-face-foreground 'font-lock-function-name-face "VioletRed")  ; talk<-
> {center}
>    (set-face-foreground 'font-lock-variable-name-face "Blue")         ; xv
>    (set-face-foreground 'font-lock-type-face          "Goldenrod")  ; T,F
> ?
>    (set-face-foreground 'font-lock-constant-face      "Magenta")    ;<-
> {eq1}
> )

SNIP

Hi Gerald:

It's not a bug, it's a feature :o)  If you call this function written
by David, it does exactly what he meant it to.  The Emacs version
weirdness must be due to an Emacs bug and/or feature.  If you don't
like one of the colors, just create your own function and change
the colors accordingly.  That's all the ess-font-lock.el file is
after all; a bunch of color themes.  I personally have been using
David's color scheme for a long time; probably almost as long as
I have been using ESS which is about 12 years now.

Rodney



More information about the ESS-help mailing list