[PATCH] emacs: make the remaining faces configurable.
authorMatt Armstrong <marmstrong@google.com>
Sun, 14 Aug 2016 22:17:42 +0000 (15:17 +1700)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:22:27 +0000 (16:22 -0700)
c4/b96327256571099367b431a8da2e534dec14fb [new file with mode: 0644]

diff --git a/c4/b96327256571099367b431a8da2e534dec14fb b/c4/b96327256571099367b431a8da2e534dec14fb
new file mode 100644 (file)
index 0000000..290e185
--- /dev/null
@@ -0,0 +1,172 @@
+Return-Path: <marmstrong@google.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 5E9F96DE76E6\r
+ for <notmuch@notmuchmail.org>; Sun, 14 Aug 2016 15:41:28 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.925\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.925 tagged_above=-999 required=5 tests=[AWL=0.097,\r
+  DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.211, SPF_PASS=-0.001,\r
+ T_RP_MATCHES_RCVD=-0.01] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id jhDSW5u-ZJs3 for <notmuch@notmuchmail.org>;\r
+ Sun, 14 Aug 2016 15:41:19 -0700 (PDT)\r
+Received: from mail-pf0-f181.google.com (mail-pf0-f181.google.com\r
+ [209.85.192.181])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 3A6E16DE89A0\r
+ for <notmuch@notmuchmail.org>; Sun, 14 Aug 2016 15:17:50 -0700 (PDT)\r
+Received: by mail-pf0-f181.google.com with SMTP id y134so11665500pfg.0\r
+ for <notmuch@notmuchmail.org>; Sun, 14 Aug 2016 15:17:50 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\r
+ s=20120113; h=from:to:cc:subject:date:message-id;\r
+ bh=d3m6bSNvBaaC7UIdSYsFnkRrX8YwzdOJBbcL/wEu7Cs=;\r
+ b=B6O09nn4VowMoCmC95VvMf/xieQ4YOa+Z9F1hAu7bAK2qC/XXO1tQJpwvOLRR/1yz+\r
+ GzArbPcxjlRmpIc8yIXYgqyAvOpxjE4FrjUDXEDUl4fipIR01cToFDb47b5y+r9kQxIc\r
+ PnJvgBoWZf4NI71b3EXVllvQB696K1kAT01ztuEp3cmIy3QKnBWgX1R7GyYPhjqRke7t\r
+ JS1jPKO6unioKxf6lfl62p1tj+N+fcsxIZJ+HkfNxd85gptDREJB/wdPHjb7o0PRRoHI\r
+ tqGMzzdoz112+V4bxbq/wwm3/QvT9RS1AS/10kA1UltJsWWr5bnE8IB7PdQVBauxAc9R BpjA==\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:from:to:cc:subject:date:message-id;\r
+ bh=d3m6bSNvBaaC7UIdSYsFnkRrX8YwzdOJBbcL/wEu7Cs=;\r
+ b=FUN8dczE88gFJ9zT7+L9EUbBPgzJbYKwmMTtF/ThwiqJJDGst2JjFZ+mk0/JC3s0Gv\r
+ HTLC8ZKXaHawhvtL3aqQuWzGDX05jO12No41GPTrB2JqBfyyVuPlBbTuEZmMyZaBsCbd\r
+ qlhvmruRXER5M0IPkptjyHZAcjS3POqikxS+yME+IxT6IPidCEw7c+FXKaktSmPS6YPS\r
+ NMaBOClgS6roienGGdKPkh311/vTR6LEZoEMMzWFCkTbufs5bIMSWqp9ZmlWYqoL/shA\r
+ 0R24Hn93S83s5j0akpbmxc380p9CpeDkcwUBqJ9g4woe6Lfk/1YAUuQPoNMeGsRBvc/0\r
+ bgOg==\r
+X-Gm-Message-State:\r
+ AEkoouvle1cgAB6v0AXo9Hfdg98DltkYTRiOq/KRNBzVRCc00QUbEX6NGTQbexJ1NRRiCp5r\r
+X-Received: by 10.98.51.131 with SMTP id z125mr48550084pfz.109.1471213068252; \r
+ Sun, 14 Aug 2016 15:17:48 -0700 (PDT)\r
+Received: from marmstrong-linux.kir.corp.google.com ([100.119.200.73])\r
+ by smtp.gmail.com with ESMTPSA id r2sm27996878pal.14.2016.08.14.15.17.46\r
+ (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\r
+ Sun, 14 Aug 2016 15:17:47 -0700 (PDT)\r
+From: Matt Armstrong <marmstrong@google.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] emacs: make the remaining faces configurable.\r
+Date: Sun, 14 Aug 2016 15:17:42 -0700\r
+Message-Id: <1471213062-13610-1-git-send-email-marmstrong@google.com>\r
+X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 14 Aug 2016 22:41:28 -0000\r
+\r
+I believe this moves all "anonymous" face specifications in notmuch\r
+code into a configurable defface.\r
+---\r
+ NEWS                 |  8 ++++----\r
+ emacs/notmuch-tag.el | 45 ++++++++++++++++++++++++++++++++++-----------\r
+ 2 files changed, 38 insertions(+), 15 deletions(-)\r
+\r
+diff --git a/NEWS b/NEWS\r
+index 3a9c8d3..2ff78e9 100644\r
+--- a/NEWS\r
++++ b/NEWS\r
+@@ -6,10 +6,10 @@ Emacs\r
\r
+ Face customization is easier\r
\r
+-  New faces `notmuch-search-flagged-face` and\r
+-  `notmuch-search-unread-face` are used by default by\r
+-  `notmuch-search-line-faces`. Customize `notmuch-faces` to modify\r
+-  them.\r
++  New faces `notmuch-tag-unread`, `notmuch-tag-flagged`,\r
++  `notmuch-tag-deleted`, `notmuch-tag-added`,\r
++  `notmuch-search-flagged-face` and `notmuch-search-unread-face` are\r
++  now used by default. Customize `notmuch-faces` to modify them.\r
\r
+ Ruby Bindings\r
+ -------------\r
+diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el\r
+index a3f0c52..ec3c964 100644\r
+--- a/emacs/notmuch-tag.el\r
++++ b/emacs/notmuch-tag.el\r
+@@ -56,9 +56,23 @@\r
+                                         (string :tag "Custom")))\r
+                           (sexp :tag "Custom")))))\r
\r
++(defface notmuch-tag-unread\r
++  '((t :foreground "red"))\r
++  "Default face used for the unread tag.\r
++\r
++Used in the default value of `notmuch-tag-formats`."\r
++  :group 'notmuch-faces)\r
++\r
++(defface notmuch-tag-flagged\r
++  '((t :foreground "blue"))\r
++  "Face used for the flagged tag.\r
++\r
++Used in the default value of `notmuch-tag-formats`."\r
++  :group 'notmuch-faces)\r
++\r
+ (defcustom notmuch-tag-formats\r
+-  '(("unread" (propertize tag 'face '(:foreground "red")))\r
+-    ("flagged" (propertize tag 'face '(:foreground "blue"))\r
++  '(("unread" (propertize tag 'face 'notmuch-tag-unread))\r
++    ("flagged" (propertize tag 'face 'notmuch-tag-flagged)\r
+      (notmuch-tag-format-image-data tag (notmuch-tag-star-icon))))\r
+   "Custom formats for individual tags.\r
\r
+@@ -90,15 +104,17 @@ with images."\r
+   :group 'notmuch-faces\r
+   :type 'notmuch-tag-format-type)\r
\r
++(defface notmuch-tag-deleted\r
++  '((((class color) (supports :strike-through)) :strike-through "red")\r
++    (t :inverse-video t))\r
++  "Face used to display deleted tags.\r
++\r
++Used in the default value of `notmuch-tag-deleted-formats`."\r
++  :group 'notmuch-faces)\r
++\r
+ (defcustom notmuch-tag-deleted-formats\r
+-  '(("unread" (notmuch-apply-face bare-tag\r
+-                                (if (display-supports-face-attributes-p '(:strike-through "red"))\r
+-                                    '(:strike-through "red")\r
+-                                  '(:inverse-video t))))\r
+-    (".*" (notmuch-apply-face tag\r
+-                            (if (display-supports-face-attributes-p '(:strike-through "red"))\r
+-                                '(:strike-through "red")\r
+-                              '(:inverse-video t)))))\r
++  '(("unread" (notmuch-apply-face bare-tag `notmuch-tag-deleted))\r
++    (".*" (notmuch-apply-face tag `notmuch-tag-deleted)))\r
+   "Custom formats for tags when deleted.\r
\r
+ For deleted tags the formats in `notmuch-tag-formats` are applied\r
+@@ -118,8 +134,15 @@ See `notmuch-tag-formats' for full documentation."\r
+   :group 'notmuch-faces\r
+   :type 'notmuch-tag-format-type)\r
\r
++(defface notmuch-tag-added\r
++  '((t :underline "green"))\r
++  "Default face used for added tags.\r
++\r
++Used in the default value for `notmuch-tag-added-formats`."\r
++  :group 'notmuch-faces)\r
++\r
+ (defcustom notmuch-tag-added-formats\r
+-  '((".*" (notmuch-apply-face tag '(:underline "green"))))\r
++  '((".*" (notmuch-apply-face tag 'notmuch-tag-added)))\r
+   "Custom formats for tags when added.\r
\r
+ For added tags the formats in `notmuch-tag-formats` are applied\r
+-- \r
+2.8.0.rc3.226.g39d4020\r
+\r