all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
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: Sat, 24 May 2014 10:35:11 -0400	[thread overview]
Message-ID: <jwvk39b2qtm.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87d2f3y0f8.fsf@gmail.com> (Vitalie Spinu's message of "Sat, 24 May 2014 02:46:03 -0700")

> If the patch that you propose is ever implemented, local hooks will
> still be run in current buffer, right?

No, my intention is to only run the hooks in the base buffer.  It would
then be the responsability of some other package (e.g. polymode) to add
a function to the base-buffer hook to also run the hook in those
indirect buffers that need it.

> Coming back to the original jit-lock problem. I still have no clue how
> to fix it without copying the whole initialization part of jit-lock into
> polymode.

Enable font-lock in the base buffer (and only there) using polymode's
font-lock rules (which will dispatch to the appropriate indirect buffer).

>> 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.
> I have just tried this in emacs 24.3.1 and font-lock is triggered only
> once in indirect buffers.

Yes: "has to" is a requirement that was never fulfilled.

> This patch doesn't affect cloning and jit-lock is still active in cloned
> indirect buffers.

Right, that's arguably a bug as well.  Not sure how important it is to
fix it.


        Stefan



  reply	other threads:[~2014-05-24 14:35 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
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 [this message]
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=jwvk39b2qtm.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.