* cleanup mu4e~view-fontify-cited a bit, and add a few levels
This commit is contained in:
@ -270,6 +270,24 @@ 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
|
||||||
|
|||||||
@ -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))))
|
||||||
|
|||||||
Reference in New Issue
Block a user