diff options
author | Thien-Thi Nguyen <ttn@gnuvola.org> | 2006-05-17 10:38:15 +0000 |
---|---|---|
committer | Thien-Thi Nguyen <ttn@gnuvola.org> | 2006-05-17 10:38:15 +0000 |
commit | 8433d47026bc042ed7e792d032469a6ea4f6d622 (patch) | |
tree | ab87bb8ae30f6cb6fc9f5b91164a6fbf93d58922 /lisp/emacs-lisp/ewoc.el | |
parent | 8d1bec8de1c570475c1332d1305bea21ffda44f1 (diff) | |
download | emacs-8433d47026bc042ed7e792d032469a6ea4f6d622.tar.gz |
(ewoc-map, ewoc-invalidate): Compute PP before looping.
Diffstat (limited to 'lisp/emacs-lisp/ewoc.el')
-rw-r--r-- | lisp/emacs-lisp/ewoc.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index fa85ce21fb0..dbfae49233a 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el @@ -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. |