]> code.delx.au - gnu-emacs/blobdiff - lisp/winner.el
Un-revert changes mistakenly dropped by f9fabb2b
[gnu-emacs] / lisp / winner.el
index 8644501265ddfafddedee21741cd7e17a5b92d7b..fdf62137514fc47071a094ff649d5c6b39c0314f 100644 (file)
@@ -112,10 +112,7 @@ You may want to include buffer names such as *Help*, *Apropos*,
 ;; Save current configuration.
 ;; (Called below by `winner-save-old-configurations').
 (defun winner-remember ()
-  (let ((entry (assq (selected-frame) winner-currents)))
-    (if entry (setcdr entry (winner-conf))
-      (push (cons (selected-frame) (winner-conf))
-           winner-currents))))
+  (setf (alist-get (selected-frame) winner-currents) (winner-conf)))
 
 ;; Consult `winner-currents'.
 (defun winner-configuration (&optional frame)
@@ -418,7 +415,7 @@ In other words, \"undo\" changes in window configuration."
        (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