unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Vitalie Spinu'" <spinuvit@gmail.com>, "'Eli Zaretskii'" <eliz@gnu.org>
Cc: emacs-devel@gnu.org
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	[thread overview]
Message-ID: <95FA6116C6194DAAA658F916B48C5E23@us.oracle.com> (raw)
In-Reply-To: <87obm98trc.fsf@gmail.com>

>   > 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	other threads:[~2012-08-17 15:57 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-17 12:29 font-lock-maximum-decoration and how to make a default font-lock lower than maximal? Vitalie Spinu
2012-08-17 14:29 ` Eli Zaretskii
2012-08-17 14:42   ` Vitalie Spinu
2012-08-17 15:57     ` Drew Adams [this message]
2012-08-17 19:49       ` font-lock-maximum-decoration should be 2 by default? Vitalie Spinu
2012-08-17 20:26         ` Eli Zaretskii
2012-08-17 20:53           ` Drew Adams
2012-08-18  6:59             ` Eli Zaretskii
2012-08-19  2:32               ` Jason Rumney
2012-08-19  3:13                 ` Drew Adams
2012-08-19  3:34                   ` Jason Rumney
2012-08-19  4:39                     ` Drew Adams
2012-08-19 10:50                     ` Vitalie Spinu
2012-08-19 16:46                   ` Eli Zaretskii
2012-08-19 17:33                     ` Drew Adams
2012-08-19 10:34                 ` Andreas Schwab
2012-08-19 16:48                   ` Eli Zaretskii
2012-08-17 20:50         ` Drew Adams
2012-08-17 22:47           ` Vitalie Spinu
2012-08-18  7:03             ` Eli Zaretskii
2012-08-18 10:10             ` Vitalie Spinu
2012-08-21 17:31               ` Stefan Monnier
2012-08-22 16:50                 ` Vitalie Spinu
2012-08-26 18:27                 ` Drew Adams
2012-08-18  5:10         ` Stephen J. Turnbull
2012-08-18 10:03           ` Vitalie Spinu
2012-08-19 11:10             ` Stephen J. Turnbull
2012-08-19 11:47               ` Vitalie Spinu
2012-08-19 13:23                 ` Stephen J. Turnbull
2012-08-17 17:36     ` font-lock-maximum-decoration and how to make a default font-lock lower than maximal? Eli Zaretskii
2012-08-21 17:24 ` Stefan Monnier
2012-08-26 18:26   ` font-lock-maximum-decoration and how to make a default font-locklower " Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=95FA6116C6194DAAA658F916B48C5E23@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=spinuvit@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).