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: [R.Ekker@ai.rug.nl: highlight-changes-rotate-faces sets buffer modified flag] Date: Sun, 13 May 2007 13:37:59 -0400 Message-ID: References: <46416DBF.4020506@gmx.at> <46424454.10906@gmx.at> <46443356.7070103@gmx.at> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1179078071 3800 80.91.229.12 (13 May 2007 17:41:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 13 May 2007 17:41:11 +0000 (UTC) Cc: emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 13 19:41:10 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HnI4D-0008Qb-CU for ged-emacs-devel@m.gmane.org; Sun, 13 May 2007 19:41:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HnIBs-00049e-Jp for ged-emacs-devel@m.gmane.org; Sun, 13 May 2007 13:49:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HnIBp-00046y-0u for emacs-devel@gnu.org; Sun, 13 May 2007 13:49:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HnIBo-00044q-75 for emacs-devel@gnu.org; Sun, 13 May 2007 13:49:00 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HnIBo-00044U-3I for emacs-devel@gnu.org; Sun, 13 May 2007 13:49:00 -0400 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HnI48-0002Wj-3s for emacs-devel@gnu.org; Sun, 13 May 2007 13:41:04 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1HnI19-00039M-U4; Sun, 13 May 2007 13:37:59 -0400 In-reply-to: <46443356.7070103@gmx.at> (message from martin rudalics on Fri, 11 May 2007 11:11:50 +0200) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:70974 Archived-At: If the change _is not_ caused by an undo it assigns the text-property hilit-chg to the changed text and calls `hilit-chg-fixup' which installs the overlays necessary for highlighting the changed text in accordance with the just assigned text-property. If the change _is_ caused by an undo, `hilit-chg-set-face-on-change' falls back on the undo mechanism to restore the hilit-chg text-properties and calls `hilit-chg-fixup' as in the non-undo case. That sounds good. However, given that, it seems that explicit changes of the highlighting ought not to mark the buffer as modified. When these commands are used on an unmodified buffer, perhaps they should make undo records, but not mark the buffer as modified, and set up the undo records so that undoing them re-marks the buffer as unmodified. That is a strange thing to do, but perhaps it is the least strange alternative. If there were a buffer-undo-list entry type which wouldn't set the modified flag ... You can make an undo entry that will clear it.