From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: jit lock sit-for provokes redisplay provokes imenu Date: Fri, 21 Jul 2006 11:13:07 +0200 Message-ID: <44C09AA3.8060600@gmx.at> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1153473326 3669 80.91.229.2 (21 Jul 2006 09:15:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 21 Jul 2006 09:15:26 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 21 11:15:17 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 1G3r6C-0003Gs-Th for ged-emacs-devel@m.gmane.org; Fri, 21 Jul 2006 11:15:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G3r6C-0000jD-7i for ged-emacs-devel@m.gmane.org; Fri, 21 Jul 2006 05:15:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G3r5z-0000iW-OP for emacs-devel@gnu.org; Fri, 21 Jul 2006 05:14:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G3r5y-0000i7-9d for emacs-devel@gnu.org; Fri, 21 Jul 2006 05:14:55 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G3r5y-0000i4-44 for emacs-devel@gnu.org; Fri, 21 Jul 2006 05:14:54 -0400 Original-Received: from [213.165.64.21] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1G3r6L-000093-Ft for emacs-devel@gnu.org; Fri, 21 Jul 2006 05:15:17 -0400 Original-Received: (qmail invoked by alias); 21 Jul 2006 09:14:51 -0000 Original-Received: from N804P029.adsl.highway.telekom.at (EHLO [62.47.44.125]) [62.47.44.125] by mail.gmx.net (mp018) with SMTP; 21 Jul 2006 11:14:51 +0200 X-Authenticated: #14592706 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en Original-To: rms@gnu.org In-Reply-To: X-Y-GMX-Trusted: 0 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:57422 Archived-At: > This change, with the design I proposed, is so simple that it can't > break anything. It would enable us to get rid of a gross > inefficiency, which is a kind of bug. So I think we should do it now. The following questions would have to be answered before doing that: 1. Should the value returned by `buffer-chars-modified-tick' always (invariantly) imply the value returned by `buffer-modified-tick'? With other words, suppose we have a thing called CHAR_MODIFF: Would we have to support the invariant MODIFF >= CHAR_MODIFF >= SAVE_MODIFF In my opinion it seems counterintuitive to say that a buffer is "not modified" but a "character insertion and/or deletion has occurred". Hence I think the answer is yes. Affected seem (at least): `write-region', `insert-file-contents', `set-buffer-modified-p' and `restore-buffer-modified-p'. Any more? 2. Things like `subst-char-in-region' with NOUNDO non-nil change the buffer but update the SAVE_MODIFF in order to simulate that no buffer change occurred: if (MODIFF - 1 == SAVE_MODIFF) SAVE_MODIFF++; I think that's innocuous but, if someone wanted to increment SAVE_MODIFF in order to "ignore" a _text-property_ change only, the invariant above could get violated. Is anyone aware of whether such a hack exists or is planned somewhere? 3. `first-change-hook' currently runs whenever a text-property is assigned (by font-lock, for example). I believe this should change with the new function too?