[ESS] no color on functions that are R built in like "lm" or "mean"

Vitalie Spinu spinuvit at gmail.com
Wed Aug 8 21:20:06 CEST 2012


  >> Martin Maechler <maechler at stat.math.ethz.ch>
  >> on Wed, 8 Aug 2012 20:03:37 +0200 wrote:

  > On Wed, Aug 8, 2012 at 1:07 PM, Vitalie Spinu <spinuvit at gmail.com> wrote:
  >> 
  >> Hi Paul,
  >> 
  >> I have been using personal tweaks to highlight functions for years. And
  >> I must definitely say that it's a nice thing, as it helps distinguish
  >> what is what.  As far as I know all other editors also highlight
  >> functions.

  > Yes, and I always found it awful.
  > Which of the 10000 functions of the base and recommended (and other CRAN ?)
  > packages should be highlighted and which not?

All of them :)

  > Also,  "{" and "(" and "+" and .... are all functions as well in R.
  > Honestly I've always found it distracting and a bit ridiculous when
  > I've occasionally seen other  editors do it....
  > ...

It's highly dependent on the color theme. Some themes would use bright,
or think, or tall fonts for function names. Then it is indeed
distracting. 

I have added ess-function-call-face, which by default inherits form
font-lock-function-name-face. There is also ess-function-call-face
variable to hold the name of the face you want.

  > but yes, it is a entirely a matter of taste (and what you are used to).

  > I think we should make this easily configurable, 

Right. There is a build in facility for user specific configuration in
font-lock. See `font-lock-maximum-decoration'. 

I didn't have time for that; will look into as soon as I can. 

Best, 
Vitalie.



More information about the ESS-help mailing list