From 82bf333fab2b2a16e7ea241306ae0b6317a082b0 Mon Sep 17 00:00:00 2001 From: "James P. Ascher" Date: Tue, 3 Apr 2018 14:50:28 -0400 Subject: [PATCH] updated fontify-signature for RFC 1153 compliant digest messages --- mu4e/mu4e-utils.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mu4e/mu4e-utils.el b/mu4e/mu4e-utils.el index 03bfce99..6a890da1 100644 --- a/mu4e/mu4e-utils.el +++ b/mu4e/mu4e-utils.el @@ -1289,14 +1289,17 @@ used in the view and compose modes." (defun mu4e~fontify-signature () "Give the message signatures a distinctive color. This is used in -the view and compose modes." +the view and compose modes and will color each signature in digest messages adhearing to RFC 1153." (let ((inhibit-read-only t)) (save-excursion ;; give the footer a different color... (goto-char (point-min)) - (let ((p (re-search-forward "^-- *$" nil t))) - (when p - (add-text-properties p (point-max) '(face mu4e-footer-face))))))) + (while (re-search-forward "^-- *$" nil t) + (let ((p (point)) + (end (or + (re-search-forward "\\(^-\\{30\\}.*$\\)" nil t) ;; 30 by RFC1153 + (point-max)))) + (add-text-properties p end '(face mu4e-footer-face))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun mu4e~quote-for-modeline (str)