[ESS] font-lock behaviour

Dan Davison davison at stats.ox.ac.uk
Sat Aug 18 16:11:37 CEST 2007


With ess 5.3.5 in (.R and *R* buffers), there's a minor difference in the font-lock behaviour which has a slightly undesirable consequence: briefly, whereas previously (5.3.4) the two characters `' were considered as a pair of opening and closing quotes and thus marked some characters as a string, the ' no longer seems to close the quote opened by `. I'm not putting forward an opinion as to whether that's appropriate or not, but one example of it having slightly annoying consequences is the following: if you create a shared library from within R with a command like 

system("R CMD SHLIB tmp.c")

then you get output in the *R* buffer like

make: `tmp.so' is up to date.

which leaves the font-lock thinking that you're in the middle of a string, my most elegant solution to which is

`
<ctrl-c>
<ctrl-c>

to get correct font-lock back... So if possible, perhaps `' should be allowed as a opening-closing pair?

While I'm making trivial complaints about such nice and sophisticated software, one more question: the following code is evaluated at start-up by the default ess installation, but is there any way to prevent it printing to screen?

> if(!exists("baseenv", mode="function")) baseenv <- function() NULL
> options(STERM='iESS', editor='emacsclient')

Thanks a lot,

Dan

> version
               _                           
platform       i686-redhat-linux-gnu       
arch           i686                        
os             linux-gnu                   
system         i686, linux-gnu             
status                                     
major          2                           
minor          5.1                         
year           2007                        
month          06                          
day            27                          
svn rev        42083                       
language       R                           
version.string R version 2.5.1 (2007-06-27)
>




More information about the ESS-help mailing list