mirror of https://github.com/djcb/mu.git
mu4e: improve startup routine
Switch to main buffer if it already exists, in the non-background case.
This commit is contained in:
parent
171fe9a018
commit
2058f15506
15
mu4e/mu4e.el
15
mu4e/mu4e.el
|
@ -61,13 +61,14 @@
|
|||
Then, show the main window, unless BACKGROUND (prefix-argument)
|
||||
is non-nil."
|
||||
(interactive "P")
|
||||
(if (and (not background) (buffer-live-p mu4e-main-buffer-name))
|
||||
;; already running.
|
||||
(switch-to-buffer mu4e-main-buffer-name)
|
||||
;; start mu4e, then show the main view
|
||||
(mu4e--init-handlers)
|
||||
(mu4e--start
|
||||
(unless background #'mu4e--main-view))))
|
||||
(if (not (mu4e-running-p))
|
||||
(progn
|
||||
(mu4e--init-handlers)
|
||||
(mu4e--start (unless background #'mu4e--main-view)))
|
||||
;; mu4e already running
|
||||
(when (and (not background)
|
||||
(buffer-live-p (get-buffer mu4e-main-buffer-name)))
|
||||
(switch-to-buffer mu4e-main-buffer-name))))
|
||||
|
||||
(defun mu4e-quit(&optional bury)
|
||||
"Quit the mu4e session or bury the buffer.
|
||||
|
|
Loading…
Reference in New Issue