]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: Add a face for crypto parts headers
authorThomas Jost <schnouki@schnouki.net>
Tue, 13 Dec 2011 17:32:10 +0000 (18:32 +0100)
committerDavid Bremner <bremner@debian.org>
Fri, 16 Dec 2011 02:51:24 +0000 (22:51 -0400)
Commit cb841878 introduced new parts handlers for crypto parts, but also
hardcoded values for their headers face. This replaces these hardcoded values
with a customizable face.

emacs/notmuch-crypto.el
emacs/notmuch-show.el

index 44fccae08d3d8d90848a830c57a8f7930ca6e99d..67c26af997934e9c74d8f9e251af00e31862953a 100644 (file)
@@ -37,6 +37,11 @@ mode."
   :group 'notmuch
   :type 'boolean)
 
   :group 'notmuch
   :type 'boolean)
 
+(defface notmuch-crypto-part-header
+  '((t (:foreground "blue")))
+  "Face used for crypto parts headers."
+  :group 'notmuch)
+
 (defface notmuch-crypto-signature-good
   '((t (:background "green" :foreground "black")))
   "Face used for good signatures."
 (defface notmuch-crypto-signature-good
   '((t (:background "green" :foreground "black")))
   "Face used for good signatures."
index 33ee3d82d139be756c182c669ce10cf80305899a..ec9c52cd94c2eb5d3e54aa367730d0b377f14ba1 100644 (file)
@@ -457,7 +457,7 @@ current buffer, if possible."
 
 (defun notmuch-show-insert-part-multipart/signed (msg part content-type nth depth declared-type)
   (let ((button (notmuch-show-insert-part-header nth declared-type content-type nil)))
 
 (defun notmuch-show-insert-part-multipart/signed (msg part content-type nth depth declared-type)
   (let ((button (notmuch-show-insert-part-header nth declared-type content-type nil)))
-    (button-put button 'face '(:foreground "blue"))
+    (button-put button 'face 'notmuch-crypto-part-header)
     ;; add signature status button if sigstatus provided
     (if (plist-member part :sigstatus)
        (let* ((from (notmuch-show-get-header :From msg))
     ;; add signature status button if sigstatus provided
     (if (plist-member part :sigstatus)
        (let* ((from (notmuch-show-get-header :From msg))
@@ -479,7 +479,7 @@ current buffer, if possible."
 
 (defun notmuch-show-insert-part-multipart/encrypted (msg part content-type nth depth declared-type)
   (let ((button (notmuch-show-insert-part-header nth declared-type content-type nil)))
 
 (defun notmuch-show-insert-part-multipart/encrypted (msg part content-type nth depth declared-type)
   (let ((button (notmuch-show-insert-part-header nth declared-type content-type nil)))
-    (button-put button 'face '(:foreground "blue"))
+    (button-put button 'face 'notmuch-crypto-part-header)
     ;; add encryption status button if encstatus specified
     (if (plist-member part :encstatus)
        (let ((encstatus (car (plist-get part :encstatus))))
     ;; add encryption status button if encstatus specified
     (if (plist-member part :encstatus)
        (let ((encstatus (car (plist-get part :encstatus))))