]> git.eshelyaron.com Git - emacs.git/commitdiff
Every defcustom should specify its type
authorGlenn Morris <rgm@gnu.org>
Sat, 28 Dec 2013 08:21:33 +0000 (00:21 -0800)
committerGlenn Morris <rgm@gnu.org>
Sat, 28 Dec 2013 08:21:33 +0000 (00:21 -0800)
* apropos.el (apropos-match-face):
* calculator.el (calculator-displayer):
* dabbrev.el (dabbrev-search-these-buffers-only):
* face-remap.el (buffer-face-mode-face):
* simple.el (yank-handled-properties):
* emacs-lisp/testcover.el (testcover-potentially-1value-functions):
* mail/footnote.el (footnote-mode-line-string, footnote-prefix):
* mail/hashcash.el (hashcash-accept-resources, hashcash-program)
(hashcash-double-spend-database):
* progmodes/ruby-mode.el (ruby-deep-indent-paren)
(ruby-deep-indent-paren-style):
* textmodes/flyspell.el (flyspell-auto-correct-binding):
* textmodes/rst.el (rst-toc-indent, rst-toc-insert-style)
(rst-toc-insert-number-separator, rst-toc-insert-max-level):
* vc/pcvs-defs.el (cvs-minor-mode-prefix):
* erc/erc-log.el (erc-log-file-coding-system):
* gnus/gnus-sieve.el (gnus-sieve-select-method):
* gnus/gravatar.el (gravatar-automatic-caching, gravatar-cache-ttl)
(gravatar-rating, gravatar-size):
* gnus/message.el (message-minibuffer-local-map):
* gnus/sieve-manage.el (sieve-manage-authenticators)
(sieve-manage-authenticator-alist):
Specify custom types.

* mail/hashcash.el (hashcash-program): Rename from hashcash-path.
Update callers.

20 files changed:
lisp/ChangeLog
lisp/apropos.el
lisp/calculator.el
lisp/dabbrev.el
lisp/emacs-lisp/testcover.el
lisp/erc/ChangeLog
lisp/erc/erc-log.el
lisp/face-remap.el
lisp/gnus/ChangeLog
lisp/gnus/gnus-sieve.el
lisp/gnus/gravatar.el
lisp/gnus/message.el
lisp/gnus/sieve-manage.el
lisp/mail/footnote.el
lisp/mail/hashcash.el
lisp/progmodes/ruby-mode.el
lisp/simple.el
lisp/textmodes/flyspell.el
lisp/textmodes/rst.el
lisp/vc/pcvs-defs.el

index 37ab0c8b5c136e4a286a3262f603868890987792..9996dae593249a94a119a5bd27aaf0b1e363dae2 100644 (file)
@@ -1,5 +1,25 @@
 2013-12-28  Glenn Morris  <rgm@gnu.org>
 
+       * mail/hashcash.el (hashcash-program): Rename from hashcash-path.
+       Update callers.
+
+       * apropos.el (apropos-match-face):
+       * calculator.el (calculator-displayer):
+       * dabbrev.el (dabbrev-search-these-buffers-only):
+       * face-remap.el (buffer-face-mode-face):
+       * simple.el (yank-handled-properties):
+       * emacs-lisp/testcover.el (testcover-potentially-1value-functions):
+       * mail/footnote.el (footnote-mode-line-string, footnote-prefix):
+       * mail/hashcash.el (hashcash-accept-resources, hashcash-program)
+       (hashcash-double-spend-database):
+       * progmodes/ruby-mode.el (ruby-deep-indent-paren)
+       (ruby-deep-indent-paren-style):
+       * textmodes/flyspell.el (flyspell-auto-correct-binding):
+       * textmodes/rst.el (rst-toc-indent, rst-toc-insert-style)
+       (rst-toc-insert-number-separator, rst-toc-insert-max-level):
+       * vc/pcvs-defs.el (cvs-minor-mode-prefix):
+       Specify custom types.
+
        * emacs-lisp/smie.el (smie-config): Add type, version, initialize.
        * bookmark.el (bookmark-bmenu-use-header-line):
        * doc-view.el (doc-view-scale-internally):
index b7c5aaddcb17c3bbe8d00dd76a8ccf716c86e072..b3921286d3b6f19c64be622b5de9b0e4a7be415a 100644 (file)
@@ -131,6 +131,7 @@ include key-binding information in its output."
   "Face for matching text in Apropos documentation/value, or nil for none.
 This applies when you look for matches in the documentation or variable value
 for the pattern; the part that matches gets displayed in this font."
