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 23:27:27 +0200 Message-ID: <46423CBF.3080304@gmx.at> References: <4640F2FB.6000704@gmx.at> <46420D78.6000100@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090409070207050006010708" X-Trace: sea.gmane.org 1178746155 26081 80.91.229.12 (9 May 2007 21:29:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 9 May 2007 21:29:15 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 09 23:29:11 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 1Hltie-0007M2-AM for ged-emacs-devel@m.gmane.org; Wed, 09 May 2007 23:29:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hltps-0005wD-K0 for ged-emacs-devel@m.gmane.org; Wed, 09 May 2007 17:36:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hltpc-0005qs-BR for emacs-devel@gnu.org; Wed, 09 May 2007 17:36:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hltpa-0005q4-Ta for emacs-devel@gnu.org; Wed, 09 May 2007 17:36:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hltpa-0005q0-IC for emacs-devel@gnu.org; Wed, 09 May 2007 17:36:18 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1HltiK-0003bH-U3 for emacs-devel@gnu.org; Wed, 09 May 2007 17:28:49 -0400 Original-Received: (qmail invoked by alias); 09 May 2007 21:28:47 -0000 Original-Received: from N710P008.adsl.highway.telekom.at (EHLO [62.47.32.168]) [62.47.32.168] by mail.gmx.net (mp027) with SMTP; 09 May 2007 23:28:47 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18DAY0WelcDSYCmZamYMGptGS7HNBrSpgQNYa/tNb Xh5K+vHTkK8qM7 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:70710 Archived-At: This is a multi-part message in MIME format. --------------090409070207050006010708 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit > a minor optimization is to use restore-buffer-modified-p here, ... karmatologistically yours --------------090409070207050006010708 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 Wed May 9 19:33: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,813 ---- (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) ! ;; Avoid marking the buffer as modified. Note: We do not suppress modifying ! ;; `buffer-undo-list' here. Hence, undoing a face rotation may show up as a ! ;; buffer modification. ! (let ((modified (buffer-modified-p)) ! (inhibit-modification-hooks t)) ! (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 (restore-buffer-modified-p nil))))) ;; This always returns nil so it is safe to use in write-file-functions nil) --------------090409070207050006010708 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 --------------090409070207050006010708--