[PATCH 2/2] emacs: Fix notmuch-mua-user-agent defcustom

Dmitry Kurochkin dmitry.kurochkin at gmail.com
Fri Dec 16 04:31:22 PST 2011


On Fri, 23 Sep 2011 22:03:42 +0300, Jani Nikula <jani at nikula.org> wrote:
> The :options keyword is not meaningful for function type. Also, it was not
> possible to enter nil value, contrary to the notmuch-mua-user-agent
> defcustom documentation. Specify the alternatives using choice type, taking
> nil into account.
> 

I know little about the customize interface.  But the patch makes sense
to me.

Perhaps I would give mode detailed description for the options, but
before the change there was none at all, so this is definitely an
improvement.

Regards,
  Dmitry

> Signed-off-by: Jani Nikula <jani at nikula.org>
> ---
>  emacs/notmuch-mua.el |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
> index 8824b08..8b95bd4 100644
> --- a/emacs/notmuch-mua.el
> +++ b/emacs/notmuch-mua.el
> @@ -35,10 +35,12 @@
>    "Function used to generate a `User-Agent:' string. If this is
>  `nil' then no `User-Agent:' will be generated."
>    :group 'notmuch
> -  :type 'function
> -  :options '(notmuch-mua-user-agent-full
> -	     notmuch-mua-user-agent-notmuch
> -	     notmuch-mua-user-agent-emacs))
> +  :type '(choice (const :tag "No user agent string" nil)
> +		 (const :tag "Full" notmuch-mua-user-agent-full)
> +		 (const :tag "Notmuch" notmuch-mua-user-agent-notmuch)
> +		 (const :tag "Emacs" notmuch-mua-user-agent-emacs)
> +		 (function :tag "Custom user agent function"
> +			   :value notmuch-mua-user-agent-full)))
>  
>  (defcustom notmuch-mua-hidden-headers '("^User-Agent:")
>    "Headers that are added to the `message-mode' hidden headers
> -- 
> 1.7.4.1
> 
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


More information about the notmuch mailing list