emacs-devel
[Top][All Lists]
Advanced

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

font-lock-maximum-decoration and how to make a default font-lock lower t


From: Vitalie Spinu
Subject: font-lock-maximum-decoration and how to make a default font-lock lower than maximal?
Date: Fri, 17 Aug 2012 14:29:12 +0200
User-agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.1.50 (gnu/linux)

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.




reply via email to

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