mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
refactor(doom-quit): distinguish flavor text in quit prompts
Makes it easier to tell apart flavor text from the actual prompt.
This commit is contained in:
@ -19,7 +19,7 @@ If FORCE-P is omitted when `window-size-fixed' is non-nil, resizing will fail."
|
|||||||
Returns t if it is safe to kill this session. Does not prompt if no real buffers
|
Returns t if it is safe to kill this session. Does not prompt if no real buffers
|
||||||
are open."
|
are open."
|
||||||
(or (not (ignore-errors (doom-real-buffer-list)))
|
(or (not (ignore-errors (doom-real-buffer-list)))
|
||||||
(yes-or-no-p (format "››› %s" (or prompt "Quit Emacs?")))
|
(yes-or-no-p (format "%s" (or prompt "Really quit Emacs?")))
|
||||||
(ignore (message "Aborted"))))
|
(ignore (message "Aborted"))))
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,9 +25,11 @@ http://doom.wikia.com/wiki/Quit_messages and elsewhere.")
|
|||||||
|
|
||||||
(defun +doom-quit-fn (&rest _)
|
(defun +doom-quit-fn (&rest _)
|
||||||
(doom-quit-p
|
(doom-quit-p
|
||||||
(format "%s Quit?"
|
(format "%s %s"
|
||||||
(nth (random (length +doom-quit-messages))
|
(propertize (nth (random (length +doom-quit-messages))
|
||||||
+doom-quit-messages))))
|
+doom-quit-messages)
|
||||||
|
'face '(italic default))
|
||||||
|
"Really quit Emacs?")))
|
||||||
|
|
||||||
;;
|
;;
|
||||||
(setq confirm-kill-emacs #'+doom-quit-fn)
|
(setq confirm-kill-emacs #'+doom-quit-fn)
|
||||||
|
Reference in New Issue
Block a user