mirror of
https://github.com/doomemacs/doomemacs.git
synced 2025-12-06 02:30:33 -08: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:
parent
6a44a2ea80
commit
1a0fb88897
1 changed files with 8 additions and 1 deletions
|
|
@ -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"))))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue