opensubscriber
   Find in this group all groups
 
Unknown more information…

e : emacs-devel@gnu.org 17 August 2012 • 8:29PM -0400

font-lock-maximum-decoration and how to make a default font-lock lower than maximal?
by Vitalie Spinu

REPLY TO AUTHOR
 
REPLY TO GROUP





Hi,

As a mode developer how can I set default font-lock level lower than
maximal (aka t)?

For example, assume you are developing X-mode and some users would like
to have functions + numbers + other stuff highlighted, but you don't
want to activate those by default. So you can add font-lock keyword
levels (2, 3, 4 etc) to accommodate this preference, but want to set the
default to 2.

What is the emacs recommendation for how to cleanly achieve this without
interfering with user level font-lock-maximum-decoration?

It looks to me that emacs should set font-lock-maximum-decoration to a
number instead to `t' by default. Then mode developers can easily decide
what font-lock to activate by default by setting appropriate keywords up
to that level only, and everything else on a higher level.

Thanks,
Vitalie.



Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.