mu4e: make global-mode-string buffer-local

Make `global-mode-string' local in all buffers where we use it, so we
don't leak the "context" string outside mu4e.

Also add the context string to the compose buffer's modeline.

This fixes #740.
This commit is contained in:
djcb
2015-12-19 10:14:49 +02:00
parent c328d679de
commit d3dbed6c1f
3 changed files with 14 additions and 6 deletions

View File

@ -288,6 +288,9 @@ message-thread by removing the In-Reply-To header."
\\{message-mode-map}."
(progn
(use-local-map mu4e-compose-mode-map)
(set (make-local-variable 'global-mode-string) '(:eval (mu4e-context-label)))
(set (make-local-variable 'message-signature) mu4e-compose-signature)
;; set this to allow mu4e to work when gnus-agent is unplugged in gnus
(set (make-local-variable 'message-send-mail-real-function) nil)