[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r112548: More cus-test.el tweaks
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r112548: More cus-test.el tweaks |
Date: |
Fri, 10 May 2013 19:29:57 -0700 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 112548
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Fri 2013-05-10 19:29:57 -0700
message:
More cus-test.el tweaks
* admin/cus-test.el (cus-test-libs-noloads): Add a few more files.
(cus-test-load-libs, cus-test-opts):
Add option to load more/all Lisp files.
(cus-test-get-lisp-files): Ignore .*.el files.
modified:
admin/ChangeLog
admin/cus-test.el
=== modified file 'admin/ChangeLog'
--- a/admin/ChangeLog 2013-05-10 07:31:34 +0000
+++ b/admin/ChangeLog 2013-05-11 02:29:57 +0000
@@ -1,3 +1,10 @@
+2013-05-11 Glenn Morris <address@hidden>
+
+ * cus-test.el (cus-test-libs-noloads): Add a few more files.
+ (cus-test-load-libs, cus-test-opts):
+ Add option to load more/all Lisp files.
+ (cus-test-get-lisp-files): Ignore .*.el files.
+
2013-05-10 Glenn Morris <address@hidden>
* cus-test.el (cus-test-libs-noloads): Add some files.
=== modified file 'admin/cus-test.el'
--- a/admin/cus-test.el 2013-05-10 07:31:34 +0000
+++ b/admin/cus-test.el 2013-05-11 02:29:57 +0000
@@ -99,9 +99,14 @@
(defvar cus-test-skip-list nil
"List of variables to disregard by `cus-test-apropos'.")
-;; Loading dunnet in batch mode leads to a Dead end.
-(defvar cus-test-libs-noloads '("play/dunnet.el" "emulation/edt-mapper.el"
- "loadup.el" "mail/blessmail.el")
+(defvar cus-test-libs-noloads
+ ;; Loading dunnet in batch mode leads to a Dead end.
+ ;; blessmail writes a file.
+ ;; characters cannot be loaded twice ("Category `a' is already defined").
+ '("play/dunnet.el" "emulation/edt-mapper.el"
+ "loadup.el" "mail/blessmail.el" "international/characters.el"
+ "cedet/ede/loaddefs.el" "cedet/semantic/loaddefs.el"
+ "net/tramp-loaddefs.el")
"List of files not to load by `cus-test-load-libs'.
Names should be as they appear in loaddefs.el.")
@@ -277,9 +282,11 @@
(run-hooks 'cus-test-after-load-libs-hook)))
;; This is just cus-test-libs, but loading in the current Emacs process.
-(defun cus-test-load-libs ()
+(defun cus-test-load-libs (&optional more)
"Load the libraries with autoloads.
-Don't load libraries in `cus-test-libs-noloads'."
+Don't load libraries in `cus-test-libs-noloads'.
+If optional argument MORE is \"defcustom\", load all files with defcustoms.
+If it is \"all\", load all Lisp files."
(interactive)
(cus-test-load-1
(let ((lispdir (file-name-directory (locate-library "loaddefs"))))
@@ -292,7 +299,9 @@
(error
(push (cons file alpha) cus-test-libs-errors)
(message "Error for %s: %s" file alpha))))
- (cus-test-get-autoload-deps)))))
+ (if more
+ (cus-test-get-lisp-files (equal more "all"))
+ (cus-test-get-autoload-deps))))))
(defun cus-test-get-autoload-deps ()
"Return the list of files with autoloads."
@@ -313,7 +322,7 @@
;; Hack to remove leading "./".
(mapcar (lambda (e) (substring e 2))
(apply 'process-lines find-program
- "-name" "*.el"
+ "-name" "[^.]*.el" ; ignore .dir-locals.el
(unless all
(list "-exec" grep-program
"-l" "^[ \t]*(defcustom" "{}" "+"))))
@@ -326,16 +335,21 @@
;;; The routines for batch mode:
-(defun cus-test-opts ()
+(defun cus-test-opts (&optional all)
"Test custom options.
This function is suitable for batch mode. E.g., invoke
src/emacs -batch -l admin/cus-test.el -f cus-test-opts
-in the Emacs source directory."
+in the Emacs source directory.
+Normally only tests options belonging to files in loaddefs.el.
+If optional argument ALL is non-nil, test all files with defcustoms."
(interactive)
+ (and noninteractive
+ command-line-args-left
+ (setq all (pop command-line-args-left)))
(message "Running %s" 'cus-test-load-libs)
- (cus-test-load-libs)
+ (cus-test-load-libs (if all "defcustom"))
(message "Running %s" 'cus-test-load-custom-loads)
(cus-test-load-custom-loads)
(message "Running %s" 'cus-test-apropos)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r112548: More cus-test.el tweaks,
Glenn Morris <=