mirror of https://github.com/djcb/mu.git
* cleanup mu4e~view-fontify-cited a bit, and add a few levels
This commit is contained in:
parent
ea101876e2
commit
605657d4de
|
@ -270,13 +270,31 @@ flag set)."
|
||||||
"Face for cited message parts (level 4)."
|
"Face for cited message parts (level 4)."
|
||||||
:group 'mu4e-faces)
|
:group 'mu4e-faces)
|
||||||
|
|
||||||
|
(defface mu4e-cited-5-face
|
||||||
|
'((t :inherit font-lock-comment-face :bold nil :italic t))
|
||||||
|
"Face for cited message parts (level 5)."
|
||||||
|
:group 'mu4e-faces)
|
||||||
|
|
||||||
|
(defface mu4e-cited-6-face
|
||||||
|
'((t :inherit font-lock-comment-delimiter-face :bold nil :italic t))
|
||||||
|
"Face for cited message parts (level 6)."
|
||||||
|
:group 'mu4e-faces)
|
||||||
|
|
||||||
|
(defface mu4e-cited-7-face
|
||||||
|
'((t :inherit font-lock-preprocessor-face :bold nil :italic t))
|
||||||
|
"Face for cited message parts (level 7)."
|
||||||
|
:group 'mu4e-faces)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(defface mu4e-system-face
|
(defface mu4e-system-face
|
||||||
'((t :inherit font-lock-comment-face :slant italic))
|
'((t :inherit font-lock-comment-face :slant italic))
|
||||||
"Face for system message (such as the footers for message
|
"Face for system message (such as the footers for message
|
||||||
headers)."
|
headers)."
|
||||||
:group 'mu4e-faces)
|
:group 'mu4e-faces)
|
||||||
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; internal variables / constants
|
;; internal variables / constants
|
||||||
|
|
||||||
|
@ -299,7 +317,7 @@ view). Most fields should be self-explanatory. A special one is
|
||||||
`mu4e-user-mail-address-regexp', in which case it will be equal to
|
`mu4e-user-mail-address-regexp', in which case it will be equal to
|
||||||
`:to'.")
|
`:to'.")
|
||||||
|
|
||||||
|
|
||||||
(defconst mu4e-logo
|
(defconst mu4e-logo
|
||||||
(propertize "mu4e" 'face 'mu4e-title-face)
|
(propertize "mu4e" 'face 'mu4e-title-face)
|
||||||
"A propertized string for the mu4e 'logo'.")
|
"A propertized string for the mu4e 'logo'.")
|
||||||
|
|
|
@ -551,17 +551,11 @@ Seen; if the message is not New/Unread, do nothing."
|
||||||
;; Get the citation level at point -- i.e., the number of '>'
|
;; Get the citation level at point -- i.e., the number of '>'
|
||||||
;; prefixes, starting with 0 for 'no citation'
|
;; prefixes, starting with 0 for 'no citation'
|
||||||
(beginning-of-line 1)
|
(beginning-of-line 1)
|
||||||
(let* ((text (re-search-forward "[[:word:]]" (line-end-position 1) t 1))
|
(let* ((level (how-many ">" (line-beginning-position 1)
|
||||||
(level (or (and text
|
(line-end-position 1)))
|
||||||
(how-many ">" (line-beginning-position 1) text)) 0))
|
|
||||||
(face
|
(face
|
||||||
(cond
|
(unless (zerop level)
|
||||||
((= 0 level) nil) ;; don't do anything
|
(intern-soft (format "mu4e-cited-%d-face" level)))))
|
||||||
((= 1 level) 'mu4e-cited-1-face)
|
|
||||||
((= 2 level) 'mu4e-cited-2-face)
|
|
||||||
((= 3 level) 'mu4e-cited-3-face)
|
|
||||||
((= 4 level) 'mu4e-cited-4-face)
|
|
||||||
(t nil))))
|
|
||||||
(when face
|
(when face
|
||||||
(add-text-properties (line-beginning-position 1)
|
(add-text-properties (line-beginning-position 1)
|
||||||
(line-end-position 1) `(face ,face))))
|
(line-end-position 1) `(face ,face))))
|
||||||
|
|
Loading…
Reference in New Issue