mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Fix ui/doom-quit for new quit-confirm system
This commit is contained in:
@ -26,13 +26,12 @@
|
|||||||
"A list of quit messages, picked randomly by `+doom-quit'. Taken from
|
"A list of quit messages, picked randomly by `+doom-quit'. Taken from
|
||||||
http://doom.wikia.com/wiki/Quit_messages and elsewhere.")
|
http://doom.wikia.com/wiki/Quit_messages and elsewhere.")
|
||||||
|
|
||||||
(defun +doom-quit (&rest _)
|
(defun +doom|quit (&rest _)
|
||||||
(if (doom-real-buffers-list)
|
(doom-quit-p
|
||||||
(y-or-n-p
|
|
||||||
(format "%s Quit?"
|
(format "%s Quit?"
|
||||||
(nth (random (length +doom-quit-messages))
|
(nth (random (length +doom-quit-messages))
|
||||||
+doom-quit-messages)))
|
+doom-quit-messages))))
|
||||||
t))
|
|
||||||
|
|
||||||
(setq confirm-kill-emacs #'+doom-quit)
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
(remove-hook 'kill-emacs-query-functions #'doom-quit-p)
|
||||||
|
(add-hook 'kill-emacs-query-functions #'+doom|quit)
|
||||||
|
Reference in New Issue
Block a user