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

Mark Walters markwalters1009 at gmail.com
Sun Feb 12 07:50:00 PST 2012


On Sun, 12 Feb 2012 15:47:18 +0100, Daniel Schoepe <daniel at 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




More information about the notmuch mailing list