mirror of https://github.com/djcb/mu.git
mu4e: don't change context when already running
This is for the case where mu4e-compose trigger mu4e~start, as found by thierryvolpiatto.
This commit is contained in:
parent
5e13d31450
commit
785d888b42
|
@ -777,14 +777,13 @@ first.
|
|||
If mu4e is already running, execute function FUNC (if non-nil).
|
||||
Otherwise, check various requirements, then start mu4e. When
|
||||
successful, call FUNC (if non-nil) afterwards."
|
||||
;; maybe switch the context
|
||||
(mu4e~context-autoswitch nil mu4e-context-policy)
|
||||
;; if we're already running, simply go to the main view
|
||||
(if (mu4e-running-p) ;; already running?
|
||||
(when func ;; yes! run func if defined
|
||||
(funcall func))
|
||||
(when func (funcall func)) ;; yes! run func if defined
|
||||
(progn
|
||||
;; no! do some checks, set up pong handler and ping the server
|
||||
;; no! try to set a context, do some checks, set up pong handler and ping
|
||||
;; the server maybe switch the context
|
||||
(mu4e~context-autoswitch nil mu4e-context-policy)
|
||||
(lexical-let ((func func))
|
||||
(mu4e~check-requirements)
|
||||
;; set up the 'pong' handler func
|
||||
|
|
Loading…
Reference in New Issue