Autoload doom-quit-p & revise its docstring
This commit is contained in:
parent
1cb31d7cb5
commit
6b7f97f4fc
2 changed files with 14 additions and 11 deletions
|
@ -124,3 +124,15 @@ to a new one."
|
|||
;;;###autoload
|
||||
(defun doom*recenter (&rest _)
|
||||
(recenter))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-quit-p (&optional prompt)
|
||||
"Prompt the user for confirmation when killing Emacs.
|
||||
|
||||
Returns t if it is safe to kill this session. Does not prompt if no real buffers
|
||||
are open."
|
||||
"Return t if this session should be killed silently."
|
||||
(if (ignore-errors (doom-real-buffer-list))
|
||||
(or (yes-or-no-p (format "››› %s" (or prompt "Quit Emacs?")))
|
||||
(ignore (message "Aborted")))
|
||||
t))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue