[ESS] font-lock-keywords-case-fold-search in BUGS mode

Stephen Eglen S.J.Eglen at damtp.cam.ac.uk
Fri Mar 13 11:39:33 CET 2009


[Just for the archives]

> All keywords (like "for", "dnorm", etc.) are font locked as I would
> expect them to be, *except* the subscript "i" is also font locked
> (e.g. in Y[i,1:4]).  This is because "I" (capital i) is defined as a
> keyword (because it's used in specifying truncated distributions like
> "dnorm(0,1) I(0,)"), but because "font-lock-keywords-case-fold-search"
> is set to "t" so the lower case "i" when used as an index is also
> highlighted.  Similarly, if I were to type "FOR" (all caps) into this
> buffer, it would also be highlighted.
> 
> I can get the syntax highlighting that I expect by setting the value
> of font-lock-keywords-case-fold-search manually ("M-x set-variable
> [RET] font-lock-keywords-case-fold-search [RET] nil"), but my attempt
> to add a hook to do this automatically hasn't worked.
> 
> I am using GNU Emacs 22.3.1 and ESS 5.3.8.

I have just tried Emasc 23.0.91 pretest, and I do not see problems with
i being font-locked.  This issue may have been fixed since 22.3

Stephen




More information about the ESS-help mailing list