diff options
| author | Thien-Thi Nguyen | 2006-05-17 10:38:15 +0000 |
|---|---|---|
| committer | Thien-Thi Nguyen | 2006-05-17 10:38:15 +0000 |
| commit | 8433d47026bc042ed7e792d032469a6ea4f6d622 (patch) | |
| tree | ab87bb8ae30f6cb6fc9f5b91164a6fbf93d58922 | |
| parent | 8d1bec8de1c570475c1332d1305bea21ffda44f1 (diff) | |
| download | emacs-8433d47026bc042ed7e792d032469a6ea4f6d622.tar.gz emacs-8433d47026bc042ed7e792d032469a6ea4f6d622.zip | |
(ewoc-map, ewoc-invalidate): Compute PP before looping.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/ewoc.el | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 85e397cbe29..cd8a9c6f5c7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -3,6 +3,8 @@ | |||
| 3 | * emacs-lisp/ewoc.el (ewoc-data): Add docstring. | 3 | * emacs-lisp/ewoc.el (ewoc-data): Add docstring. |
| 4 | (ewoc-nth): Doc fix. | 4 | (ewoc-nth): Doc fix. |
| 5 | 5 | ||
| 6 | (ewoc-map, ewoc-invalidate): Compute PP before looping. | ||
| 7 | |||
| 6 | 2006-05-16 Eli Zaretskii <eliz@gnu.org> | 8 | 2006-05-16 Eli Zaretskii <eliz@gnu.org> |
| 7 | 9 | ||
| 8 | * international/mule.el (auto-coding-alist): Add .lha to files | 10 | * international/mule.el (auto-coding-alist): Add .lha to files |
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 | |||
| 352 | arguments will be passed to MAP-FUNCTION." | 352 | arguments will be passed to MAP-FUNCTION." |
| 353 | (ewoc--set-buffer-bind-dll-let* ewoc | 353 | (ewoc--set-buffer-bind-dll-let* ewoc |
| 354 | ((footer (ewoc--footer ewoc)) | 354 | ((footer (ewoc--footer ewoc)) |
| 355 | (pp (ewoc--pretty-printer ewoc)) | ||
| 355 | (node (ewoc--node-nth dll 1))) | 356 | (node (ewoc--node-nth dll 1))) |
| 356 | (save-excursion | 357 | (save-excursion |
| 357 | (while (not (eq node footer)) | 358 | (while (not (eq node footer)) |
| 358 | (if (apply map-function (ewoc--node-data node) args) | 359 | (if (apply map-function (ewoc--node-data node) args) |
| 359 | (ewoc--refresh-node (ewoc--pretty-printer ewoc) node)) | 360 | (ewoc--refresh-node pp node)) |
| 360 | (setq node (ewoc--node-next dll node)))))) | 361 | (setq node (ewoc--node-next dll node)))))) |
| 361 | 362 | ||
| 362 | (defun ewoc-filter (ewoc predicate &rest args) | 363 | (defun ewoc-filter (ewoc predicate &rest args) |
| @@ -465,10 +466,11 @@ If the EWOC is empty, nil is returned." | |||
| 465 | (defun ewoc-invalidate (ewoc &rest nodes) | 466 | (defun ewoc-invalidate (ewoc &rest nodes) |
| 466 | "Call EWOC's pretty-printer for each element in NODES. | 467 | "Call EWOC's pretty-printer for each element in NODES. |
| 467 | Delete current text first, thus effecting a \"refresh\"." | 468 | Delete current text first, thus effecting a \"refresh\"." |
| 468 | (ewoc--set-buffer-bind-dll ewoc | 469 | (ewoc--set-buffer-bind-dll-let* ewoc |
| 470 | ((pp (ewoc--pretty-printer ewoc))) | ||
| 469 | (save-excursion | 471 | (save-excursion |
| 470 | (dolist (node nodes) | 472 | (dolist (node nodes) |
| 471 | (ewoc--refresh-node (ewoc--pretty-printer ewoc) node))))) | 473 | (ewoc--refresh-node pp node))))) |
| 472 | 474 | ||
| 473 | (defun ewoc-goto-prev (ewoc arg) | 475 | (defun ewoc-goto-prev (ewoc arg) |
| 474 | "Move point to the ARGth previous element in EWOC. | 476 | "Move point to the ARGth previous element in EWOC. |