From: Michal Nazarewicz <mina86@mina86.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] font-core: add font-lock-{enable, disable}-global-for functions
Date: Sun, 04 Jan 2015 04:21:16 +0100 [thread overview]
Message-ID: <xa1tbnmf2pub.fsf@mina86.com> (raw)
In-Reply-To: <jwv7fx3705k.fsf-monnier+emacs@gnu.org>
On Sat, Jan 03 2015, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> (font-lock-disable-global-for): New functions for easy manipulation
>> of `font-lock-global-modes' variable.
> Can you give some background about why/when we'd need that?
This happened when I've been asked how to disable global-font-lock-mode
in compile-mode buffers. Simply replying:
(setq font-lock-global-modes '(not compilation-mode))
is not a good answer since it may destroy any previous configuration
user might have in their init.el. I'd imagine those functions would be
used in init.el.
I also thought they could be useful for major modes which wish to
disable GFF, but then I've discovered that all of them just do:
(set (make-local-variable 'font-lock-global-modes) nil)
> Also, do you happen to know why speedbar.el does this funny dance to
> avoid global-font-lock-mode from enabling font-lock in speedbar-mode?
No idea, but it's not the only major mode to disable font-lock-mode.
I assumed that was one of the use cases for the font-lock-global-modes
variable. I also had troubles with font-lock interacting with notmuch,
see <http://notmuchmail.org/pipermail/notmuch/2012/012244.html>, so
I assume there is something that breaks speedbar when font-lock is
enabled.
--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michał “mina86” Nazarewicz (o o)
ooo +--<mpn@google.com>--<xmpp:mina86@jabber.org>--ooO--(_)--Ooo--
next prev parent reply other threads:[~2015-01-04 3:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-03 15:51 [PATCH] font-core: add font-lock-{enable, disable}-global-for functions Michal Nazarewicz
2015-01-04 2:27 ` Stefan Monnier
2015-01-04 3:21 ` Michal Nazarewicz [this message]
2015-01-04 4:30 ` Stefan Monnier
2015-01-04 6:07 ` Michal Nazarewicz
2015-01-04 13:39 ` Stefan Monnier
2015-01-04 14:18 ` Dmitry Gutov
2015-01-04 14:43 ` Michal Nazarewicz
2015-01-04 14:56 ` Dmitry Gutov
2015-01-04 19:42 ` Stefan Monnier
2015-01-04 22:07 ` Dmitry Gutov
2015-01-04 23:44 ` Stefan Monnier
2015-01-05 0:02 ` Dmitry Gutov
2015-01-05 0:08 ` Dmitry Gutov
2015-01-05 1:49 ` Stefan Monnier
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xa1tbnmf2pub.fsf@mina86.com \
--to=mina86@mina86.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.