mirror of https://github.com/djcb/mu.git
mu4e: also quote the context label in the modeline
This commit is contained in:
parent
08d955e432
commit
6337151918
|
@ -45,7 +45,8 @@ describing mu4e's contexts.")
|
|||
"Propertized string with the current context name, or \"\" if
|
||||
there is none."
|
||||
(if (mu4e-context-current)
|
||||
(concat "[" (propertize (mu4e-context-name (mu4e-context-current))
|
||||
(concat "[" (propertize (mu4e~quote-for-modeline
|
||||
(mu4e-context-name (mu4e-context-current)))
|
||||
'face 'mu4e-title-face) "]") ""))
|
||||
|
||||
(defstruct mu4e-context
|
||||
|
|
|
@ -999,7 +999,7 @@ the query history stack."
|
|||
'(:eval
|
||||
(concat
|
||||
(propertize
|
||||
(replace-regexp-in-string "%" "%%" mu4e~headers-last-query t t)
|
||||
(mu4e~quote-for-modeline mu4e~headers-last-query)
|
||||
'face 'mu4e-modeline-face)
|
||||
" "
|
||||
(mu4e-context-label)))))
|
||||
|
|
|
@ -1207,5 +1207,10 @@ the view and compose modes."
|
|||
(add-text-properties p (point-max) '(face mu4e-footer-face)))))))
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defun mu4e~quote-for-modeline (str)
|
||||
"Quote a string to be used literally in the modeline."
|
||||
(replace-regexp-in-string "%" "%%" str t t))
|
||||
|
||||
|
||||
(provide 'mu4e-utils)
|
||||
;;; End of mu4e-utils.el
|
||||
|
|
Loading…
Reference in New Issue