emacs-devel
[Top][All Lists]
Advanced

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

RE: font-lock-maximum-decoration should be 2 by default?


From: Drew Adams
Subject: RE: font-lock-maximum-decoration should be 2 by default?
Date: Sat, 18 Aug 2012 21:39:00 -0700

> > It is clear to me that there are users, today, who want 
> > less fontification in some modes (I've heard from some of them).
> > This variable gives them a way to get that.
> 
> I suspect that those users would be just as well served, if not better
> served due to the lack of support in many modes for font-lock 
> levels, by customizing the font-lock faces.

Are you thinking that font lock uses only the `font-lock-*' faces?  Or do you
(hopefully) mean any faces at all that happen to be used for font locking?

Either way, font-locking is about a particular _use_ of a face.  Customizing
that use is not the same as customizing the face itself - which affects all uses
of it.  

Customizing the highlighting used in emacs-lisp-mode should mean just that.
That is not the same as customizing some or all of the faces that happen to be
used for emacs-lisp-mode font-locking.

Sure, if you want to remove some highlighting in a particular mode (e.g., to
simulate a lower decoration level), you can customize some faces used to
highlight that mode.  E.g., you can remove some or all of a face's attributes,
or just make it inherit from `default' to nullify it.

But customizing the face itself affects that face wherever it is used.  That is
a lousy workaround for customizing the _font-locking_ used in a particular mode.

To the extent that a particular mode defines its own faces and uses no others
for font-locking, yes, you can use such a workaround without affecting other
highlighting elsewhere.  But it's still a lousy workaround.  Customizing faces
to be like `default' in order to remove their visible font-lock effects is a
poster child for "workaround".




reply via email to

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