From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: Re: highlight-changes-rotate-faces sets buffer modified flag Date: Tue, 08 May 2007 08:10:45 +0200 Message-ID: <46401465.4050803@gmx.at> NNTP-Posting-Host: lo.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 1178604707 13180 80.91.229.12 (8 May 2007 06:11:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 8 May 2007 06:11:47 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: R.Ekker@ai.rug.nl Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 08 08:11:46 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HlIvJ-0004QY-GS for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 May 2007 08:11:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HlJ2M-0004ZO-Et for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 May 2007 02:19:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HlJ2J-0004WK-JU for bug-gnu-emacs@gnu.org; Tue, 08 May 2007 02:18:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HlJ2I-0004Vr-8l for bug-gnu-emacs@gnu.org; Tue, 08 May 2007 02:18:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HlJ2H-0004Vo-VT for bug-gnu-emacs@gnu.org; Tue, 08 May 2007 02:18:58 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1HlIvD-0007Az-Qu for bug-gnu-emacs@gnu.org; Tue, 08 May 2007 02:11:40 -0400 Original-Received: (qmail invoked by alias); 08 May 2007 06:11:37 -0000 Original-Received: from N812P000.adsl.highway.telekom.at (EHLO [62.47.45.96]) [62.47.45.96] by mail.gmx.net (mp048) with SMTP; 08 May 2007 08:11:37 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18oaF1uDBQo8JF4qk0m9SDmZG2MvdHhKoawsOPHBK RUNCLcGx+f2Td4 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en X-Y-GMX-Trusted: 0 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:15697 Archived-At: > Running the function highlight-changes-rotate-faces sets the buffer's > modified flag. It seems to me that this should not happen, since only > some faces are changed. Thank you for sending a report on this. In principle a "face change" may change the buffer-modified state and can be undone as well. In the present case I agree with you that the buffer-modified state should not change. I believe that most of theses face changes were obscured by changes in the buffer text, hence probably people didn't notice. > As a workaround, I use the following advice: > > > ;; advice for highlight-changes-rotate-faces > ;; so that it does not change the modified flag for the buffer > (defadvice highlight-changes-rotate-faces (around around-rotate-faces) > (let ((was-modified (buffer-modified-p))) > ad-do-it > (unless was-modified > (set-buffer-modified-p nil)))) > (ad-activate 'highlight-changes-rotate-faces) You proably do not want adding an entry to `buffer-undo-list' either. > > > The version string of my emacs: > "GNU Emacs 21.3.1 (i386-mingw-nt5.1.2600) of 2004-03-10 on NYAUMO" AFAICT this problem is still present in Emacs 22. In addition, it seems to me that turning off `highlight-changes-mode' may set the buffer-modified state as well. Could you please verify this on your system?