[PATCH] emacs: Make highlight-faces for pick configurable

2012-02-12 Thread Mark Walters
On Sun, 12 Feb 2012 15:47:18 +0100, Daniel Schoepe  
wrote:
> ---
>  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

This is great. (I had even thought about the hardwired gray: that should
work on both light and dark backgrounds but had forgotten all about the
"black").

Anyway this is the correct fix: thanks!

Mark




[PATCH] emacs: Make highlight-faces for pick configurable

2012-02-12 Thread Daniel Schoepe
---
 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

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] emacs: Make highlight-faces for pick configurable

2012-02-12 Thread Mark Walters
On Sun, 12 Feb 2012 15:47:18 +0100, Daniel Schoepe dan...@schoepe.org wrote:
 ---
  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

This is great. (I had even thought about the hardwired gray: that should
work on both light and dark backgrounds but had forgotten all about the
black).

Anyway this is the correct fix: thanks!

Mark


___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch