emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r115791: Every defcustom should specify its type


From: Glenn Morris
Subject: [Emacs-diffs] trunk r115791: Every defcustom should specify its type
Date: Sat, 28 Dec 2013 08:21:51 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115791
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2013-12-28 00:21:33 -0800
message:
  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.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/apropos.el                apropos.el-20091113204419-o5vbwnq5f7feedwu-273
  lisp/calculator.el             
calculator.el-20091113204419-o5vbwnq5f7feedwu-1770
  lisp/dabbrev.el                dabbrev.el-20091113204419-o5vbwnq5f7feedwu-234
  lisp/emacs-lisp/testcover.el   
testcover.el-20091113204419-o5vbwnq5f7feedwu-2445
  lisp/erc/ChangeLog             changelog-20091113204419-o5vbwnq5f7feedwu-4305
  lisp/erc/erc-log.el            erclog.el-20091113204419-o5vbwnq5f7feedwu-4326
  lisp/face-remap.el             
faceremap.el-20091113204419-o5vbwnq5f7feedwu-8674
  lisp/gnus/ChangeLog            changelog-20091113204419-o5vbwnq5f7feedwu-1433
  lisp/gnus/gnus-sieve.el        
gnussieve.el-20091113204419-o5vbwnq5f7feedwu-3248
  lisp/gnus/gravatar.el          gravatar.el-20100924223300-9o5d8dejx649jxij-2
  lisp/gnus/message.el           message.el-20091113204419-o5vbwnq5f7feedwu-1145
  lisp/gnus/sieve-manage.el      
sievemanage.el-20091113204419-o5vbwnq5f7feedwu-3281
  lisp/mail/footnote.el          
footnote.el-20091113204419-o5vbwnq5f7feedwu-1727
  lisp/mail/hashcash.el          
hashcash.el-20091113204419-o5vbwnq5f7feedwu-7650
  lisp/progmodes/ruby-mode.el    
rubymode.el-20091113204419-o5vbwnq5f7feedwu-8804
  lisp/simple.el                 simple.el-20091113204419-o5vbwnq5f7feedwu-403
  lisp/textmodes/flyspell.el     
flyspell.el-20091113204419-o5vbwnq5f7feedwu-1284
  lisp/textmodes/rst.el          rst.el-20091113204419-o5vbwnq5f7feedwu-8690
  lisp/vc/pcvs-defs.el           
pcvsdefs.el-20091113204419-o5vbwnq5f7feedwu-1778
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-12-28 02:16:05 +0000
+++ b/lisp/ChangeLog    2013-12-28 08:21:33 +0000
@@ -1,5 +1,25 @@
 2013-12-28  Glenn Morris  <address@hidden>
 
+       * 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):

=== modified file 'lisp/apropos.el'
--- a/lisp/apropos.el   2013-12-18 04:46:49 +0000
+++ b/lisp/apropos.el   2013-12-28 08:21:33 +0000
@@ -131,6 +131,7 @@
   "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")
 

=== modified file 'lisp/calculator.el'
--- a/lisp/calculator.el        2013-09-03 19:44:02 +0000
+++ b/lisp/calculator.el        2013-12-28 08:21:33 +0000
@@ -139,6 +139,7 @@
 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

=== modified file 'lisp/dabbrev.el'
--- a/lisp/dabbrev.el   2013-08-05 14:26:57 +0000
+++ b/lisp/dabbrev.el   2013-12-28 08:21:33 +0000
@@ -285,6 +285,7 @@
 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)
 
 ;;----------------------------------------------------------------

=== modified file 'lisp/emacs-lisp/testcover.el'
--- a/lisp/emacs-lisp/testcover.el      2013-05-11 02:21:29 +0000
+++ b/lisp/emacs-lisp/testcover.el      2013-12-28 08:21:33 +0000
@@ -146,7 +146,8 @@
   '(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")))

=== modified file 'lisp/erc/ChangeLog'
--- a/lisp/erc/ChangeLog        2013-12-28 01:24:15 +0000
+++ b/lisp/erc/ChangeLog        2013-12-28 08:21:33 +0000
@@ -1,5 +1,7 @@
 2013-12-28  Glenn Morris  <address@hidden>
 
+       * 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  <address@hidden>

