Skip to content

Suppress duplicate confirmation when killing Emacs #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions exwm.el
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ If FORCE is any other non-nil value, force killing of Emacs."
((and force (not (eq force 'no-check)))
;; Force killing Emacs.
t)
((or (eq force 'no-check) (not exwm--id-buffer-alist))
((eq force 'no-check)
;; Check if there's any unsaved file.
(pcase (catch 'break
(let ((kill-emacs-query-functions
Expand All @@ -1123,8 +1123,9 @@ If FORCE is any other non-nil value, force killing of Emacs."
(`break (y-or-n-p prompt))
(x x)))
(t
(yes-or-no-p (format "[EXWM] %d X window(s) will be destroyed. %s?"
(length exwm--id-buffer-alist) prompt))))
(or (not exwm--id-buffer-alist)
(yes-or-no-p (format "[EXWM] %d X window(s) will be destroyed. %s?"
(length exwm--id-buffer-alist) prompt)))))
;; Run `kill-emacs-hook' (`server-force-stop' excluded) before Emacs
;; frames are unmapped so that errors (if any) can be visible.
(if (memq #'server-force-stop kill-emacs-hook)
Expand Down