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 CC2EE421169 for ; Sun, 12 Feb 2012 06:47:35 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.8 X-Spam-Level: X-Spam-Status: No, score=-0.8 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7] 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 zGff0vypybLO for ; Sun, 12 Feb 2012 06:47:35 -0800 (PST) Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com [74.125.83.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id AF123429E5F for ; Sun, 12 Feb 2012 06:47:32 -0800 (PST) Received: by eeke51 with SMTP id e51so2239036eek.26 for ; Sun, 12 Feb 2012 06:47:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=schoepe.org; s=google; h=mime-version:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=prSjp0+yd8f6YVF9mfS/iYEfAhpSVFPh4KTHtQWYACs=; b=Xuml1fACnA/Nf69StEN/pYaMOgVnWIQSPOuE4aQmt91fmhri5qI/V07TyOsbJUXEJf O5QGjzPrUxc/sf4fyY0t5+RE02UDgzB4VC70rWL/p0fn/z3JAY/AmWm7w0b+OjhLOjim bzHaexNSU1sqHfQRtl68KbVb9WoOmrmfP/4qs= MIME-Version: 1.0 Received: by 10.213.27.73 with SMTP id h9mr789774ebc.31.1329058051484; Sun, 12 Feb 2012 06:47:31 -0800 (PST) Received: from localhost (dslb-088-069-141-163.pools.arcor-ip.net. [88.69.141.163]) by mx.google.com with ESMTPS id n56sm49411338eeh.6.2012.02.12.06.47.30 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 12 Feb 2012 06:47:30 -0800 (PST) From: Daniel Schoepe To: notmuch@notmuchmail.org Subject: [PATCH] emacs: Make highlight-faces for pick configurable Date: Sun, 12 Feb 2012 15:47:18 +0100 Message-Id: <1329058038-6029-2-git-send-email-daniel@schoepe.org> X-Mailer: git-send-email 1.7.9 In-Reply-To: <1329058038-6029-1-git-send-email-daniel@schoepe.org> References: <87d39k1gvi.fsf@qmul.ac.uk> <1329058038-6029-1-git-send-email-daniel@schoepe.org> X-Gm-Message-State: ALoCoQnRpKOIEpWQia6Z4/AoKBGOWYBattifV8o3laxJqvFfoUcgZfTj9mr0HLbM2T/EZEln7An/ 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: Sun, 12 Feb 2012 14:47:36 -0000 --- emacs/notmuch-pick.el | 21 ++++++++++++++++++--- 1 files changed, 18 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-pick.el b/emacs/notmuch-pick.el index 4c91d7c..2bf1ae4 100644 --- a/emacs/notmuch-pick.el +++ b/emacs/notmuch-pick.el @@ -42,6 +42,22 @@ :group 'notmuch :type 'int) +(defface notmuch-pick-match-face + '((((class color) + (background dark)) + (:foreground "white")) + (((class color) + (background light)) + (:foreground "black")) + (t (:bold t))) + "Face used in pick mode for matching messages." + :group 'notmuch) + +(defface notmuch-pick-no-match-face + '((t (:foreground "gray"))) + "Face used in pick mode for messages not matching the query." + :group 'notmuch) + (defvar notmuch-pick-previous-subject "") (make-variable-buffer-local 'notmuch-pick-previous-subject) @@ -415,10 +431,9 @@ unchanged ADDRESS if parsing fails." (match (plist-get msg :match)) (tags (plist-get msg :tags)) (bare-subject (notmuch-show-strip-re (plist-get headers :Subject))) - ;; Face should be a defcustom or something MJW (message-face (if match - '(:foreground "black") - '(:foreground "gray")))) + 'notmuch-pick-match-face + 'notmuch-pick-no-match-face))) (insert (propertize (concat (notmuch-pick-string-width -- 1.7.9