Fix ui/doom-quit for new quit-confirm system
This commit is contained in:
parent
4984a548d1
commit
2d219c24eb
1 changed files with 8 additions and 9 deletions
|
@ -26,13 +26,12 @@
|
|||
"A list of quit messages, picked randomly by `+doom-quit'. Taken from
|
||||
http://doom.wikia.com/wiki/Quit_messages and elsewhere.")
|
||||
|
||||
(defun +doom-quit (&rest _)
|
||||
(if (doom-real-buffers-list)
|
||||
(y-or-n-p
|
||||
(format "%s Quit?"
|
||||
(nth (random (length +doom-quit-messages))
|
||||
+doom-quit-messages)))
|
||||
t))
|
||||
|
||||
(setq confirm-kill-emacs #'+doom-quit)
|
||||
(defun +doom|quit (&rest _)
|
||||
(doom-quit-p
|
||||
(format "%s Quit?"
|
||||
(nth (random (length +doom-quit-messages))
|
||||
+doom-quit-messages))))
|
||||
|
||||
;;
|
||||
(remove-hook 'kill-emacs-query-functions #'doom-quit-p)
|
||||
(add-hook 'kill-emacs-query-functions #'+doom|quit)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue