From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Vitalie Spinu <spinuvit@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: trunk r116426: * lisp/jit-lock.el (jit-lock-mode): Keep it disabled in indirect buffers.
Date: Fri, 23 May 2014 09:27:35 -0400 [thread overview]
Message-ID: <jwvoayo7i2v.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87k39ee7qm.fsf@gmail.com> (Vitalie Spinu's message of "Wed, 21 May 2014 21:51:29 -0700")
> Waste of time or not, it has been done: https://github.com/vitoshka/polymode
How 'bout we add it to GNU ELPA?
> Only recently I found time to finish the design, but then discovered
> that jit-lock was removed. I am piggybacking on jit-lock and its removal
> is a real bad luck. The last thing I need right now is to re-implement
> jit-lock in indirect buffers.
jit-lock support was broken. So if you want it back, we need to fix it.
The problem is simple: jit-lock relies on the `fontified' text-property
to decide what needs to be (re)fontified. And like all text-properties,
this property is shared between the base buffer and the
indirect buffers.
So when jit-lock is triggered it has to refontify in all buffers that
share the same base buffer. And if font-lock is activated in several
buffers which share the same base buffer, they'll fight over their
shared `face' text-property.
A related issue is that after/before-change-functions are currently only
run in the current-buffer, even though the changes affect all buffers
which share the same base-buffer.
I think the right fix is to change the C code such that
fontification-functions and after/before-change-functions are always
obeyed only in the base buffer. I.e. when displaying an indirect
buffer, we'd check the fontification-functions of the base buffer and
run jit-lock in that base-buffer. When making changes in an indirect
buffer, we'd check after/before-change-functions in the base buffer and
run them there.
Do you think you could try to write such a patch?
Stefan
next prev parent reply other threads:[~2014-05-23 13:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-07 18:34 trunk r116426: * lisp/jit-lock.el (jit-lock-mode): Keep it disabled in indirect buffers João Távora
2014-04-07 20:37 ` Glenn Morris
2014-04-07 20:48 ` João Távora
2014-04-07 20:40 ` Stefan Monnier
2014-05-22 4:51 ` Vitalie Spinu
2014-05-23 13:27 ` Stefan Monnier [this message]
2014-05-23 17:58 ` Vitalie Spinu
2014-05-23 20:49 ` Stefan Monnier
2014-05-23 23:15 ` Vitalie Spinu
2014-05-24 3:10 ` Stefan Monnier
2014-05-24 9:46 ` Vitalie Spinu
2014-05-24 14:35 ` Stefan Monnier
2014-05-30 19:26 ` Vitalie Spinu
2014-05-30 19:54 ` 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=jwvoayo7i2v.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--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 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.