1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00

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.
This commit is contained in:
Glenn Morris 2013-12-28 00:21:33 -08:00
parent 7e99158aac
commit 9c5a5c7700
20 changed files with 96 additions and 22 deletions

View 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):

View 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")

View 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

View 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)
;;----------------------------------------------------------------

View 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")))

View 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>

View 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

View 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")

View 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.

View File

@ -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

View File

@ -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

View 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)

View File

@ -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"

View 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

View 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

View 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

View 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.

View 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)
;;*---------------------------------------------------------------------*/

View 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)

View 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