changeset 104881:98356e8ba345

(smerge-remove-props, smerge-refine): Use with-silent-modifications (bug#4342).
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 08 Sep 2009 19:47:07 +0000
parents 02bf3383a22f
children 3fea2465f700
files lisp/ChangeLog lisp/smerge-mode.el
diffstat 2 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Sep 08 19:42:21 2009 +0000
+++ b/lisp/ChangeLog	Tue Sep 08 19:47:07 2009 +0000
@@ -1,5 +1,8 @@
 2009-09-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+	* smerge-mode.el (smerge-remove-props, smerge-refine):
+	Use with-silent-modifications (bug#4342).
+
 	* subr.el (with-silent-modifications): New macro.
 
 2009-09-07  Juanma Barranquero  <lekktu@gmail.com>
--- a/lisp/smerge-mode.el	Tue Sep 08 19:42:21 2009 +0000
+++ b/lisp/smerge-mode.el	Tue Sep 08 19:47:07 2009 +0000
@@ -367,9 +367,8 @@
   ;; during font-locking so inhibit-modification-hooks is non-nil, so we
   ;; can't just modify the buffer and expect font-lock to be triggered as in:
   ;; (put-text-property beg end 'smerge-force-highlighting nil)
-  (let ((modified (buffer-modified-p)))
-    (remove-text-properties beg end '(fontified nil))
-    (restore-buffer-modified-p modified)))
+  (with-silent-modifications
+    (remove-text-properties beg end '(fontified nil))))
 
 (defun smerge-popup-context-menu (event)
   "Pop up the Smerge mode context menu under mouse."
@@ -1015,9 +1014,10 @@
         (n2 (if (eq part 3) 2 3)))
     (smerge-ensure-match n1)
     (smerge-ensure-match n2)
-    (put-text-property (match-beginning 0) (1+ (match-beginning 0))
-                       'smerge-refine-part
-                       (cons (buffer-chars-modified-tick) part))
+    (with-silent-modifications
+      (put-text-property (match-beginning 0) (1+ (match-beginning 0))
+                         'smerge-refine-part
+                         (cons (buffer-chars-modified-tick) part)))
     (smerge-refine-subst (match-beginning n1) (match-end n1)
                          (match-beginning n2)  (match-end n2)
                          '((smerge . refine)