Function: vundo--latest-buffer-state

vundo--latest-buffer-state is a natively compiled function defined in vundo.el.

Signature

(vundo--latest-buffer-state MOD-LIST)

Documentation

Return the node representing the latest buffer state.

Basically, return the latest non-undo modification in MOD-LIST.

Source Code

;; Defined in /nix/store/386w2ds6bdh3gcz9k23jssw4cni4lfr2-emacs-packages-deps/share/emacs/site-lisp/elpa/vundo-2.4.0/vundo.el
(defun vundo--latest-buffer-state (mod-list)
  "Return the node representing the latest buffer state.
Basically, return the latest non-undo modification in MOD-LIST."
  (let ((max-node (aref mod-list 0)))
    (cl-loop for midx from 1 to (1- (length mod-list))
             for mod = (aref mod-list midx)
             do (if (and (null (vundo-m-prev-eqv mod))
                         (> (vundo-m-idx mod)
                            (vundo-m-idx max-node)))
                    (setq max-node mod)))
    max-node))