feat: ask before quickloading a session

This commit is contained in:
Jeetaditya Chatterjee 2023-08-17 11:52:30 +01:00 committed by Yann Esposito (Yogsototh)
parent db85ec6f31
commit 6fecf3d6e9
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646

View file

@ -67,12 +67,17 @@
;;; Commands
;;;###autoload
(defun doom/quickload-session ()
"TODO"
(interactive)
(message "Restoring session...")
(doom-load-session)
(message "Session restored. Welcome back."))
(defun doom/quickload-session (force)
"Load the last session saved.
If the FORCE \\[universal-argument] is provided
then no confirmation is asked."
(interactive "P")
(if (or force
(yes-or-no-p "This will wipe your current session, do you want to continue? "))
(progn (message "Restoring session...")
(doom-load-session)
(message "Session restored. Welcome back."))
(message "Session not restored.")))
;;;###autoload
(defun doom/quicksave-session ()