From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 96A84429E34 for ; Tue, 13 Dec 2011 09:32:32 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.1 X-Spam-Level: X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NXW-TDNae58A for ; Tue, 13 Dec 2011 09:32:30 -0800 (PST) Received: from ks3536.kimsufi.com (schnouki.net [87.98.217.222]) by olra.theworths.org (Postfix) with ESMTP id 436EE429E28 for ; Tue, 13 Dec 2011 09:32:30 -0800 (PST) Received: from thor.loria.fr (thor.loria.fr [152.81.12.250]) by ks3536.kimsufi.com (Postfix) with ESMTPSA id 962036A002A; Tue, 13 Dec 2011 18:32:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net; s=key-schnouki; t=1323797549; bh=2WFPcLDYBeest3cKoOrH1D2US6CBUb+4jauDvRXv5Ak=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References; b=J9OZLjHVTwbEGzHxD9MZn/9tY7gnqDPo+4wK+f1feZlOpP3MqYoIzFw+9G8ejCk/a O6bJqeqdIVfM8ZPJKG4GVcYUVIzop+ZH1PsOSGqyWwWRvkb9knU+7CowDdeY58cKhx 1VCAxAgFZPzttu6s+4pjrOKO/qhzj4s0vOiZBoOA= From: Thomas Jost To: notmuch@notmuchmail.org Subject: [PATCH v3 2/4] emacs: Add a face for crypto parts headers Date: Tue, 13 Dec 2011 18:32:10 +0100 Message-Id: <1323797532-597-3-git-send-email-schnouki@schnouki.net> X-Mailer: git-send-email 1.7.8 In-Reply-To: <1323797532-597-1-git-send-email-schnouki@schnouki.net> References: <87d3cx2t38.fsf@rocinante.cs.unb.ca> <1323797532-597-1-git-send-email-schnouki@schnouki.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2011 17:32:33 -0000 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 | 5 +++++ emacs/notmuch-show.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-crypto.el b/emacs/notmuch-crypto.el index 44fccae..67c26af 100644 --- a/emacs/notmuch-crypto.el +++ b/emacs/notmuch-crypto.el @@ -37,6 +37,11 @@ mode." :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." diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 33ee3d8..ec9c52c 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -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))) - (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)) @@ -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))) - (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)))) -- 1.7.8