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: [R.Ekker@ai.rug.nl: highlight-changes-rotate-faces sets buffer modified flag] Date: Wed, 09 May 2007 00:00:27 +0200 Message-ID: <4640F2FB.6000704@gmx.at> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010909090800070809080806" X-Trace: sea.gmane.org 1178661780 31850 80.91.229.12 (8 May 2007 22:03:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 8 May 2007 22:03:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 09 00:02:59 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 1HlXlq-0008Va-Kw for ged-emacs-devel@m.gmane.org; Wed, 09 May 2007 00:02:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HlXsy-00033p-9j for ged-emacs-devel@m.gmane.org; Tue, 08 May 2007 18:10:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HlXsu-00033j-Lo for emacs-devel@gnu.org; Tue, 08 May 2007 18:10:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HlXss-00033W-FM for emacs-devel@gnu.org; Tue, 08 May 2007 18:10:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HlXss-00033T-AK for emacs-devel@gnu.org; Tue, 08 May 2007 18:10:14 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1HlXlj-0005wu-Iz for emacs-devel@gnu.org; Tue, 08 May 2007 18:02:52 -0400 Original-Received: (qmail invoked by alias); 08 May 2007 22:02:50 -0000 Original-Received: from N878P024.adsl.highway.telekom.at (EHLO [62.47.53.184]) [62.47.53.184] by mail.gmx.net (mp024) with SMTP; 09 May 2007 00:02:50 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18rUHEpcbAr8Ob6G5xrEX9BtEWLn61bgeFUHsOsaq 3emFMk682xUqaO User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: X-Y-GMX-Trusted: 0 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:70669 Archived-At: This is a multi-part message in MIME format. --------------010909090800070809080806 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit > I don't know how to use this feature, but looking at the code suggests > that this bug still exists. Can anyone verify that? > > It should be pretty easy to prevent this code from changing the > modified flag (and perhaps bind buffer-undo-list to t). The attached patch works for me in trivial test cases. --------------010909090800070809080806 Content-Type: text/plain; name="hilit-chg.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="hilit-chg.patch" *** hilit-chg.el Tue Jan 23 06:40:02 2007 --- hilit-chg.el Tue May 8 23:38:32 2007 *************** *** 790,806 **** (interactive) ;; If not in active mode do nothing but don't complain because this ;; may be bound to a hook. ! (if (eq highlight-changes-mode 'active) ! (let ((after-change-functions nil)) ! ;; ensure hilit-chg-list is made and up to date ! (hilit-chg-make-list) ! ;; remove our existing overlays ! (hilit-chg-hide-changes) ! ;; for each change text property, increment it ! (hilit-chg-map-changes 'hilit-chg-bump-change) ! ;; and display them all if active ! (if (eq highlight-changes-mode 'active) ! (hilit-chg-display-changes)))) ;; This always returns nil so it is safe to use in write-file-functions nil) --- 790,811 ---- (interactive) ;; If not in active mode do nothing but don't complain because this ;; may be bound to a hook. ! (when (eq highlight-changes-mode 'active) ! (let ((modified (buffer-modified-p)) ! (buffer-undo-list t) ! (after-change-functions nil)) ! (unwind-protect ! (progn ! ;; ensure hilit-chg-list is made and up to date ! (hilit-chg-make-list) ! ;; remove our existing overlays ! (hilit-chg-hide-changes) ! ;; for each change text property, increment it ! (hilit-chg-map-changes 'hilit-chg-bump-change) ! ;; and display them all if active ! (if (eq highlight-changes-mode 'active) ! (hilit-chg-display-changes))) ! (unless modified (set-buffer-modified-p nil))))) ;; This always returns nil so it is safe to use in write-file-functions nil) --------------010909090800070809080806 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --------------010909090800070809080806--