emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r115793: * admin/admin.el (cusver-scan): Warn about


From: Glenn Morris
Subject: [Emacs-diffs] trunk r115793: * admin/admin.el (cusver-scan): Warn about missing :types.
Date: Sat, 28 Dec 2013 08:33:48 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115793
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2013-12-28 00:33:44 -0800
message:
  * admin/admin.el (cusver-scan): Warn about missing :types.
  (cusver-check): Interactively, require existing directories.
  
  * admin/cus-test.el: Comment.
modified:
  admin/ChangeLog                changelog-20091113204419-o5vbwnq5f7feedwu-2226
  admin/admin.el                 admin.el-20091113204419-o5vbwnq5f7feedwu-2254
  admin/cus-test.el              custest.el-20091113204419-o5vbwnq5f7feedwu-2466
=== modified file 'admin/ChangeLog'
--- a/admin/ChangeLog   2013-12-27 10:21:47 +0000
+++ b/admin/ChangeLog   2013-12-28 08:33:44 +0000
@@ -1,3 +1,8 @@
+2013-12-28  Glenn Morris  <address@hidden>
+
+       * admin.el (cusver-scan): Warn about missing :types.
+       (cusver-check): Interactively, require existing directories.
+
 2013-12-27  Xue Fuqiao  <address@hidden>
 
        * admin.el (manual-misc-manuals, make-manuals):

=== modified file 'admin/admin.el'
--- a/admin/admin.el    2013-12-27 10:21:47 +0000
+++ b/admin/admin.el    2013-12-28 08:33:44 +0000
@@ -540,6 +540,12 @@
                 ;; 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 @@
 
 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)))))

=== modified file 'admin/cus-test.el'
--- a/admin/cus-test.el 2013-08-13 07:42:51 +0000
+++ b/admin/cus-test.el 2013-12-28 08:33:44 +0000
@@ -187,6 +187,9 @@
      (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))


reply via email to

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