]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-tag.el
emacs: make the remaining faces configurable.
[notmuch] / emacs / notmuch-tag.el
index a3f0c52a72233934d992413653ba504d488922cf..ec3c964d5b8341f93dc6651d5d1d1fd246644e5d 100644 (file)
                                          (string :tag "Custom")))
                            (sexp :tag "Custom")))))
 
+(defface notmuch-tag-unread
+  '((t :foreground "red"))
+  "Default face used for the unread tag.
+
+Used in the default value of `notmuch-tag-formats`."
+  :group 'notmuch-faces)
+
+(defface notmuch-tag-flagged
+  '((t :foreground "blue"))
+  "Face used for the flagged tag.
+
+Used in the default value of `notmuch-tag-formats`."
+  :group 'notmuch-faces)
+
 (defcustom notmuch-tag-formats
-  '(("unread" (propertize tag 'face '(:foreground "red")))
-    ("flagged" (propertize tag 'face '(:foreground "blue"))
+  '(("unread" (propertize tag 'face 'notmuch-tag-unread))
+    ("flagged" (propertize tag 'face 'notmuch-tag-flagged)
      (notmuch-tag-format-image-data tag (notmuch-tag-star-icon))))
   "Custom formats for individual tags.
 
@@ -90,15 +104,17 @@ with images."
   :group 'notmuch-faces
   :type 'notmuch-tag-format-type)
 
+(defface notmuch-tag-deleted
+  '((((class color) (supports :strike-through)) :strike-through "red")
+    (t :inverse-video t))
+  "Face used to display deleted tags.
+
+Used in the default value of `notmuch-tag-deleted-formats`."
+  :group 'notmuch-faces)
+
 (defcustom notmuch-tag-deleted-formats
-  '(("unread" (notmuch-apply-face bare-tag
-                                 (if (display-supports-face-attributes-p '(:strike-through "red"))
-                                     '(:strike-through "red")
-                                   '(:inverse-video t))))
-    (".*" (notmuch-apply-face tag
-                             (if (display-supports-face-attributes-p '(:strike-through "red"))
-                                 '(:strike-through "red")
-                               '(:inverse-video t)))))
+  '(("unread" (notmuch-apply-face bare-tag `notmuch-tag-deleted))
+    (".*" (notmuch-apply-face tag `notmuch-tag-deleted)))
   "Custom formats for tags when deleted.
 
 For deleted tags the formats in `notmuch-tag-formats` are applied
@@ -118,8 +134,15 @@ See `notmuch-tag-formats' for full documentation."
   :group 'notmuch-faces
   :type 'notmuch-tag-format-type)
 
+(defface notmuch-tag-added
+  '((t :underline "green"))
+  "Default face used for added tags.
+
+Used in the default value for `notmuch-tag-added-formats`."
+  :group 'notmuch-faces)
+
 (defcustom notmuch-tag-added-formats
-  '((".*" (notmuch-apply-face tag '(:underline "green"))))
+  '((".*" (notmuch-apply-face tag 'notmuch-tag-added)))
   "Custom formats for tags when added.
 
 For added tags the formats in `notmuch-tag-formats` are applied