+  :type '(choice (const nil) face)
   :group 'apropos
   :version "24.3")
 
index c4611c12d87e6b593099d1cae3507b4781a4363e..5eb7535b6326418868161a0524717eb230629657 100644 (file)
@@ -139,6 +139,7 @@ of digits displayed).
 An exception to the above is the case of the list (std C) where C is a
 character, in this case the `calculator-standard-displayer' function
 will be used with this character for a format string."
+  :type '(choice (function) (string) (list (const std) character) (sexp))
   :group 'calculator)
 
 (defcustom calculator-displayers
index e2aeb4ea19bff10e5843faf9bbd0a299a631242c..42074cda579bd16c52447098020f21b0c7667715 100644 (file)
@@ -285,6 +285,7 @@ A mode setting this variable should make it buffer local."
 If this variable is non-nil, dabbrev will only look in these buffers.
 It will not even look in the current buffer if it is not a member of
 this list."
+  :type '(choice (const nil) (repeat :tag "List of buffers" string))
   :group 'dabbrev)
 
 ;;----------------------------------------------------------------
index a5619583145b5613c45132d3a814cf7c7f4911a1..2ea97dee84055920e7be6c6a7491b29c678b9744 100644 (file)
@@ -146,7 +146,8 @@ call to one of the `testcover-1value-functions'."
   '(add-hook and beep or remove-hook unless when)
   "Functions that are potentially 1-valued.  No brown splotch if actually
 1-valued, no error if actually multi-valued."
-  :group 'testcover)
+  :group 'testcover
+  :type '(repeat symbol))
 
 (defface testcover-nohits
   '((t (:background "DeepPink2")))
index 9847ee49daf8f9fb9a38b954526af2533807dfd3..46c93ccebd67bd549a605618d3ab868790394de0 100644 (file)
@@ -1,5 +1,7 @@
 2013-12-28  Glenn Morris  <rgm@gnu.org>
 
+       * erc-log.el (erc-log-file-coding-system): Specify custom type.
+
        * erc-button.el (erc-button-alist): Fix custom type.
 
 2013-11-25  Glenn Morris  <rgm@gnu.org>
index c6ff8fa5bfe960ed9e9be613193e869d2b1948c4..368027579c42fd3134860890b9b819e5a227680a 100644 (file)
@@ -202,6 +202,7 @@ If you set this to nil, you may want to enable both
 
 This should ideally, be a \"catch-all\" coding system, like
 `emacs-mule', or `iso-2022-7bit'."
+  :type 'coding-system
   :group 'erc-log)
 
 (defcustom erc-log-filter-function nil
index fb1d974e33e7ccb2b0970c488cebb78442a88a20..3d931802c61c4cd9502a6a77499bf49511adb7af 100644 (file)
@@ -343,6 +343,9 @@ a top-level keymap, `text-scale-increase' or
 It may contain any value suitable for a `face' text property,
 including a face name, a list of face names, a face-attribute
 plist, etc."
+  :type '(choice (face)
+                (repeat :tag "List of faces" face)
+                (plist :tag "Face property list"))
   :group 'display
   :version "23.1")
 
index bb944c14351c6294364fb0c4da39ca953474169a..b740cbb6330155804f93eaa2af195ff059e80307 100644 (file)
@@ -1,5 +1,12 @@
 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.
+
        * 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 ee3cdf48e45627a84a5fb49ff96156e57ee25505..80ad6ab4123494be6e38d09e4267b7887b722df0 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 985ed2c7b0d733b48acdce11c0f38457701bd535..fa7e8fa7ce8a058a0dfc11300cccf17344da5b39 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 11a51a79fce80aef2d3e9192ee22ce566dba6ed3..063eb891173de34b225babc81b92c7731e88173f 100644 (file)
