emacs-devel
[Top][All Lists]
Advanced

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

RE: font-lock-maximum-decoration and how to make a defaultfont-lock lowe


From: Drew Adams
Subject: RE: font-lock-maximum-decoration and how to make a defaultfont-lock lower than maximal?
Date: Fri, 17 Aug 2012 08:57:28 -0700

>   > I think it's not up to the mode developer to decide that. 
>   > It's up to the user.  So you as developer should provide
>   > all the fontifications your users may wish to have,

Or that you might want your users to have. ;-)

>   > and let them decide what to activate.
> 
> You mean "let them decide what to deactivate"?

I can't speak for what Eli meant, but yes, let the users decide.

> All levels are activated by default (font-lock-maximum-decoration is t).

Yes, Emacs Dev concluded after many years that `t' is the most appropriate
default value.

As with any user option, one size might not fit all, and it might not be obvious
to users that there is an option for changing this, and even for changing it on
a per-mode basis.  You might want to remind them, for your mode.

> And obviously some guys (may be including the developer) don't like that.

If you mean that you don't like `t' to be the default, then argue here for a
change in default value.  If you mean that you don't like `t' for your own use,
then customize the option.

If you mean that you don't want the default behavior for a mode you create to be
maximum, then you are out of luck.

You can restrict extra fontification in your mode by simply not providing it.
But if you provide more than one fontification level then users get to choose
which level to use, and the default is maximum fontification.

You can also add to the Commentary for your mode (or even to the mode's doc
string, if you think it is important) that you recommend setting the font-lock
decoration for this mode to ___.  Or just remind users about the possibility -
e.g.,

;;  If you want a minimum fontification for Foobar mode,
;;  then customize option `font-lock-maximum-decoration'.
;;  If you want a different fontification level for Foobar
;;  than for other modes, you can do this too by customizing
;;  `font-lock-maximize-decoration'.




reply via email to

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