[PATCH v3 2/4] emacs: Add a face for crypto parts headers

Dmitry Kurochkin dmitry.kurochkin at gmail.com
Thu Dec 15 16:56:53 PST 2011


On Tue, 13 Dec 2011 18:32:10 +0100, Thomas Jost <schnouki at schnouki.net> wrote:
> 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.
> ---

Looks good to me.

Regards,
  Dmitry

>  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
> 
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


More information about the notmuch mailing list