From 2143fa32671374cdef26fdb24355bf690728a344 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 17 Jul 2012 07:40:23 -0400 Subject: [PATCH] * lisp/progmodes/cc-engine.el (c-forward-sws, c-backward-sws): Avoid spuriously marking the buffer as modified because of c-is-sws. --- lisp/ChangeLog | 3 +++ lisp/progmodes/cc-engine.el | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2516d775243..04cf8291dff 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2012-07-17 Stefan Monnier + * 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). diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 82aee7bdbb9..142ec4cdd66 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -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))))) - ))) + )))) ;; Other whitespace tools -- 2.39.2