@@ -944,6 +944,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 4221276e2ec0cef98961f36782cbf16ce3720350..2784398b6316e7971a259f24a1c42632ec10d5f2 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"
index 7ded4c31cf58afb6b83116264cfe8e184b70e7e6..5dfc188d35c80145eb8b07f613d3d78e774ba0d1 100644 (file)
@@ -45,6 +45,7 @@
 
 (defcustom footnote-mode-line-string " FN"
   "String to display in modes section of the mode-line."
+  :type 'string
   :group 'footnote)
 
 (defcustom footnote-mode-hook nil
@@ -86,10 +87,8 @@ displaying footnotes."
   "Prefix key to use for Footnote command in Footnote minor mode.
 The value of this variable is checked as part of loading Footnote mode.
 After that, changing the prefix key requires manipulating keymaps."
-  ;; FIXME: the type should be a key-sequence, but it seems Custom
-  ;; doesn't support that yet.
-  ;; :type  'string
-  )
+  :type 'key-sequence
+  :group 'footnote)
 
 ;;; Interface variables that probably shouldn't be changed
 
index b6df075f7ef110b46ed9d287d97cbb99ac30e42c..07a428a20af241908fb2d14cacf99bd35294f16d 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 51117e59f78c02e4fb8b7e12d09b73932bc52d7a..12e01cb24037b3ba9011e4fb6a748bac822d1e4a 100644 (file)
@@ -273,17 +273,26 @@ Only has effect when `ruby-use-smie' is nil."
   :group 'ruby
   :safe 'booleanp)
 
+;; FIXME Woefully under documented.  What is the point of the last `t'?.
 (defcustom ruby-deep-indent-paren '(?\( ?\[ ?\] t)
   "Deep indent lists in parenthesis when non-nil.
 The value t means continuous line.
 Also ignores spaces after parenthesis when `space'.
 Only has effect when `ruby-use-smie' is nil."
+  :type '(choice (const nil)
+                 character
+                 (repeat (choice character
+                                 (cons character (choice (const nil)
+                                                         (const t)))
+                                 (const t) ; why?
+                                 )))
   :group 'ruby)
 
 (defcustom ruby-deep-indent-paren-style 'space
   "Default deep indent style.
 Only has effect when `ruby-use-smie' is nil."
-  :options '(t nil space) :group 'ruby)
+  :type '(choice (const t) (const nil) (const space))
+  :group 'ruby)
 
 (defcustom ruby-encoding-map
   '((us-ascii       . nil)       ;; Do not put coding: us-ascii
index 624d87fd65591c11d26ffd92f599aa2bab50af98..2b683d2e93b2627b474696c6e8365ac4524a6978 100644 (file)
@@ -3812,6 +3812,8 @@ end positions of the text.
 This is done prior to removing the properties specified by
 `yank-excluded-properties'."
   :group 'killing
+  :type '(repeat (cons (symbol :tag "property symbol")
+                       function))
   :version "24.3")
 
 ;; This is actually used in subr.el but defcustom does not work there.
index 81f17c897ebea689fd61a29b2e7ef7046860a1bd..63a0e841411c885c1be868f083f96972f1c49fd3 100644 (file)
@@ -283,6 +283,7 @@ If this variable is nil, all regions are treated as small."
 (defcustom flyspell-auto-correct-binding
   [(control ?\;)]
   "The key binding for flyspell auto correction."
+  :type 'key-sequence
   :group 'flyspell)
 
 ;;*---------------------------------------------------------------------*/
index a841ec39314120c7288453035eb46f562062e182..47c15735f219bfd982d590eff8b21970a2b7ab51 100644 (file)
@@ -2296,6 +2296,7 @@ any."
 (defcustom rst-toc-indent 2
   "Indentation for table-of-contents display.
 Also used for formatting insertion, when numbering is disabled."
+  :type 'integer
   :group 'rst-toc)
 (rst-testcover-defcustom)
 
@@ -2307,11 +2308,16 @@ indentation style:
 - fixed: numbering, but fixed indentation
 - aligned: numbering, titles aligned under each other
 - listed: numbering, with dashes like list items (EXPERIMENTAL)"
+  :type '(choice (const plain)
+                 (const fixed)
+                 (const aligned)
+                 (const listed))
   :group 'rst-toc)
 (rst-testcover-defcustom)
 
 (defcustom rst-toc-insert-number-separator "  "
   "Separator that goes between the TOC number and the title."
+  :type 'string
   :group 'rst-toc)
 (rst-testcover-defcustom)
 
@@ -2324,6 +2330,7 @@ indentation style:
 
 (defcustom rst-toc-insert-max-level nil
   "If non-nil, maximum depth of the inserted TOC."
+  :type '(choice (const nil) integer)
   :group 'rst-toc)
 (rst-testcover-defcustom)
 
index 182a030be25bee78d4686a754d169ea1444cbf90..1a29ec81147e09c237d062f75b16ffb7d38b8a0d 100644 (file)
@@ -424,6 +424,7 @@ This variable is buffer local and only used in the *cvs* buffer.")
 
 (defcustom cvs-minor-mode-prefix "\C-xc"
   "Prefix key for the `cvs-mode' bindings in `cvs-minor-mode'."
+  :type 'string
   :group 'pcl-cvs)
 
 (easy-mmode-defmap cvs-minor-mode-map