]> git.eshelyaron.com Git - emacs.git/commitdiff
(ewoc--refresh-node): No longer save-excursion.
authorThien-Thi Nguyen <ttn@gnuvola.org>
Thu, 11 May 2006 08:02:11 +0000 (08:02 +0000)
committerThien-Thi Nguyen <ttn@gnuvola.org>
Thu, 11 May 2006 08:02:11 +0000 (08:02 +0000)
Update all callers to do it there, instead.

lisp/ChangeLog
lisp/emacs-lisp/ewoc.el

index 83586c497170af4e8af9cb93b895a20c0f01d6bc..c031c2beae5a85f74a72099b1bd0871eeb4c7efe 100644 (file)
@@ -1,3 +1,8 @@
+2006-05-11  Thien-Thi Nguyen  <ttn@gnu.org>
+
+       * emacs-lisp/ewoc.el (ewoc--refresh-node): No longer save-excursion.
+       Update all callers to do it there, instead.
+
 2006-05-10  Glenn Morris  <rgm@gnu.org>
 
        * calendar/calendar.el (calendar-basic-setup): Set day to 1 in
@@ -20,7 +25,7 @@
        * progmodes/idlwave.el (idlwave-push-mark): Removed obsolete
        compatibility function (Emacs 18/19).
        (idlwave-is-continuation-line): Always return point at start of
-       previous non-blank continuation line.  
+       previous non-blank continuation line.
        `keyword-parameters': Fix continued comment font-lock matcher.
        (idlwave-font-lock-fontify-region): Written, use as
        font-lock-fontify-region-function, to fix continued keyword
index 6ef14558a6a99e2a2b237370d6410c610450948c..e5f1299333c925f8ef71aa2026c611b5bc7a0068 100644 (file)
@@ -235,14 +235,13 @@ start position and the element DATA."
 (defun ewoc--refresh-node (pp node)
   "Redisplay the element represented by NODE using the pretty-printer PP."
   (let ((inhibit-read-only t))
-    (save-excursion
-      ;; First, remove the string from the buffer:
-      (delete-region (ewoc--node-start-marker node)
-                    (1- (marker-position
-                         (ewoc--node-start-marker (ewoc--node-right node)))))
-      ;; Calculate and insert the string.
-      (goto-char (ewoc--node-start-marker node))
-      (funcall pp (ewoc--node-data node)))))
+    ;; First, remove the string from the buffer:
+    (delete-region (ewoc--node-start-marker node)
+                   (1- (marker-position
+                        (ewoc--node-start-marker (ewoc--node-right node)))))
+    ;; Calculate and insert the string.
+    (goto-char (ewoc--node-start-marker node))
+    (funcall pp (ewoc--node-data node))))
 \f
 ;;; ===========================================================================
 ;;;                  Public members of the Ewoc package
@@ -361,10 +360,11 @@ arguments will be passed to MAP-FUNCTION."
   (ewoc--set-buffer-bind-dll-let* ewoc
       ((footer (ewoc--footer ewoc))
        (node (ewoc--node-nth dll 1)))
-    (while (not (eq node footer))
-      (if (apply map-function (ewoc--node-data node) args)
-         (ewoc--refresh-node (ewoc--pretty-printer ewoc) node))
-      (setq node (ewoc--node-next dll node)))))
+    (save-excursion
+      (while (not (eq node footer))
+        (if (apply map-function (ewoc--node-data node) args)
+            (ewoc--refresh-node (ewoc--pretty-printer ewoc) node))
+        (setq node (ewoc--node-next dll node))))))
 
 (defun ewoc-filter (ewoc predicate &rest args)
   "Remove all elements in EWOC for which PREDICATE returns nil.
@@ -473,8 +473,9 @@ If the EWOC is empty, nil is returned."
   "Call EWOC's pretty-printer for each element in NODES.
 Delete current text first, thus effecting a \"refresh\"."
   (ewoc--set-buffer-bind-dll ewoc
-    (dolist (node nodes)
-      (ewoc--refresh-node (ewoc--pretty-printer ewoc) node))))
+    (save-excursion
+      (dolist (node nodes)
+        (ewoc--refresh-node (ewoc--pretty-printer ewoc) node)))))
 
 (defun ewoc-goto-prev (ewoc arg)
   "Move point to the ARGth previous element in EWOC.
@@ -572,8 +573,9 @@ Return nil if the buffer has been deleted."
   "Set the HEADER and FOOTER of EWOC."
   (setf (ewoc--node-data (ewoc--header ewoc)) header)
   (setf (ewoc--node-data (ewoc--footer ewoc)) footer)
-  (ewoc--refresh-node 'insert (ewoc--header ewoc))
-  (ewoc--refresh-node 'insert (ewoc--footer ewoc)))
+  (save-excursion
+    (ewoc--refresh-node 'insert (ewoc--header ewoc))
+    (ewoc--refresh-node 'insert (ewoc--footer ewoc))))
 
 \f
 (provide 'ewoc)