Function: ewoc-refresh

ewoc-refresh is a byte-compiled function defined in ewoc.el.gz.

Signature

(ewoc-refresh EWOC)

Documentation

Refresh all data in EWOC.

The pretty-printer that was specified when the EWOC was created will be called for all elements in EWOC. Note that ewoc-invalidate is more efficient if only a small number of elements needs to be refreshed.

View in manual

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/ewoc.el.gz
(defun ewoc-refresh (ewoc)
  "Refresh all data in EWOC.
The pretty-printer that was specified when the EWOC was created
will be called for all elements in EWOC.
Note that `ewoc-invalidate' is more efficient if only a small
number of elements needs to be refreshed."
  (ewoc--set-buffer-bind-dll-let* ewoc
      ((footer (ewoc--footer ewoc)))
    (let ((inhibit-read-only t))
      (delete-region (ewoc--node-start-marker (ewoc--node-nth dll 1))
		     (ewoc--node-start-marker footer))
      (goto-char (ewoc--node-start-marker footer))
      (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 pp (ewoc--node-data node))
	  (setq node (ewoc--node-next dll node)))))
    (set-marker (ewoc--node-start-marker footer) (point))))