mu4e: also quote the context label in the modeline
This commit is contained in:
@ -45,7 +45,8 @@ describing mu4e's contexts.")
|
|||||||
"Propertized string with the current context name, or \"\" if
|
"Propertized string with the current context name, or \"\" if
|
||||||
there is none."
|
there is none."
|
||||||
(if (mu4e-context-current)
|
(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) "]") ""))
|
'face 'mu4e-title-face) "]") ""))
|
||||||
|
|
||||||
(defstruct mu4e-context
|
(defstruct mu4e-context
|
||||||
|
|||||||
@ -999,7 +999,7 @@ the query history stack."
|
|||||||
'(:eval
|
'(:eval
|
||||||
(concat
|
(concat
|
||||||
(propertize
|
(propertize
|
||||||
(replace-regexp-in-string "%" "%%" mu4e~headers-last-query t t)
|
(mu4e~quote-for-modeline mu4e~headers-last-query)
|
||||||
'face 'mu4e-modeline-face)
|
'face 'mu4e-modeline-face)
|
||||||
" "
|
" "
|
||||||
(mu4e-context-label)))))
|
(mu4e-context-label)))))
|
||||||
|
|||||||
@ -1207,5 +1207,10 @@ the view and compose modes."
|
|||||||
(add-text-properties p (point-max) '(face mu4e-footer-face)))))))
|
(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)
|
(provide 'mu4e-utils)
|
||||||
;;; End of mu4e-utils.el
|
;;; End of mu4e-utils.el
|
||||||
|
|||||||
Reference in New Issue
Block a user