From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: [rudalics@gmx.at: Re: jit lock sit-for provokes redisplay provokes imenu] Date: Wed, 30 Aug 2006 13:59:26 -0400 Message-ID: References: <8764gcde3n.fsf@stupidchicken.com> <878xl754fy.fsf@furball.mit.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1156960920 8748 80.91.229.2 (30 Aug 2006 18:02:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 30 Aug 2006 18:02:00 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 30 20:01:56 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GIUNa-0002lO-As for ged-emacs-devel@m.gmane.org; Wed, 30 Aug 2006 20:01:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GIUNa-0002p4-0m for ged-emacs-devel@m.gmane.org; Wed, 30 Aug 2006 14:01:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GIULY-0001kv-Nt for emacs-devel@gnu.org; Wed, 30 Aug 2006 13:59:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GIULY-0001kX-5O for emacs-devel@gnu.org; Wed, 30 Aug 2006 13:59:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GIULX-0001kS-Rb for emacs-devel@gnu.org; Wed, 30 Aug 2006 13:59:27 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GIUUz-0007BT-Dz for emacs-devel@gnu.org; Wed, 30 Aug 2006 14:09:13 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1GIULW-0000NH-V1; Wed, 30 Aug 2006 13:59:26 -0400 Original-To: Chong Yidong In-reply-to: <878xl754fy.fsf@furball.mit.edu> (message from Chong Yidong on Tue, 29 Aug 2006 22:43:13 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:59123 Archived-At: How about this? It adds jit-lock-pre-stealth-fontify-hook and jit-lock-post-stealth-fontify-hook, which are normal hooks run before and after each chunk of stealth fontification. Then imenu can use this to avoid menu bar updates resulting from stealth fontification. It looks good to me. Stefan wrote: This only eliminates one particular source of unwanted updates. I don't think this code is worth the trouble. That cause of unwanted updates is the only one we know of. Nothing else is likely to change the buffer in the background. It's a fairly simple and safe solution to the problem that we are working on, and I think that's definitely worth the trouble. At the very least, add it to font-lock rather than jit-lock. Why would that be better? Better yet, introduce a macro `with-buffer-unmodified' like the one used in jit-lock, and make it manage a `buffer-really-modified-tick', kind of like the buffer-chars-modified-tick. Then use it in jit-lock/font-lock and friends. That seems a lot more trouble, and I don't see that it is needed.