G'day, Andreas and the list,
 
Byte-compiling the ess-cust.el file was the answer. Thanks!  A nice
thing to happen on a Friday afternoon.
 
Regards,
 
Peter
 

________________________________

From: Andreas Kiermeier [mailto:andreas.kiermeier@gmail.com] 
Sent: Friday, 27 November 2009 4:26 PM
To: Peter Geelan-Small
Cc: ess-help@stat.math.ethz.ch
Subject: Re: [ESS] Customizing the Syntax Highlighting in R


Hi Peter,

just tried it and it works for me. I'm not sure whether Vincent's
distribution includes the byte compiled files (.elc), but my guess would
be that this is where things go off the rails.

Try this:
* Open the ess-cust.el
* Find the line for ess-R-keywords and add "ls" at the end, so it reads:

(defvar ess-R-keywords
  '("while" "for" "in" "repeat" "if" "else" "switch" "break" "next"
    "function" "return" "message" "warning" "stop" "ls"))

* Save the file (it's an easy change to reverse) and then select the
"Emacs-Lisp" menu entry and chose "Byte-compile This File".
* Exit Emacs and start it again.
* Open a transcript file (.R) file and type the ls command which should
fontify properly.

Hope that helps and works for you - just remember that you'll need to
make this change whenever you upgrade Vincent's distribution or install
a new version of ESS.

Cheers

Andreas




2009/11/27 Peter Geelan-Small <p.geelan-small@usyd.edu.au>


	G'day, McKay and others,
	
	I tried the hack below but unfortunately it didn't work for me.
Does anyone have any suggestions what I should look for to work out why?
Please bear in mind I am an Emacs novice!
	
	I'm using Vincent Goulet's Emacs 23.1 + ESS 5.4 package under
Windows XP SP2.
	
	Looking forward to some interesting suggestions,
	
	Peter
	
	
	-----Original Message-----
	From: ess-help-bounces@stat.math.ethz.ch
[mailto:ess-help-bounces@stat.math.ethz.ch] On Behalf Of S. McKay Curtis
	Sent: Sunday, 22 November 2009 4:49 AM
	To: Paul Heinrich Dietrich
	Cc: ess-help@stat.math.ethz.ch
	Subject: Re: [ESS] Customizing the Syntax Highlighting in R
	
	Hi Paul,
	
	This hack worked for me
	
	http://old.nabble.com/Font-locking-td22839833.html
	
	although I admit it's not very pretty.
	
	McKay
	
	On Fri, Nov 20, 2009 at 7:17 PM, Paul Heinrich Dietrich
<paul.heinrich.dietrich@gmail.com> wrote:
	>
	> I'm coming over to Emacs after using gvim, in which I built a
R syntax
	> highlighting file with thousands of keywords, because I
routinely use
	> numerous R packages.  In the default for Emacs + ESS, I see
	> highlighting for only a few things, such as <-, TRUE, if, and
for.
	> For example, I would like to add the following R functions as
	> keywords, such as length, round, nrow, names, and read.csv in
the colour red.  Thank you for any suggestions.
	>
	>
	> Stephen Eglen wrote:
	>>
	>> I don't think there is an easy way to do this -- there is the
	>> variable
	>>
	>> inferior-ess-R-font-lock-keywords
	>>
	>> but that is not easy for a beginner to edit.  Could you give
an
	>> example of what you would like highlighted and in what
colour?
	>>
	>> ______________________________________________
	>> ESS-help@stat.math.ethz.ch mailing list
	>> https://stat.ethz.ch/mailman/listinfo/ess-help
	>>
	>>
	>
	> --
	> View this message in context:
	>
http://old.nabble.com/Customizing-the-Syntax-Highlighting-in-R-tp26443
	> 563p26453433.html Sent from the ESS - Help mailing list
archive at
	> Nabble.com.
	>
	> ______________________________________________
	> ESS-help@stat.math.ethz.ch mailing list
	> https://stat.ethz.ch/mailman/listinfo/ess-help
	>
	
	______________________________________________
	ESS-help@stat.math.ethz.ch mailing list
	https://stat.ethz.ch/mailman/listinfo/ess-help
	
	______________________________________________
	ESS-help@stat.math.ethz.ch mailing list
	https://stat.ethz.ch/mailman/listinfo/ess-help
	



	[[alternative HTML version deleted]]

