From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: [rudalics@gmx.at: Re: jit lock sit-for provokes redisplay provokes imenu] Date: Wed, 30 Aug 2006 09:52:03 +0200 Message-ID: References: <8764gcde3n.fsf@stupidchicken.com> <878xl754fy.fsf@furball.mit.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1156924435 669 80.91.229.2 (30 Aug 2006 07:53:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 30 Aug 2006 07:53:55 +0000 (UTC) Cc: Chong Yidong , rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 30 09:53:53 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 1GIKtJ-00039W-2O for ged-emacs-devel@m.gmane.org; Wed, 30 Aug 2006 09:53:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GIKtI-0004Fz-J0 for ged-emacs-devel@m.gmane.org; Wed, 30 Aug 2006 03:53:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GIKt3-0004EO-0x for emacs-devel@gnu.org; Wed, 30 Aug 2006 03:53:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GIKt1-0004Dv-B1 for emacs-devel@gnu.org; Wed, 30 Aug 2006 03:53:24 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GIKt1-0004Dr-5I for emacs-devel@gnu.org; Wed, 30 Aug 2006 03:53:23 -0400 Original-Received: from [195.41.46.235] (helo=pfepa.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GIL2L-00053p-1M; Wed, 30 Aug 2006 04:03:01 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepa.post.tele.dk (Postfix) with SMTP id AFE8AFAC0A9; Wed, 30 Aug 2006 09:53:13 +0200 (CEST) Original-To: Stefan Monnier In-Reply-To: (Stefan Monnier's message of "Tue, 29 Aug 2006 23:41:19 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:59095 Archived-At: Stefan Monnier writes: >> 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. > > This only eliminates one particular source of unwanted updates. I don't > think this code is worth the trouble. At the very least, add it to > font-lock rather than jit-lock. > 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. > > > Stefan > > > PS: And make sure it also works when nested ;-) I still vote for installing Martin's buffer-chars-modified-tick ... anything else seems to be "too much" or "too little" or "too slow" :-) -- Kim F. Storm http://www.cua.dk