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

Rodney Sparapani rsparapa at mcw.edu
Mon Mar 9 22:25:26 CET 2009

S. McKay Curtis wrote:
> Hi Rodney,
> Thanks for you insights and suggestions.
> Regarding the highlighting of "i" when not followed by a "(":
> I altered the regular expression for keywords in the essd-bugs.el
> file.  The original version would highlight both the keyword and the
> following open parenthesis "(".  I changed the regular expression to
>    (cons (concat "\\<\\(for\\|cloglog\\|equals\\|exp\\|inprod\\|"
> 		 "inverse\\|log\\(det\\|fact\\|gam\\|it\\)?\\|max\\|"
> 		 "mean\\|min\\|phi\\|pow\\|probit\\|sd\\|sqrt\\|"
> 		 "step\\|sum\\|I\\)\\>")
> 	 font-lock-function-name-face)
> which now only highlights the keywords (and not the opening
> parenthesis).  I apologize for not having mentioned this earlier! I
> encountered this problem with "font-lock-keywords-case-fold-search" a
> while back and have just now decided to submit it to the help (as I
> have started working with BUGS again), so I forgot to mention that I
> changed this regular expression.
> I would think that changing this regular expression should not affect
> the ability to set the variable "font-lock-keywords-case-fold-search"
> within a hook, though.  I still get the behavior I expect once I
> manually set the variable "font-lock-keywords-case-fold-search" to
> "nil", but I can't seem to set this value with the ess-bugs-mode-hook.
> I should upgrade to the latest version of ESS, though; thanks for
> pointing this out.
No one is expecting the Spanish Inquisition!!! 

Now that we have that all cleared up :o)  I can confirm that this
is a bug in 22.3.1.  Somehow, that setting of ess-bugs-font-lock-keywords
triggers the bug since it does not exist with the default setting.  As I
suspected ESS 5.3.11 is no help here since it is a GNU Emacs problem.
So, I guess you should file a bug report with them if one is not already
there.  I know that there is supposed to be a beta for the next release
of GNU emacs, but I don't know where you can get it.  There is always
XEmacs which does work correctly in this case.

Rodney Sparapani      Center for Patient Care & Outcomes Research (PCOR)
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 mailing list