From: Jani Nikula <jani@nikula.org>
Date: Tue, 20 Dec 2011 19:53:14 +0000 (+0200)
Subject: emacs: Fix notmuch-mua-user-agent defcustom
X-Git-Tag: 0.11_rc1~11
X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=d4c598dc9ed3af0d38fde9b9f0dcf6fa8dd62351;p=obsolete%2Fnotmuch-old

emacs: Fix notmuch-mua-user-agent defcustom

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.

Signed-off-by: Jani Nikula <jani@nikula.org>
---

diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index b5257621..7114e48a 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