;; Called whenever the window configuration changes
;; (a `window-configuration-change-hook').
(defun winner-change-fun ()
+
+ ;; Cull dead frames.
+ (setq winner-modified-list
+ (cl-loop for frame in winner-modified-list
+ if (frame-live-p frame) collect frame))
+
(unless (or (memq (selected-frame) winner-modified-list)
(/= 0 (minibuffer-depth)))
(push (selected-frame) winner-modified-list)))
(ring-ref winner-pending-undo-ring 0)))
(unless (eq (selected-window) (minibuffer-window))
(message "Winner undid undo")))
- (t (error "Previous command was not a `winner-undo'"))))
+ (t (user-error "Previous command was not a `winner-undo'"))))
(provide 'winner)
;;; winner.el ends here