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: Wed, 30 Aug 2006 16:49:34 -0400 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 1156971010 13626 80.91.229.2 (30 Aug 2006 20:50:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 30 Aug 2006 20:50:10 +0000 (UTC) Cc: Chong Yidong , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 30 22:50:06 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 1GIX0V-0003j2-Sr for ged-emacs-devel@m.gmane.org; Wed, 30 Aug 2006 22:49:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GIX0V-0004Ql-GC for ged-emacs-devel@m.gmane.org; Wed, 30 Aug 2006 16:49:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GIX0K-0004PX-IH for emacs-devel@gnu.org; Wed, 30 Aug 2006 16:49:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GIX0I-0004M5-Ds for emacs-devel@gnu.org; Wed, 30 Aug 2006 16:49:43 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GIX0I-0004Le-3d for emacs-devel@gnu.org; Wed, 30 Aug 2006 16:49:42 -0400 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GIX9k-0006X9-Ej; Wed, 30 Aug 2006 16:59:28 -0400 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 9AA3C2CEBD4; Wed, 30 Aug 2006 16:49:40 -0400 (EDT) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id BB6E73FC5; Wed, 30 Aug 2006 16:49:34 -0400 (EDT) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id A7DE64C6D25; Wed, 30 Aug 2006 16:49:34 -0400 (EDT) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Wed, 30 Aug 2006 13:59:26 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca 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:59127 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. > That seems a lot more trouble, and I don't see that it is needed. I suspect it's actually going to be less trouble ;-) Or at least no worse: the code would simply be moved from jit-lock to this new macro, and then the macro can be used anywhere, e.g. in jit-lock (where we can remove the corresponding macro), font-lock (idem), and probably many other places where we use restore-buffer-modified-p. It'd end up providing something similar to Martin's buffer-chars-modified-tick, except implemented in Lisp rather than in C. Stefan