summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2013-12-28 00:21:33 -0800
committerGlenn Morris <rgm@gnu.org>2013-12-28 00:21:33 -0800
commit9c5a5c77000b452bdf3ee98e366d5ee6df54b5a4 (patch)
treeef44cc96cd987b6c079fd1533ab9d9b896980758
parent7e99158aac0347f62647618200fc5d90681cd2e9 (diff)
downloademacs-9c5a5c77000b452bdf3ee98e366d5ee6df54b5a4.tar.gz
Every defcustom should specify its type
* 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.
-rw-r--r--lisp/ChangeLog20
-rw-r--r--lisp/apropos.el1
-rw-r--r--lisp/calculator.el1
-rw-r--r--lisp/dabbrev.el1
-rw-r--r--lisp/emacs-lisp/testcover.el3
-rw-r--r--lisp/erc/ChangeLog2
-rw-r--r--lisp/erc/erc-log.el1
-rw-r--r--lisp/face-remap.el3
-rw-r--r--lisp/gnus/ChangeLog7
-rw-r--r--lisp/gnus/gnus-sieve.el9
-rw-r--r--lisp/gnus/gravatar.el8
-rw-r--r--lisp/gnus/message.el2
-rw-r--r--lisp/gnus/sieve-manage.el6
-rw-r--r--lisp/mail/footnote.el7
-rw-r--r--lisp/mail/hashcash.el25
-rw-r--r--lisp/progmodes/ruby-mode.el11
-rw-r--r--lisp/simple.el2
-rw-r--r--lisp/textmodes/flyspell.el1
-rw-r--r--lisp/textmodes/rst.el7
-rw-r--r--lisp/vc/pcvs-defs.el1
20 files changed, 96 insertions, 22 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 37ab0c8b5c1..9996dae5932 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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):
diff --git a/lisp/apropos.el b/lisp/apropos.el
index b7c5aaddcb1..b3921286d3b 100644
--- a/lisp/apropos.el
+++ b/lisp/apropos.el
@@ -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")
diff --git a/lisp/calculator.el b/lisp/calculator.el
index c4611c12d87..5eb7535b632 100644
--- a/lisp/calculator.el
+++ b/lisp/calculator.el
@@ -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
diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el
index e2aeb4ea19b..42074cda579 100644
--- a/lisp/dabbrev.el
+++ b/lisp/dabbrev.el
@@ -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)
;;----------------------------------------------------------------
diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el
index a5619583145..2ea97dee840 100644
--- a/lisp/emacs-lisp/testcover.el
+++ b/lisp/emacs-lisp/testcover.el
@@ -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")))
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index 9847ee49daf..46c93ccebd6 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -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>
diff --git a/lisp/erc/erc-log.el b/lisp/erc/erc-log.el
index c6ff8fa5bfe..368027579c4 100644
--- a/lisp/erc/erc-log.el
+++ b/lisp/erc/erc-log.el
@@ -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
diff --git a/lisp/face-remap.el b/lisp/face-remap.el
index fb1d974e33e..3d931802c61 100644
--- a/lisp/face-remap.el
+++ b/lisp/face-remap.el
@@ -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")
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index bb944c14351..b740cbb6330 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -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.
diff --git a/lisp/gnus/gnus-sieve.el b/lisp/gnus/gnus-sieve.el
index ee3cdf48e45..80ad6ab4123 100644
--- a/lisp/gnus/gnus-sieve.el
+++ b/lisp/gnus/gnus-sieve.el
@@ -46,21 +46,20 @@
: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
diff --git a/lisp/gnus/gravatar.el b/lisp/gnus/gravatar.el
index 985ed2c7b0d..fa7e8fa7ce8 100644
--- a/lisp/gnus/gravatar.el
+++ b/lisp/gnus/gravatar.el
@@ -33,19 +33,25 @@
: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
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 11a51a79fce..063eb891173 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -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)
diff --git a/lisp/gnus/sieve-manage.el b/lisp/gnus/sieve-manage.el
index 4221276e2ec..2784398b631 100644
--- a/lisp/gnus/sieve-manage.el
+++ b/lisp/gnus/sieve-manage.el
@@ -115,6 +115,10 @@
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
@@ -131,6 +135,8 @@
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"
diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el
index 7ded4c31cf5..5dfc188d35c 100644
--- a/lisp/mail/footnote.el
+++ b/lisp/mail/footnote.el
@@ -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
diff --git a/lisp/mail/hashcash.el b/lisp/mail/hashcash.el
index b6df075f7ef..07a428a20af 100644
--- a/lisp/mail/hashcash.el
+++ b/lisp/mail/hashcash.el
@@ -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
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 51117e59f78..12e01cb2403 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -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
diff --git a/lisp/simple.el b/lisp/simple.el
index 624d87fd655..2b683d2e93b 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -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.
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 81f17c897eb..63a0e841411 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -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)
;;*---------------------------------------------------------------------*/
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index a841ec39314..47c15735f21 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -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)
diff --git a/lisp/vc/pcvs-defs.el b/lisp/vc/pcvs-defs.el
index 182a030be25..1a29ec81147 100644
--- a/lisp/vc/pcvs-defs.el
+++ b/lisp/vc/pcvs-defs.el
@@ -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