mu4e: by default, make changing to current context a no-op

Update mu4e-context-switch to not call the enter/leave functions when
'changing' to the current context. However, calling those functions (if
defined) can be force through a prefix arg. Document this.

Make mu4e-context-determine recognize 'policies', i.e. what to do when
no context matches. This part is WIP.
This commit is contained in:
djcb
2015-12-21 22:15:47 +02:00
parent 6bafb39960
commit 60192a60d2
3 changed files with 87 additions and 57 deletions

View File

@ -372,8 +372,8 @@ tempfile)."
(put 'mu4e-compose-parent-message 'permanent-local t)
(let ((context (mu4e-context-determine mu4e-compose-parent-message)))
(if context
(mu4e-context-switch (mu4e-context-name context))
(when mu4e-contexts (mu4e-context-switch))))
(mu4e-context-switch nil (mu4e-context-name context))
(when mu4e-contexts (mu4e-context-switch nil))))
(run-hooks 'mu4e-compose-pre-hook)
;; this opens (or re-opens) a messages with all the basic headers set.