]> git.eshelyaron.com Git - emacs.git/commitdiff
(ewoc-map, ewoc-invalidate): Compute PP before looping.
authorThien-Thi Nguyen <ttn@gnuvola.org>
Wed, 17 May 2006 10:38:15 +0000 (10:38 +0000)
committerThien-Thi Nguyen <ttn@gnuvola.org>
Wed, 17 May 2006 10:38:15 +0000 (10:38 +0000)
lisp/ChangeLog
lisp/emacs-lisp/ewoc.el

index 85e397cbe29590b48a251711caea896aaec7011c..cd8a9c6f5c728c9c2dacdd350c489472665b5f90 100644 (file)
@@ -3,6 +3,8 @@
        * emacs-lisp/ewoc.el (ewoc-data): Add docstring.
        (ewoc-nth): Doc fix.
 
+       (ewoc-map, ewoc-invalidate): Compute PP before looping.
+
 2006-05-16  Eli Zaretskii  <eliz@gnu.org>
 
        * international/mule.el (auto-coding-alist): Add .lha to files
index fa85ce21fb06b7ee8225d33ccef88cdff0641c6b..dbfae49233a7428ce6f84f8422e18226b0528bd1 100644 (file)
@@ -352,11 +352,12 @@ If more than two arguments are given, the remaining
 arguments will be passed to MAP-FUNCTION."
   (ewoc--set-buffer-bind-dll-let* ewoc
       ((footer (ewoc--footer ewoc))
+       (pp (ewoc--pretty-printer ewoc))
        (node (ewoc--node-nth dll 1)))
     (save-excursion
       (while (not (eq node footer))
         (if (apply map-function (ewoc--node-data node) args)
-            (ewoc--refresh-node (ewoc--pretty-printer ewoc) node))
+            (ewoc--refresh-node pp node))
         (setq node (ewoc--node-next dll node))))))
 
 (defun ewoc-filter (ewoc predicate &rest args)
@@ -465,10 +466,11 @@ If the EWOC is empty, nil is returned."
 (defun ewoc-invalidate (ewoc &rest nodes)
   "Call EWOC's pretty-printer for each element in NODES.
 Delete current text first, thus effecting a \"refresh\"."
-  (ewoc--set-buffer-bind-dll ewoc
+  (ewoc--set-buffer-bind-dll-let* ewoc
+      ((pp (ewoc--pretty-printer ewoc)))
     (save-excursion
       (dolist (node nodes)
-        (ewoc--refresh-node (ewoc--pretty-printer ewoc) node)))))
+        (ewoc--refresh-node pp node)))))
 
 (defun ewoc-goto-prev (ewoc arg)
   "Move point to the ARGth previous element in EWOC.