Misc changes made in Emacs trunk
authorGlenn Morris <rgm@gnu.org>
Sat, 28 Dec 2013 11:54:38 +0000 (11:54 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Sat, 28 Dec 2013 11:54:38 +0000 (11:54 +0000)
lisp/ChangeLog
lisp/gnus-sieve.el
lisp/gravatar.el
lisp/hashcash.el
lisp/message.el
lisp/sieve-manage.el

index fb9e5ac..4c92972 100644 (file)
@@ -1,5 +1,15 @@
 2013-12-28  Glenn Morris  <rgm@gnu.org>
 
+       * gnus-sieve.el (gnus-sieve-select-method):
+       * gravatar.el (gravatar-automatic-caching, gravatar-cache-ttl)
+       (gravatar-rating, gravatar-size):
+       * message.el (message-minibuffer-local-map):
+       * sieve-manage.el (sieve-manage-authenticators)
+       (sieve-manage-authenticator-alist): Specify custom types.
+
+       * hashcash.el (hashcash-program): Rename from hashcash-path.
+       Update callers.
+
        * gnus-icalendar.el (gnus-icalendar-org, gnus-icalendar):
        * gnus-sum.el (gnus-subthread-sort-functions): Add version.
        * gnus-sync.el (gnus-sync-file-encrypt-to): Add type and version.
index ee3cdf4..80ad6ab 100644 (file)
   :group 'gnus-sieve)
 
 (defcustom gnus-sieve-region-start "\n## Begin Gnus Sieve Script\n"
-  "Line indicating the start of the autogenerated region in
-your Sieve script."
+  "Line indicating the start of the autogenerated region in your Sieve script."
   :type 'string
   :group 'gnus-sieve)
 
 (defcustom gnus-sieve-region-end "\n## End Gnus Sieve Script\n"
-  "Line indicating the end of the autogenerated region in
-your Sieve script."
+  "Line indicating the end of the autogenerated region in your Sieve script."
   :type 'string
   :group 'gnus-sieve)
 
 (defcustom gnus-sieve-select-method nil
   "Which select method we generate the Sieve script for.
-
 For example: \"nnimap:mailbox\""
+  ;; FIXME? gnus-select-method?
+  :type '(choice (const nil) string)
   :group 'gnus-sieve)
 
 (defcustom gnus-sieve-crosspost t
index 985ed2c..fa7e8fa 100644 (file)
   :group 'comm)
 
 (defcustom gravatar-automatic-caching t
-  "Whether cache retrieved gravatar."
+  "Whether to cache retrieved gravatars."
+  :type 'boolean
   :group 'gravatar)
 
+;; FIXME a time value is not the nicest format for a custom variable.
 (defcustom gravatar-cache-ttl (days-to-time 30)
   "Time to live for gravatar cache entries."
+  :type '(repeat integer)
   :group 'gravatar)
 
+;; FIXME Doc is tautological.  What are the options?
 (defcustom gravatar-rating "g"
   "Default rating for gravatar."
+  :type 'string
   :group 'gravatar)
 
 (defcustom gravatar-size 32
   "Default size in pixels for gravatars."
+  :type 'integer
   :group 'gravatar)
 
 (defconst gravatar-base-url
index b6df075..07a428a 100644 (file)
@@ -89,20 +89,25 @@ present, is the string to be hashed; if not present ADDR will be used."
 Resources named here are to be accepted in incoming payments.  If the
 corresponding AMOUNT is NIL, the value of `hashcash-default-accept-payment'
 is used instead."
+  :type 'alist
   :group 'hashcash)
 
-(defcustom hashcash-path (executable-find "hashcash")
-  "The path to the hashcash binary."
+(define-obsolete-variable-alias 'hashcash-path 'hashcash-program "24.4")
+(defcustom hashcash-program "hashcash"
+  "The name of the hashcash executable.
+If this is not in your PATH, specify an absolute file name."
+  :type '(choice (const nil) file)
   :group 'hashcash)
 
 (defcustom hashcash-extra-generate-parameters nil
-  "A list of parameter strings passed to `hashcash-path' when minting.
+  "A list of parameter strings passed to `hashcash-program' when minting.
 For example, you may want to set this to '(\"-Z2\") to reduce header length."
   :type '(repeat string)
   :group 'hashcash)
 
 (defcustom hashcash-double-spend-database "hashcash.db"
-  "The path to the double-spending database."
+  "The name of the double-spending database file."
+  :type 'file
   :group 'hashcash)
 
 (defcustom hashcash-in-news nil
@@ -159,10 +164,10 @@ For example, you may want to set this to '(\"-Z2\") to reduce header length."
 (defun hashcash-generate-payment (str val)
   "Generate a hashcash payment by finding a VAL-bit collison on STR."
   (if (and (> val 0)
-          hashcash-path)
+          hashcash-program)
       (with-current-buffer (get-buffer-create " *hashcash*")
        (erase-buffer)
-       (apply 'call-process hashcash-path nil t nil
+       (apply 'call-process hashcash-program nil t nil
               "-m" "-q" "-b" (number-to-string val) str
               hashcash-extra-generate-parameters)
        (goto-char (point-min))
@@ -173,9 +178,9 @@ For example, you may want to set this to '(\"-Z2\") to reduce header length."
   "Generate a hashcash payment by finding a VAL-bit collison on STR.
 Return immediately.  Call CALLBACK with process and result when ready."
   (if (and (> val 0)
-          hashcash-path)
+          hashcash-program)
       (let ((process (apply 'start-process "hashcash" nil
-                           hashcash-path "-m" "-q"
+                           hashcash-program "-m" "-q"
                            "-b" (number-to-string val) str
                            hashcash-extra-generate-parameters)))
        (setq hashcash-process-alist (cons
@@ -187,8 +192,8 @@ Return immediately.  Call CALLBACK with process and result when ready."
 
 (defun hashcash-check-payment (token str val)
   "Check the validity of a hashcash payment."
-  (if hashcash-path
-      (zerop (call-process hashcash-path nil nil nil "-c"
+  (if hashcash-program
+      (zerop (call-process hashcash-program nil nil nil "-c"
                           "-d" "-f" hashcash-double-spend-database
                           "-b" (number-to-string val)
                           "-r" str
index 4a7c2ab..53f756f 100644 (file)
@@ -972,6 +972,8 @@ the signature is inserted."
     (set-keymap-parent map minibuffer-local-map)
     map)
   "Keymap for `message-read-from-minibuffer'."
+  ;; FIXME improve type.
+  :type '(restricted-sexp :match-alternatives (symbolp keymapp))
   :version "22.1"
   :group 'message-various)
 
index 4221276..2784398 100644 (file)
                                         plain
                                         login)
   "Priority of authenticators to consider when authenticating to server."
+  ;; FIXME Improve this.  It's not `set'.
+  ;; It's like (repeat (choice (const ...))), where each choice can
+  ;; only appear once.
+  :type '(repeat symbol)
   :group 'sieve-manage)
 
 (defcustom sieve-manage-authenticator-alist
 NAME names the authenticator.  CHECK is a function returning non-nil if
 the server support the authenticator and AUTHENTICATE is a function
 for doing the actual authentication."
+  :type '(repeat (list (symbol :tag "Name") (function :tag "Check function")
+                      (function :tag "Authentication function")))
   :group 'sieve-manage)
 
 (defcustom sieve-manage-default-port "sieve"