]> code.delx.au - gnu-emacs/commitdiff
* lisp/progmodes/cc-engine.el (c-forward-sws, c-backward-sws):
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 17 Jul 2012 11:40:23 +0000 (07:40 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 17 Jul 2012 11:40:23 +0000 (07:40 -0400)
Avoid spuriously marking the buffer as modified because of c-is-sws.

lisp/ChangeLog
lisp/progmodes/cc-engine.el

index 2516d77524364cda3c3bc862eae088ecbfbb7d97..04cf8291dff1afd76cd8bfd0fdbd3b87ffd4ff4a 100644 (file)
@@ -1,5 +1,8 @@
 2012-07-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * progmodes/cc-engine.el (c-forward-sws, c-backward-sws):
+       Avoid spuriously marking the buffer as modified because of c-is-sws.
+
        * progmodes/sh-script.el (sh-syntax-propertize-function): Mark "${#VAR"
        as not-a-comment (bug#11946).
 
index 82aee7bdbb937c9c9955537fa383f5a6fef69054..142ec4cdd66a4cbd3915421de87c10d0bf3b7fe6 100644 (file)
@@ -1688,6 +1688,7 @@ comment at the start of cc-engine.el for more info."
        ;; high as possible.
        (setq rung-pos (point)))
 
+      (with-silent-modifications
       (while
          (progn
            (while
@@ -1843,7 +1844,7 @@ comment at the start of cc-engine.el for more info."
                (1- last-put-in-sws-pos))
               (c-remove-is-and-in-sws (1- last-put-in-sws-pos)
                                       last-put-in-sws-pos))))
-      )))
+      ))))
 
 (defun c-backward-sws ()
   ;; Used by `c-backward-syntactic-ws' to implement the unbounded search.
@@ -1881,6 +1882,7 @@ comment at the start of cc-engine.el for more info."
          (goto-char (setq rung-pos rung-is-marked))
        (goto-char simple-ws-beg))
 
+      (with-silent-modifications
       (while
          (progn
            (while
@@ -2066,7 +2068,7 @@ comment at the start of cc-engine.el for more info."
                last-put-in-sws-pos)
               (c-remove-is-and-in-sws last-put-in-sws-pos
                                       (1+ last-put-in-sws-pos)))))
-      )))
+      ))))
 
 \f
 ;; Other whitespace tools