]> code.delx.au - gnu-emacs/commitdiff
* admin/admin.el (cusver-scan): Warn about missing :types.
authorGlenn Morris <rgm@gnu.org>
Sat, 28 Dec 2013 08:33:44 +0000 (00:33 -0800)
committerGlenn Morris <rgm@gnu.org>
Sat, 28 Dec 2013 08:33:44 +0000 (00:33 -0800)
(cusver-check): Interactively, require existing directories.

* admin/cus-test.el: Comment.

admin/ChangeLog
admin/admin.el
admin/cus-test.el

index 8c20535e8d2b80d2708d5df5fe1b2dd1bde27a10..16365c9761be5db0c8aae243c4aee5bd48dab5dd 100644 (file)
@@ -1,3 +1,8 @@
+2013-12-28  Glenn Morris  <rgm@gnu.org>
+
+       * admin.el (cusver-scan): Warn about missing :types.
+       (cusver-check): Interactively, require existing directories.
+
 2013-12-27  Xue Fuqiao  <xfq.free@gmail.com>
 
        * admin.el (manual-misc-manuals, make-manuals):
index 5989fb27144d01f1a16de26d187032fb854f3b57..13d1126a8d1f79297df707e703e14e681f87f6e5 100644 (file)
@@ -540,6 +540,12 @@ If optional argument OLD is non-nil, also scan for `defvar's."
                 ;; Exclude macros, eg (defcustom ,varname ...).
                 (symbolp var))
            (progn
+             ;; FIXME It should be cus-test-apropos that does this.
+             (and (not old)
+                  (equal "custom" (match-string 2))
+                  (not (memq :type form))
+                  (display-warning 'custom
+                                   (format "Missing type in: `%s'" form)))
              (setq ver (car (cdr-safe (memq :version form))))
              (if (equal "group" (match-string 2))
                  ;; Group :version could be old.
@@ -601,8 +607,8 @@ a :version bump.
 
 Note that a :version tag should also be added if the value of a defcustom
 changes (in a non-trivial way).  This function does not check for that."
-  (interactive (list (read-directory-name "New Lisp directory: ")
-                    (read-directory-name "Old Lisp directory: ")
+  (interactive (list (read-directory-name "New Lisp directory: " nil nil t)
+                    (read-directory-name "Old Lisp directory: " nil nil t)
                     (number-to-string
                      (read-number "New version number: "
                                   (string-to-number cusver-new-version)))))
index 54d26cc11d64306b3a0e186db24dfe21180339cb..818bbe1bc381850dd93a61d23fd9c151527ae0f4 100644 (file)
@@ -187,6 +187,9 @@ The detected problematic options are stored in `cus-test-errors'."
      (message "Cus Test running...%s %s"
              (length cus-test-tested-variables) symbol)
      (condition-case alpha
+        ;; FIXME This defaults to 'sexp if no type was specified.
+        ;; Always report such instances as a type mismatch.
+        ;; Currently abusing cusver-scan to do that.
         (let* ((type (custom-variable-type symbol))
                (conv (widget-convert type))
                (get (or (get symbol 'custom-get) 'default-value))