From: Tassilo Horn <tsdh@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Defer jit-lock on a per-buffer basis
Date: Thu, 15 Nov 2012 19:28:05 +0100 [thread overview]
Message-ID: <871ufuk9fu.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: 83obiyu7p7.fsf@gnu.org
Eli Zaretskii <eliz@gnu.org> writes:
>> So is there a way to enable deferred jit-lock on a per-buffer basis?
>
> Not without rewriting the JIT Lock code, I think. JIT Lock goes over
> all of the buffers with the same timers, so any option you customize
> will affect all of the buffers.
Right, so why not simply making the timers buffer-local, too? I've
tried that
--8<---------------cut here---------------start------------->8---
(defun th-jit-lock-defer-fontification ()
(interactive)
(make-local-variable 'jit-lock-stealth-timer)
(make-local-variable 'jit-lock-stealth-repeat-timer)
(make-local-variable 'jit-lock-context-timer)
(make-local-variable 'jit-lock-defer-timer)
(set (make-local-variable 'jit-lock-defer-time) 0.1)
(font-lock-mode -1)
(font-lock-mode 1))
--8<---------------cut here---------------end--------------->8---
and it seems to work exactly as expected. :-)
Thanks,
Tassilo
next prev parent reply other threads:[~2012-11-15 18:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-15 9:29 Defer jit-lock on a per-buffer basis Tassilo Horn
2012-11-15 16:55 ` Eli Zaretskii
2012-11-15 18:28 ` Tassilo Horn [this message]
[not found] <mailman.13022.1352971819.855.help-gnu-emacs@gnu.org>
2012-11-15 20:38 ` 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=871ufuk9fu.fsf@thinkpad.tsdh.de \
--to=tsdh@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/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.