Function: winner-undo
winner-undo is an interactive and byte-compiled function defined in
winner.el.gz.
Signature
(winner-undo)
Documentation
Switch back to an earlier window configuration saved by Winner mode.
In other words, "undo" changes in window configuration.
Probably introduced at or before Emacs version 22.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/winner.el.gz
(defvar winner-undone-data nil) ; There confs have been passed.
(defun winner-undo ()
"Switch back to an earlier window configuration saved by Winner mode.
In other words, \"undo\" changes in window configuration."
(interactive)
(cond
((not winner-mode) (error "Winner mode is turned off"))
(t (unless (and (eq last-command 'winner-undo)
(eq winner-undo-frame (selected-frame)))
(winner-save-conditionally) ; current configuration->stack
(setq winner-undo-frame (selected-frame))
(setq winner-point-alist (winner-make-point-alist))
(setq winner-pending-undo-ring (winner-ring (selected-frame)))
(setq winner-undo-counter 0)
(setq winner-undone-data (list (winner-win-data))))
(incf winner-undo-counter) ; starting at 1
(when (and (winner-undo-this)
(not (window-minibuffer-p)))
(message "Winner undo (%d / %d)"
winner-undo-counter
(1- (ring-length winner-pending-undo-ring)))))))