Syntax highliting in ESS

David Brahm brahm at alum.mit.edu
Mon Jun 28 20:13:26 CEST 2004


Steven McKay Curtis <smc52 at email.byu.edu> wrote:
> I am a newbie to ESS and Emacs, and I was a little disappointed by the syntax
> highlighting.  The only thing that seems to change colors/fonts is the <-
> symbol.  Do I have ESS configured wrong?  Or is there some way to customize
> the syntax highlighting so that other symbols and function names are
> highlighted?

The following lines in my .emacs file set the font and color scheme.  I've
noted in comments which syntax gets affected in S-mode and in TeX-mode.  I'm
using Emacs 21.3.1 under Solaris 2.8, and ESS 5.2.0beta4.  Hth.

(set-default-font "-adobe-courier-bold-r-normal--*-140-*-*-m-*-iso8859-1")
(global-font-lock-mode t)                                        ; S/R   TeX
(set-face-foreground 'font-lock-comment-face       "Firebrick")  ; #com  %com
(set-face-foreground 'font-lock-string-face         "SeaGreen")  ; "str" "str"
(set-face-foreground 'font-lock-keyword-face      "MediumBlue")  ; if    \end
(set-face-foreground 'font-lock-constant-face      "VioletRed")  ; fun<- {ctr}
(set-face-foreground 'font-lock-type-face      "DarkGoldenrod")  ; T,F    ?
(set-face-foreground 'font-lock-variable-name-face      "Blue")  ; xv
(set-face-foreground 'font-lock-function-name-face "VioletRed")  ; <-    {eq1}

-- 
                              -- David Brahm (brahm at alum.mit.edu)




More information about the ESS-help mailing list