mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
feat: doom-quit-p: use popup dialog if available
Mainly for Android UX, but also for consistency for folks who *like* GUI
dialog boxes (seek professional help).
Amend: 6a44a2ea80
This commit is contained in:
@ -19,7 +19,14 @@ 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
|
||||
are open."
|
||||
(or (not (ignore-errors (doom-real-buffer-list)))
|
||||
(yes-or-no-p (format "%s" (or prompt "Really quit Emacs?")))
|
||||
(if (use-dialog-box-p)
|
||||
(pcase (x-popup-dialog
|
||||
t `("Really quit Emacs?"
|
||||
("Quit anyway" . t)
|
||||
("Cancel" . nil)))
|
||||
('quit-anyway t)
|
||||
('cancel nil))
|
||||
(yes-or-no-p (format "%s" (or prompt "Really quit Emacs?"))))
|
||||
(ignore (message "Aborted"))))
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user