Function: vundo-goto-last-saved

vundo-goto-last-saved is an interactive and natively compiled function defined in vundo.el.

Signature

(vundo-goto-last-saved ARG)

Documentation

Go back to the first saved node prior to the current node, if any.

With numeric prefix ARG, move that many saved nodes back (ARG<0 moves forward in history).

Key Bindings

vundo-mode-map l

Source Code

;; Defined in /nix/store/386w2ds6bdh3gcz9k23jssw4cni4lfr2-emacs-packages-deps/share/emacs/site-lisp/elpa/vundo-2.4.0/vundo.el
(defun vundo-goto-last-saved (arg)
  "Go back to the first saved node prior to the current node, if any.
With numeric prefix ARG, move that many saved nodes back (ARG<0
moves forward in history)."
  (interactive "p")
  (if-let* ((cur (vundo--current-node vundo--prev-mod-list))
            (dest (vundo--find-last-saved cur arg)))
      (progn
        (unless (eq cur dest)
          (vundo--check-for-command
           (vundo--move-to-node
            cur dest vundo--orig-buffer vundo--prev-mod-list)
           (vundo--trim-undo-list
            vundo--orig-buffer dest vundo--prev-mod-list)
           (vundo--refresh-buffer
            vundo--orig-buffer (current-buffer) 'incremental)))
        (message "Node saved %s"
                 (format-time-string
                  "%F %r"
                  (vundo--node-timestamp vundo--prev-mod-list dest))))
    (message "No such saved node")))