1
0
mirror of https://github.com/djcb/mu.git synced 2024-06-22 07:06:48 +02:00

* mu4e: ask only once whether user wants to quit

This commit is contained in:
djcb 2012-05-10 14:36:45 +03:00
parent 7229129ae6
commit 1d2611affb
2 changed files with 18 additions and 21 deletions

View File

@ -483,7 +483,7 @@ that has a live window), and vice versa."
(mu4e-message "No window to switch to")))) (mu4e-message "No window to switch to"))))
(defconst mu4e-output-buffer-name "*mu4e-output" (defconst mu4e-output-buffer-name "*mu4e-output*"
"*internal* Name of the mu4e output buffer.") "*internal* Name of the mu4e output buffer.")
(defun mu4e-process-file-through-pipe (path pipecmd) (defun mu4e-process-file-through-pipe (path pipecmd)
@ -613,15 +613,12 @@ FUNC (if non-nil) afterwards."
(mu4e~proc-ping))) (mu4e~proc-ping)))
(defun mu4e~stop () (defun mu4e~stop ()
"Quit the mu4e session." "Stop the mu4e session."
(interactive)
(when (y-or-n-p (mu4e-format "Are you sure you want to quit?"))
(message nil)
(when mu4e-update-timer (when mu4e-update-timer
(cancel-timer mu4e-update-timer) (cancel-timer mu4e-update-timer)
(setq mu4e-update-timer nil)) (setq mu4e-update-timer nil))
(mu4e~proc-kill) (mu4e~proc-kill)
(kill-buffer))) (kill-buffer))
(defvar mu4e-update-timer nil (defvar mu4e-update-timer nil
"*internal* The mu4e update timer.") "*internal* The mu4e update timer.")

View File

@ -82,7 +82,7 @@
(defun mu4e-quit() (defun mu4e-quit()
"Quit the mu4e session." "Quit the mu4e session."
(interactive) (interactive)
(when (y-or-n-p "Are you sure you want to quit? ") (when (y-or-n-p (mu4e-format "Are you sure you want to quit?"))
(mu4e~stop))) (mu4e~stop)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;