[ESS] Syntax Highlighting
rsparapa at mcw.edu
Thu Jan 31 18:52:34 CET 2013
On 01/31/2013 11:04 AM, Oliver Jones wrote:
> just I guess:
> screwing multiplication shouldn't be a problem since the
> asterisk is the comment symbol just if it is the first symbol of a
> fresh line.
> And a little quick and dirty trick to keep */ as the ending of a
> block comment maybe is to define "* ", i.e. asterisk followed by
> a white space, as the start of a fence comment?
> If it works it's not perfect but a big improvement in my opinion.
Actually, this is not part of the syntax table. This would be
handled by the font-lock-comment-face. This is what we do for SAS
which has a similar knucklehead comment, i.e.
* this is a knucklehead comment in SAS ;
The variable for Stata is ess-STA-mode-font-lock-defaults
And you would need to add something like this to it...
(cons "^[*].*$" font-lock-comment-face)
But, it's not quite that simple since just setting this
variable in .emacs like so does not work ;o(
Rodney Sparapani, PhD Center for Patient Care and Outcomes Research
Sr. Biostatistician http://www.mcw.edu/pcor
4 wheels good, 2 wheels better! Medical College of Wisconsin (MCW)
WWLD?: What Would Lombardi Do? Milwaukee, WI, USA
More information about the ESS-help