emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] font-core: add font-lock-{enable, disable}-global-for functi


From: Michal Nazarewicz
Subject: Re: [PATCH] font-core: add font-lock-{enable, disable}-global-for functions
Date: Sun, 04 Jan 2015 04:21:16 +0100
User-agent: Notmuch/0.19~rc1+1~g03aea4f (http://notmuchmail.org) Emacs/25.0.50.1 (x86_64-unknown-linux-gnu)

On Sat, Jan 03 2015, Stefan Monnier <address@hidden> 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 +--<address@hidden>--<xmpp:address@hidden>--ooO--(_)--Ooo--



reply via email to

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