emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: Re: mouse cannot be used in *grep* buffer if font-lo


From: Daniel Pfeiffer
Subject: Re: address@hidden: Re: mouse cannot be used in *grep* buffer if font-lock is turned off]
Date: Wed, 20 Oct 2004 09:07:23 +0200

Saluton,

David Kastrup <address@hidden> skribis:

> address@hidden (Daniel Pfeiffer) writes:
> > I too am not sure about the argument of always running this if you
> > get no benefit.

Come to think of it, imenu is highly redundant with what font-lock does.  And
many modes set it up, whether you use it or not.  Same goes for
outline-minor-mode, which can't fontify the "headlines", because it's not
integrated with font-lock.

> >  As for compilation and grep the benefit is clear.
> > Font-lock has rather good parsing capabilities, and these modes need
> > that.  The gaudiness is a side effect really.
> 
> Sounds like the "if all you have is a hammer, every problem looks like
> a nail" concept.  If font lock is employed for something it is not
> intended for because of efficiency, maybe we need to abtract the
> parsing parts into useful packages of their own and make font lock use
> them.

True.  But font-lock is already so widely supported, that it's gonna be hard
to change radically.  As for setting other properties, this is a fairly recent
add-on.  It was done in such a way, that it does not allow not setting `face'.
 Maybe that part could be prudentially loosened.

Compile/grep uses the same regexps to understand the output, as it does to
highlight them.  Here there would be no benefit from dissociating the two. 
Stef's suggestion of making faces show optionally makes more sence for that.

Parsing can't ever be good enough.  Emacs for e-lisp and Eclipse for Java are
about as close as you can get -- and even they are not perfect (think of a `('
in the fist column of a string).  They have an "unfair" advantage, being able
to look into the interpreter.

For all others we must try real hard to understand the buffer contents.
Font-lock, for all its restrictions, is by far the best parser we have, so we
need to build up on that.

coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer

-- 
lerne / learn / apprends / lär dig / ucz się    Esperanto:
                              http://lernu.net/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]