font-lock-builtin-face not found?

Patrick Ball patrick_ball2001 at yahoo.com
Tue Nov 20 17:41:44 CET 2001


Rodney:

hooray!  That got a solid 90% of the problem solved.  The hook error is gone,
and *most* of the "endless" stata keywords are font-locked.  (the "endless"
crack comes from a comment in essl-sta.el - and I heartily agree)

The keywords that essl-sta still can't handle are few (qui for capture syntax
etc), and they are only ignored if there is no whitespace in front of them on
the line. essl-sta doesn't want to begin indenting inside a program define (in
stata there's no block identifier like { } ), so this occurs often.  If I
manually insert whitespace, they're font-locked.

I'm impressed with essl-sta's ability to parse stata's ugly macro language. It
handled this line, and distinguished the macros inside the `' from raw strings:


  di "model `mspec': e`i' = " %6.1f `e`i'' ", q`i'= " %6.1f `q`i'' ", v`i'=" /*
     */ %6.1f `v`i'' ", v`i'a=" %6.1f = v`i'a[1] ", brat=" %5.3f `brat'

sheesh.  stuff like that makes one yearn for perl's clean & transparent syntax.
How did I ever debug stuff like that _without_ emacs? 

How can I disable essl-s key bindings while I'm in ESS[STA]?  In particular,
the ess-smart-underscore is quite frustrating: " <- " is not the same as "_",
and the latter is important in stata (_rc, _n, _N, etc). 

meanwhile, I'm off to reset the other keybindings that weren't to my
preferences.  Thanks!  Another reason to love emacs.  Perhaps getting really
comfortable in ESS will ease my (someday) transition to R? 

-- PB.

*-------------------------------
http://hrdata.aaas.org/
http://shr.aaas.org/


--- Rodney Sparapani <rsparapa at post.its.mcw.edu> wrote:
> Patrick:
> 
> Apparently, font-lock mode has changed a bit.  But, I have never heard of 
> font-lock-builtin-face so it's been awhile.  You can do a search/replace of 
> essl-sta.el.  Here is a list of the faces.
> 
> ESS[STA]			Status
> font-lock-keyword-face		good
> font-lock-type-face		good
> font-lock-builtin-face		bad, replace with font-lock-reference-face
> font-lock-variable-name-face	good
> font-lock-function-name-face	good
> 
> Give it a try and let us know.  
> 
> Thanks, Rodney
> 
> >Date: Mon, 19 Nov 2001 12:15:20 -0800 (PST)
> >From: Patrick Ball <patrick_ball2001 at yahoo.com>
> >Subject: font-lock-builtin-face not found? 
> >To: ess-help at stat.math.ethz.ch
> >MIME-Version: 1.0
> >
> >Hello list - 
> >
> >I'm using ESS[STA], just starting out (though I've used Cperl, python-mode,
> >php-mode, and sql-mode for about a year). 
> >
> >I'm getting a couple of errors: 1) it doesn't recognize qui { } blocks - it
> >says the enclosing block is badly formed. This can be ignored. 
> >
> >More importantly, 2) it says that font-lock-builtin-face is not found when
> >called from font-lock-pre-idle-hook.  The result of problem 2 is that the
> font
> >lock only  about half works. For example, "ge" is highlighted, but
> "collapse"
> >is not.  Plus it issues this warning every time the hook gets called.
> >
> >I think that most likely I've installed something wrong, and I've looked
> >through essd-sta and  essl-sta, but I'm not particularly good at emacs-lisp
> and
> >nothing
> >obvious occurred to me.
> >
> >my setup:
> >
> >RH linux 7.2, kernel=2.4.7 (pretty much a stock install)
> >XEmacs 21.4
> >ESS 5.1.19
> >Stata 7.0/Unix (executable date 20 October 2001)
> >
> >I searched the 2001 archives of this list and found nothing relevant on
> >font-lock or stata.
> >
> >Does anything obvious occur to anyone?  Thanks in advance - PB
> >



__________________________________________________

Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
ess-help mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: ess-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the ESS-help mailing list