In article <··············@eho.eaglets.com>,
Sam Steingold <···@goems.com> writes:
> Emacs cannot highlight loop keywords because it uses regexps for that
> and one needs to highlight things like "for" and "across" in `loop'
> context only. OTOH, it highlights all keywords like `:foo'
> automatically. What about writing
>
> (loop :for zz :in '(a b c) :do (print zz))
>
> Looks like all the implementations grok this, and Emacs highlights is
> nicely.
>
> [tongue in cheek]
I find that most repugnant! Yuck! Instead of bastardizing your code, why
don't you fix emacs? :-)
Mike McDonald
·······@mikemac.com
·······@mikemac.com (Mike McDonald) writes:
> In article <··············@eho.eaglets.com>,
> Sam Steingold <···@goems.com> writes:
> > Emacs cannot highlight loop keywords because it uses regexps for that
> > and one needs to highlight things like "for" and "across" in `loop'
> > context only. OTOH, it highlights all keywords like `:foo'
> > automatically. What about writing
> >
> > (loop :for zz :in '(a b c) :do (print zz))
> >
> > Looks like all the implementations grok this, and Emacs highlights is
> > nicely.
> >
> > [tongue in cheek]
>
> I find that most repugnant! Yuck! Instead of bastardizing your code, why
> don't you fix emacs? :-)
This is a very hard thing to do, regardless of the language you do
it. In order to do it right, you'd need to actually re-implement
font-lock in such a way that it used a context-sensitive parser, given
that you may have to "colorize" partial language fragments (i.e. a CF
parsere may not be enough).
I am not up to this. I'd settle for a better implementation of
cl-indent. :)
Cheers
--
Marco Antoniotti ===========================================
PARADES, Via San Pantaleo 66, I-00186 Rome, ITALY
tel. +39 - (0)6 - 68 10 03 16, fax. +39 - (0)6 - 68 80 79 26
http://www.parades.rm.cnr.it