From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel 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 Message-ID: References: <87k39ee7qm.fsf@gmail.com> <87ioowcr7l.fsf@gmail.com> <8738g0ccig.fsf@gmail.com> <87d2f3y0f8.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1400942140 18682 80.91.229.3 (24 May 2014 14:35:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 May 2014 14:35:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: Vitalie Spinu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 24 16:35:33 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WoD2r-0003Nj-EM for ged-emacs-devel@m.gmane.org; Sat, 24 May 2014 16:35:33 +0200 Original-Received: from localhost ([::1]:48193 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoD2q-0001GW-Nh for ged-emacs-devel@m.gmane.org; Sat, 24 May 2014 10:35:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoD2f-0001GL-JC for emacs-devel@gnu.org; Sat, 24 May 2014 10:35:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WoD2Y-0001mP-3s for emacs-devel@gnu.org; Sat, 24 May 2014 10:35:21 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:33583) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoD2X-0001mE-W9 for emacs-devel@gnu.org; Sat, 24 May 2014 10:35:14 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVPO+KQe/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAjSGReOegeEOASpGYFqgXGBWyE X-IPAS-Result: ArUGAIDvNVPO+KQe/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAjSGReOegeEOASpGYFqgXGBWyE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="63959873" Original-Received: from 206-248-164-30.dsl.teksavvy.com (HELO pastel.home) ([206.248.164.30]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 24 May 2014 10:35:12 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id CA6086013A; Sat, 24 May 2014 10:35:11 -0400 (EDT) In-Reply-To: <87d2f3y0f8.fsf@gmail.com> (Vitalie Spinu's message of "Sat, 24 May 2014 02:46:03 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:172061 Archived-At: > 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