]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: Fix notmuch-mua-user-agent defcustom
authorJani Nikula <jani@nikula.org>
Tue, 20 Dec 2011 19:53:14 +0000 (21:53 +0200)
committerDavid Bremner <bremner@debian.org>
Thu, 22 Dec 2011 10:54:29 +0000 (06:54 -0400)
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>
emacs/notmuch-mua.el

index b52576210311190684eb50229006f4bfeb003fa6..7114e48a4b8ca94223c969cefebcb5f50fde55fa 100644 (file)
   "Function used to generate a `User-Agent:' string. If this is
 `nil' then no `User-Agent:' will be generated."
   :group 'notmuch
   "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
 
 (defcustom notmuch-mua-hidden-headers '("^User-Agent:")
   "Headers that are added to the `message-mode' hidden headers