(ewoc-refresh): Compute PP once before looping.
authorThien-Thi Nguyen <ttn@gnuvola.org>
Fri, 12 May 2006 07:29:42 +0000 (07:29 +0000)
committerThien-Thi Nguyen <ttn@gnuvola.org>
Fri, 12 May 2006 07:29:42 +0000 (07:29 +0000)
lisp/ChangeLog
lisp/emacs-lisp/ewoc.el

index 1137154..a3c7341 100644 (file)
@@ -1,3 +1,7 @@
+2006-05-12  Thien-Thi Nguyen  <ttn@gnu.org>
+
+       * emacs-lisp/ewoc.el (ewoc-refresh): Compute PP once before looping.
+
 2006-05-11  Glenn Morris  <rgm@gnu.org>
 
        * calendar/calendar.el (diary-show-all-entries): Do not refer to
index e5f1299..cd1f6d3 100644 (file)
@@ -527,11 +527,11 @@ number of elements needs to be refreshed."
       (delete-region (ewoc--node-start-marker (ewoc--node-nth dll 1))
                     (ewoc--node-start-marker footer))
       (goto-char (ewoc--node-start-marker footer))
-      (let ((node (ewoc--node-nth dll 1)))
+      (let ((pp (ewoc--pretty-printer ewoc))
+            (node (ewoc--node-nth dll 1)))
        (while (not (eq node footer))
          (set-marker (ewoc--node-start-marker node) (point))
-         (funcall (ewoc--pretty-printer ewoc)
-                  (ewoc--node-data node))
+         (funcall pp (ewoc--node-data node))
          (insert "\n")
          (setq node (ewoc--node-next dll node)))))
     (set-marker (ewoc--node-start-marker footer) (point))))