=== modified file 'lisp/erc/erc-log.el'
--- a/lisp/erc/erc-log.el       2013-05-21 07:25:14 +0000
+++ b/lisp/erc/erc-log.el       2013-12-28 08:21:33 +0000
@@ -202,6 +202,7 @@
 
 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

=== modified file 'lisp/face-remap.el'
--- a/lisp/face-remap.el        2013-12-23 03:59:10 +0000
+++ b/lisp/face-remap.el        2013-12-28 08:21:33 +0000
@@ -343,6 +343,9 @@
 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")
 

=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2013-12-28 02:16:05 +0000
+++ b/lisp/gnus/ChangeLog       2013-12-28 08:21:33 +0000
@@ -1,5 +1,12 @@
 2013-12-28  Glenn Morris  <address@hidden>
 
+       * 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.

=== modified file 'lisp/gnus/gnus-sieve.el'
--- a/lisp/gnus/gnus-sieve.el   2013-01-01 09:11:05 +0000
+++ b/lisp/gnus/gnus-sieve.el   2013-12-28 08:21:33 +0000
@@ -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

=== modified file 'lisp/gnus/gravatar.el'
--- a/lisp/gnus/gravatar.el     2013-05-29 02:40:43 +0000
+++ b/lisp/gnus/gravatar.el     2013-12-28 08:21:33 +0000
@@ -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

=== modified file 'lisp/gnus/message.el'
--- a/lisp/gnus/message.el      2013-12-03 01:06:12 +0000
+++ b/lisp/gnus/message.el      2013-12-28 08:21:33 +0000
@@ -944,6 +944,8 @@
     (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)
 

=== modified file 'lisp/gnus/sieve-manage.el'
--- a/lisp/gnus/sieve-manage.el 2013-06-18 07:13:18 +0000
+++ b/lisp/gnus/sieve-manage.el 2013-12-28 08:21:33 +0000
@@ -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"

=== modified file 'lisp/mail/footnote.el'
--- a/lisp/mail/footnote.el     2013-01-01 09:11:05 +0000
+++ b/lisp/mail/footnote.el     2013-12-28 08:21:33 +0000
@@ -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 @@
   "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
 

=== modified file 'lisp/mail/hashcash.el'
--- a/lisp/mail/hashcash.el     2013-01-01 09:11:05 +0000
+++ b/lisp/mail/hashcash.el     2013-12-28 08:21:33 +0000
@@ -89,20 +89,25 @@
 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 @@
 (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 @@
   "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 @@
 
 (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

=== modified file 'lisp/progmodes/ruby-mode.el'
--- a/lisp/progmodes/ruby-mode.el       2013-12-22 20:38:26 +0000
+++ b/lisp/progmodes/ruby-mode.el       2013-12-28 08:21:33 +0000
@@ -273,17 +273,26 @@
   :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

=== modified file 'lisp/simple.el'
--- a/lisp/simple.el    2013-12-26 22:02:49 +0000
+++ b/lisp/simple.el    2013-12-28 08:21:33 +0000
@@ -3812,6 +3812,8 @@
 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.

=== modified file 'lisp/textmodes/flyspell.el'
--- a/lisp/textmodes/flyspell.el        2013-04-17 18:03:46 +0000
+++ b/lisp/textmodes/flyspell.el        2013-12-28 08:21:33 +0000
@@ -283,6 +283,7 @@
 (defcustom flyspell-auto-correct-binding
   [(control ?\;)]
   "The key binding for flyspell auto correction."
+  :type 'key-sequence
   :group 'flyspell)
 
 ;;*---------------------------------------------------------------------*/

=== modified file 'lisp/textmodes/rst.el'
--- a/lisp/textmodes/rst.el     2013-06-20 14:15:42 +0000
+++ b/lisp/textmodes/rst.el     2013-12-28 08:21:33 +0000
@@ -2296,6 +2296,7 @@
 (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 @@
 - 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 @@
 
 (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)
 

=== modified file 'lisp/vc/pcvs-defs.el'
--- a/lisp/vc/pcvs-defs.el      2013-10-08 03:47:24 +0000
+++ b/lisp/vc/pcvs-defs.el      2013-12-28 08:21:33 +0000
@@ -424,6 +424,7 @@
 
 (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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]