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: [rudalics@gmx.at: Re: jit lock sit-for provokes redisplay provokes imenu] Date: Thu, 31 Aug 2006 00:01:42 -0400 Message-ID: References: <8764gcde3n.fsf@stupidchicken.com> <878xl754fy.fsf@furball.mit.edu> <871wqxlpf3.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 1156996928 17517 80.91.229.2 (31 Aug 2006 04:02:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 31 Aug 2006 04:02:08 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 31 06:02:05 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 1GIdkd-0003ho-Bq for ged-emacs-devel@m.gmane.org; Thu, 31 Aug 2006 06:01:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GIdkc-0000OV-RA for ged-emacs-devel@m.gmane.org; Thu, 31 Aug 2006 00:01:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GIdkQ-0000O0-TY for emacs-devel@gnu.org; Thu, 31 Aug 2006 00:01:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GIdkP-0000M3-Ap for emacs-devel@gnu.org; Thu, 31 Aug 2006 00:01:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GIdkP-0000Li-61 for emacs-devel@gnu.org; Thu, 31 Aug 2006 00:01:45 -0400 Original-Received: from [209.226.175.25] (helo=tomts5-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GIdtv-0008V9-Dc; Thu, 31 Aug 2006 00:11:35 -0400 Original-Received: from localhost ([70.55.145.157]) by tomts5-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060831040142.PRMR18394.tomts5-srv.bellnexxia.net@localhost>; Thu, 31 Aug 2006 00:01:42 -0400 Original-Received: by localhost (Postfix, from userid 20848) id 93D448E4E; Thu, 31 Aug 2006 00:01:42 -0400 (EDT) Original-To: Chong Yidong In-Reply-To: <871wqxlpf3.fsf@furball.mit.edu> (Chong Yidong's message of "Wed, 30 Aug 2006 20:28:00 -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:59143 Archived-At: >> 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. > I don't see how this could possibly work. We can't update > buffer-really-modified-tick in Lisp code for arbitrary buffer changes > (that's the whole point of Martin's patch --- you have to do it at the > C level). And you can't use it to manage a general-purpose variable > like imenu-menubar-modified-tick, because that keeps track of the > value of (buffer-modified-tick) as of the last call to > `imenu-update-menubar', so imenu must reset > imenu-menubar-modified-tick during each call to > `imenu-update-menubar'. It can manage a variable that keeps track of a pair of numbers, that say "any buffer-tick values between those two numbers can be considered as equal". Stefan