mirror of https://github.com/djcb/mu.git
* mu4e: make the faces a bit more generic
This commit is contained in:
parent
852ac46789
commit
b53d2ec0c2
|
@ -408,28 +408,27 @@ I.e. a message with the draft flag set."
|
||||||
"Face for the mark in the headers list."
|
"Face for the mark in the headers list."
|
||||||
:group 'mu4e-faces)
|
:group 'mu4e-faces)
|
||||||
|
|
||||||
(defface mu4e-view-header-key-face
|
(defface mu4e-header-key-face
|
||||||
'((t :inherit message-header-name :bold t))
|
'((t :inherit message-header-name :bold t))
|
||||||
"Face for a header key (such as \"Foo\" in \"Subject:\ Foo\") in
|
"Face for a header key (such as \"Foo\" in \"Subject:\ Foo\")."
|
||||||
the message view."
|
|
||||||
:group 'mu4e-faces)
|
:group 'mu4e-faces)
|
||||||
|
|
||||||
(defface mu4e-view-header-value-face
|
(defface mu4e-header-value-face
|
||||||
'((t :inherit font-lock-doc-face))
|
'((t :inherit font-lock-doc-face))
|
||||||
"Face for a header value (such as \"Re: Hello!\") in the message view."
|
"Face for a header value (such as \"Re: Hello!\")."
|
||||||
:group 'mu4e-faces)
|
:group 'mu4e-faces)
|
||||||
|
|
||||||
(defface mu4e-view-special-header-value-face
|
(defface mu4e-special-header-value-face
|
||||||
'((t :inherit font-lock-variable-name-face))
|
'((t :inherit font-lock-variable-name-face))
|
||||||
"Face for special header values in the message view."
|
"Face for special header values."
|
||||||
:group 'mu4e-faces)
|
:group 'mu4e-faces)
|
||||||
|
|
||||||
(defface mu4e-view-link-face
|
(defface mu4e-link-face
|
||||||
'((t :inherit link))
|
'((t :inherit link))
|
||||||
"Face for showing URLs and attachments in the message view."
|
"Face for showing URLs and attachments in the message view."
|
||||||
:group 'mu4e-faces)
|
:group 'mu4e-faces)
|
||||||
|
|
||||||
(defface mu4e-view-contact-face
|
(defface mu4e-contact-face
|
||||||
'((t :inherit font-lock-variable-name-face))
|
'((t :inherit font-lock-variable-name-face))
|
||||||
"Face for showing URLs and attachments in the message view."
|
"Face for showing URLs and attachments in the message view."
|
||||||
:group 'mu4e-faces)
|
:group 'mu4e-faces)
|
||||||
|
@ -449,12 +448,12 @@ I.e. a message with the draft flag set."
|
||||||
"Face for message footers (signatures)."
|
"Face for message footers (signatures)."
|
||||||
:group 'mu4e-faces)
|
:group 'mu4e-faces)
|
||||||
|
|
||||||
(defface mu4e-view-url-number-face
|
(defface mu4e-url-number-face
|
||||||
'((t :inherit font-lock-reference-face :bold t))
|
'((t :inherit font-lock-reference-face :bold t))
|
||||||
"Face for the number tags for URLs."
|
"Face for the number tags for URLs."
|
||||||
:group 'mu4e-faces)
|
:group 'mu4e-faces)
|
||||||
|
|
||||||
(defface mu4e-view-attach-number-face
|
(defface mu4e-attach-number-face
|
||||||
'((t :inherit font-lock-variable-name-face :bold t))
|
'((t :inherit font-lock-variable-name-face :bold t))
|
||||||
"Face for the number tags for attachments."
|
"Face for the number tags for attachments."
|
||||||
:group 'mu4e-faces)
|
:group 'mu4e-faces)
|
||||||
|
@ -509,7 +508,18 @@ I.e. a message with the draft flag set."
|
||||||
"Face for warnings / error."
|
"Face for warnings / error."
|
||||||
:group 'mu4e-faces)
|
:group 'mu4e-faces)
|
||||||
|
|
||||||
|
(defface mu4e-compose-separator-face
|
||||||
|
'((t :inherit message-separator :slant italic))
|
||||||
|
"Face for the separator between headers / message in
|
||||||
|
mu4e-compose-mode."
|
||||||
|
:group 'mu4e-faces)
|
||||||
|
|
||||||
|
(defface mu4e-compose-header-face
|
||||||
|
'((t :inherit message-separator :slant italic))
|
||||||
|
"Face for the separator between headers / message in
|
||||||
|
mu4e-compose-mode."
|
||||||
|
:group 'mu4e-faces)
|
||||||
|
|
||||||
;; headers info
|
;; headers info
|
||||||
(defconst mu4e-header-info
|
(defconst mu4e-header-info
|
||||||
'( (:attachments .
|
'( (:attachments .
|
||||||
|
|
|
@ -86,7 +86,6 @@ This is only effective if you're using an emacs with Imagemagick
|
||||||
support, and `mu4e-view-show-images' is non-nil."
|
support, and `mu4e-view-show-images' is non-nil."
|
||||||
:group 'mu4e-view)
|
:group 'mu4e-view)
|
||||||
|
|
||||||
|
|
||||||
(defcustom mu4e-view-scroll-to-next t
|
(defcustom mu4e-view-scroll-to-next t
|
||||||
"If non-nil, move to the next message when calling
|
"If non-nil, move to the next message when calling
|
||||||
`mu4e-view-scroll-up-or-next' (typically bound to SPC) when at the
|
`mu4e-view-scroll-up-or-next' (typically bound to SPC) when at the
|
||||||
|
@ -274,11 +273,11 @@ add text-properties to VAL."
|
||||||
(if (and val (> (length val) 0))
|
(if (and val (> (length val) 0))
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(insert (propertize (concat key ":")
|
(insert (propertize (concat key ":")
|
||||||
'face 'mu4e-view-header-key-face
|
'face 'mu4e-header-key-face
|
||||||
'help-echo help) " "
|
'help-echo help) " "
|
||||||
(if dont-propertize-val
|
(if dont-propertize-val
|
||||||
val
|
val
|
||||||
(propertize val 'face 'mu4e-view-header-value-face)) "\n")
|
(propertize val 'face 'mu4e-header-value-face)) "\n")
|
||||||
(when mu4e-view-fill-headers
|
(when mu4e-view-fill-headers
|
||||||
;; temporarily set the fill column <margin> positions to the right, so
|
;; temporarily set the fill column <margin> positions to the right, so
|
||||||
;; we can indent the following lines correctly
|
;; we can indent the following lines correctly
|
||||||
|
@ -351,7 +350,7 @@ at POINT, or if nil, at (point)."
|
||||||
'email email
|
'email email
|
||||||
'display (if mu4e-view-show-addresses long short)
|
'display (if mu4e-view-show-addresses long short)
|
||||||
'keymap map
|
'keymap map
|
||||||
'face 'mu4e-view-contact-face
|
'face 'mu4e-contact-face
|
||||||
'mouse-face 'highlight
|
'mouse-face 'highlight
|
||||||
'help-echo
|
'help-echo
|
||||||
(format "<%s>\n%s\n%s" email
|
(format "<%s>\n%s\n%s" email
|
||||||
|
@ -370,9 +369,9 @@ at POINT, or if nil, at (point)."
|
||||||
(if (symbolp flag)
|
(if (symbolp flag)
|
||||||
(symbol-name flag)
|
(symbol-name flag)
|
||||||
flag)
|
flag)
|
||||||
'face 'mu4e-view-special-header-value-face))
|
'face 'mu4e-special-header-value-face))
|
||||||
val
|
val
|
||||||
(propertize ", " 'face 'mu4e-view-header-value-face)) t))
|
(propertize ", " 'face 'mu4e-header-value-face)) t))
|
||||||
|
|
||||||
(defun mu4e~view-construct-signature-header (msg)
|
(defun mu4e~view-construct-signature-header (msg)
|
||||||
"Construct a Signature: header, if there are any signed parts."
|
"Construct a Signature: header, if there are any signed parts."
|
||||||
|
@ -466,8 +465,8 @@ at POINT, or if nil, at (point)."
|
||||||
|
|
||||||
(concat
|
(concat
|
||||||
(propertize (format "[%d]" id)
|
(propertize (format "[%d]" id)
|
||||||
'face 'mu4e-view-attach-number-face)
|
'face 'mu4e-attach-number-face)
|
||||||
(propertize name 'face 'mu4e-view-link-face
|
(propertize name 'face 'mu4e-link-face
|
||||||
'keymap map
|
'keymap map
|
||||||
'mouse-face 'highlight
|
'mouse-face 'highlight
|
||||||
'help-echo
|
'help-echo
|
||||||
|
@ -476,7 +475,7 @@ at POINT, or if nil, at (point)."
|
||||||
"[mouse-2] or [S-RET] offers to save it"))
|
"[mouse-2] or [S-RET] offers to save it"))
|
||||||
(when (and size (> size 0))
|
(when (and size (> size 0))
|
||||||
(propertize (format "(%s)" (mu4e-display-size size))
|
(propertize (format "(%s)" (mu4e-display-size size))
|
||||||
'face 'mu4e-view-header-key-face)))))
|
'face 'mu4e-header-key-face)))))
|
||||||
attachments ", ")))
|
attachments ", ")))
|
||||||
(when attachments
|
(when attachments
|
||||||
(mu4e~view-construct-header :attachments attstr t))))
|
(mu4e~view-construct-header :attachments attstr t))))
|
||||||
|
@ -791,7 +790,7 @@ Also number them so they can be opened using `mu4e-view-go-to-url'."
|
||||||
(define-key map [?\M-\r] (mu4e~view-browse-url-func url))
|
(define-key map [?\M-\r] (mu4e~view-browse-url-func url))
|
||||||
(puthash (incf num) url mu4e~view-link-map)
|
(puthash (incf num) url mu4e~view-link-map)
|
||||||
(add-text-properties 0 (length url)
|
(add-text-properties 0 (length url)
|
||||||
`(face mu4e-view-link-face
|
`(face mu4e-link-face
|
||||||
mouse-face highlight
|
mouse-face highlight
|
||||||
keymap ,map
|
keymap ,map
|
||||||
help-echo
|
help-echo
|
||||||
|
@ -799,7 +798,7 @@ Also number them so they can be opened using `mu4e-view-go-to-url'."
|
||||||
(replace-match
|
(replace-match
|
||||||
(concat url
|
(concat url
|
||||||
(propertize (format "[%d]" num)
|
(propertize (format "[%d]" num)
|
||||||
'face 'mu4e-view-url-number-face))))))))
|
'face 'mu4e-url-number-face))))))))
|
||||||
|
|
||||||
|
|
||||||
(defun mu4e~view-hide-cited ()
|
(defun mu4e~view-hide-cited ()
|
||||||
|
|
Loading…
Reference in New Issue