Mercurial > emacs
annotate admin/cus-test.el @ 47871:f0d9067a78fd
*** empty log message ***
author | Markus Rost <rost@math.uni-bielefeld.de> |
---|---|
date | Mon, 14 Oct 2002 01:38:07 +0000 |
parents | 6ca67dbf4236 |
children | b475e8cf9b0a |
rev | line source |
---|---|
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
1 ;;; cus-test.el --- tests for custom types and load problems |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
2 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
3 ;; Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
4 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
5 ;; Author: Markus Rost <markus.rost@mathematik.uni-regensburg.de> |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
6 ;; Maintainer: Markus Rost <rost@math.ohio-state.edu> |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
7 ;; Created: 13 Sep 1998 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
8 ;; Keywords: maint |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
9 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
10 ;; This file is part of GNU Emacs. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
11 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
12 ;; GNU Emacs is free software; you can redistribute it and/or modify |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
13 ;; it under the terms of the GNU General Public License as published by |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
14 ;; the Free Software Foundation; either version 2, or (at your option) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
15 ;; any later version. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
16 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
17 ;; GNU Emacs is distributed in the hope that it will be useful, |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
20 ;; GNU General Public License for more details. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
21 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
22 ;; You should have received a copy of the GNU General Public License |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
25 ;; Boston, MA 02111-1307, USA. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
26 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
27 ;;; Commentary: |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
28 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
29 ;; This file provides simple tests to detect custom options with |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
30 ;; incorrect customization types and load problems for custom and |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
31 ;; autoload dependencies. |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
32 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
33 ;; The basic tests can be run in batch mode. Invoke them with |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
34 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
35 ;; src/emacs -batch -l admin/cus-test.el -f cus-test-opts |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
36 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
37 ;; src/emacs -batch -l admin/cus-test.el -f cus-test-deps |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
38 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
39 ;; src/emacs -batch -l admin/cus-test.el -f cus-test-libs |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
40 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
41 ;; in the emacs source directory. |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
42 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
43 ;; For interactive use: Load this file. Then |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
44 ;; |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
45 ;; M-x cus-test-apropos REGEXP RET |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
46 ;; |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
47 ;; checks the options matching REGEXP. In particular |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
48 ;; |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
49 ;; M-x cus-test-apropos RET |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
50 ;; |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
51 ;; checks all options. The detected options are stored in the |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
52 ;; variable `cus-test-errors'. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
53 ;; |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
54 ;; Only those options are checked which have been already loaded. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
55 ;; Therefore `cus-test-apropos' is more efficient after loading many |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
56 ;; libraries. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
57 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
58 ;; M-x cus-test-load-custom-loads |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
59 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
60 ;; loads all (!) custom dependencies and |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
61 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
62 ;; M-x cus-test-load-libs |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
63 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
64 ;; loads all (!) libraries with autoloads. |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
65 ;; |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
66 ;; Options with a custom-get property, usually defined by a :get |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
67 ;; declaration, are stored in the variable |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
68 ;; |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
69 ;; `cus-test-vars-with-custom-get' |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
70 ;; |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
71 ;; Options with a state of 'changed ("changed outside the customize |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
72 ;; buffer") are stored in the variable |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
73 ;; |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
74 ;; `cus-test-vars-with-changed-state' |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
75 ;; |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
76 ;; These lists are prepared just in case one wants to investigate |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
77 ;; those options further. |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
78 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
79 ;; The command `cus-test-opts' tests many (all?) custom options. |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
80 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
81 ;; The command `cus-test-deps' is like `cus-test-load-custom-loads' |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
82 ;; but reports about load errors. |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
83 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
84 ;; The command `cus-test-libs' runs for all libraries with autoloads |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
85 ;; separate emacs processes of the form "emacs -batch -l LIB". |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
86 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
87 ;; Some results from October 2002: |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
88 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
89 ;; 4523 options tested |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
90 ;; The following variables might have problems: |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
91 ;; ps-mule-font-info-database-default |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
92 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
93 ;; 288 features required |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
94 ;; 10 files loaded |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
95 ;; The following load problems appeared: |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
96 ;; Symbol faces has loaddefs as custom dependency |
47858
6ca67dbf4236
(cus-test-deps): Don't care about deps in lisp/term/.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47855
diff
changeset
|
97 ;; (reftex-index-support reftex-vars (void-function reftex-set-dirty)) |
6ca67dbf4236
(cus-test-deps): Don't care about deps in lisp/term/.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47855
diff
changeset
|
98 ;; (eshell-script em-script (void-variable eshell-directory-name)) |
6ca67dbf4236
(cus-test-deps): Don't care about deps in lisp/term/.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47855
diff
changeset
|
99 ;; (pcomplete em-cmpl (void-function eshell-under-windows-p)) |
6ca67dbf4236
(cus-test-deps): Don't care about deps in lisp/term/.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47855
diff
changeset
|
100 ;; (eshell-ext esh-ext (void-function eshell-under-windows-p)) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
101 ;; ... |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
102 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
103 ;; 422 libraries had no load errors |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
104 ;; The following load problems appeared: |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
105 ;; (eudc-export error 255) |
47858
6ca67dbf4236
(cus-test-deps): Don't care about deps in lisp/term/.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47855
diff
changeset
|
106 ;; (ada-xref error 255) |
6ca67dbf4236
(cus-test-deps): Don't care about deps in lisp/term/.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47855
diff
changeset
|
107 ;; (ada-stmt error 255) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
108 |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
109 ;;; Code: |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
110 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
111 ;;; Workarounds. For a smooth run and to avoid some side effects. |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
112 |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
113 (defvar cus-test-after-load-libs-hook nil |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
114 "Used to switch off undesired side effects of loading libraries.") |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
115 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
116 (defvar cus-test-skip-list nil |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
117 "List of variables to disregard by `cus-test-apropos'.") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
118 |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
119 (defvar cus-test-noloads nil |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
120 "List of libraries not to load by `cus-test-load-libs'.") |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
121 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
122 ;; The file eudc-export.el loads libraries "bbdb" and "bbdb-com" which |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
123 ;; are not part of GNU Emacs: (locate-library "bbdb") => nil |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
124 ;; We avoid the resulting errors from loading eudc-export.el: |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
125 (provide 'bbdb) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
126 (provide 'bbdb-com) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
127 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
128 ;; This avoids a hang of `cus-test-apropos' in 21.2. |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
129 ;; (add-to-list 'cus-test-skip-list 'sh-alias-alist) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
130 |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
131 ;; Don't create a file `filesets-menu-cache-file'. |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
132 (setq filesets-menu-cache-file "") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
133 ;; Disable filesets hooks. |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
134 (add-hook |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
135 'cus-test-after-load-libs-hook |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
136 (lambda nil |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
137 (remove-hook 'menu-bar-update-hook 'filesets-build-menu-maybe) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
138 (remove-hook 'kill-emacs-hook 'filesets-exit) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
139 (remove-hook 'kill-buffer-hook 'filesets-remove-from-ubl) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
140 (remove-hook 'first-change-hook 'filesets-reset-filename-on-change) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
141 )) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
142 |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
143 ;; Loading dunnet in batch mode leads to a Dead end. |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
144 (let (noninteractive) (load "dunnet")) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
145 (add-to-list 'cus-test-noloads "dunnet") |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
146 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
147 ;; Never Viperize. |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
148 (setq viper-mode nil) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
149 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
150 ;; Don't create a file `save-place-file'. |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
151 (eval-after-load "saveplace" |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
152 '(remove-hook 'kill-emacs-hook 'save-place-kill-emacs-hook)) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
153 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
154 ;; Don't create a file `abbrev-file-name'. |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
155 (setq save-abbrevs nil) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
156 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
157 ;; Avoid compile logs from adviced functions. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
158 (eval-after-load "bytecomp" |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
159 '(setq ad-default-compilation-action 'never)) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
160 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
161 |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
162 ;;; Main code: |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
163 |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
164 ;; We want to log all messages. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
165 (setq message-log-max t) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
166 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
167 (require 'cus-edit) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
168 (require 'cus-load) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
169 |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
170 (defvar cus-test-errors nil |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
171 "List of problematic variables found by `cus-test-apropos'.") |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
172 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
173 (defvar cus-test-tested-variables nil |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
174 "List of options tested by last call of `cus-test-apropos'.") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
175 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
176 (defvar cus-test-deps-errors nil |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
177 "List of require/load problems found by `cus-test-deps'.") |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
178 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
179 (defvar cus-test-deps-required nil |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
180 "List of dependencies required by `cus-test-deps'. |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
181 Only unloaded features will be require'd.") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
182 |
47835
779560bedfb7
Supplementary streamlining.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47833
diff
changeset
|
183 (defvar cus-test-deps-loaded nil |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
184 "List of dependencies loaded by `cus-test-deps'.") |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
185 |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
186 (defvar cus-test-libs-errors nil |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
187 "List of load problems found by `cus-test-load-libs' or `cus-test-libs'.") |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
188 |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
189 (defvar cus-test-libs-loaded nil |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
190 "List of files loaded by `cus-test-load-libs' or `cus-test-libs'.") |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
191 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
192 ;; I haven't understood this :get stuff. The symbols with a |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
193 ;; custom-get property are stored here. |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
194 (defvar cus-test-vars-with-custom-get nil |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
195 "Set by `cus-test-apropos' to a list of options with :get property.") |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
196 |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
197 (defvar cus-test-vars-with-changed-state nil |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
198 "Set by `cus-test-apropos' to a list of options with state 'changed.") |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
199 |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
200 (defun cus-test-apropos (regexp) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
201 "Check the options matching REGEXP. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
202 The detected problematic options are stored in `cus-test-errors'." |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
203 (interactive "sVariable regexp: ") |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
204 (setq cus-test-errors nil) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
205 (setq cus-test-tested-variables nil) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
206 (mapc |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
207 (lambda (symbol) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
208 (push symbol cus-test-tested-variables) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
209 ;; Be verbose in case we hang. |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
210 (message "Cus Test running...%s %s" |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
211 (length cus-test-tested-variables) symbol) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
212 (condition-case alpha |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
213 (let* ((type (custom-variable-type symbol)) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
214 (conv (widget-convert type)) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
215 (get (or (get symbol 'custom-get) 'default-value)) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
216 values |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
217 mismatch) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
218 (when (default-boundp symbol) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
219 (push (funcall get symbol) values) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
220 (push (eval (car (get symbol 'standard-value))) values)) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
221 (if (boundp symbol) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
222 (push (symbol-value symbol) values)) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
223 ;; That does not work. |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
224 ;; (push (widget-get conv :value) values) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
225 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
226 ;; Check the values |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
227 (mapc (lambda (value) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
228 (unless (widget-apply conv :match value) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
229 (setq mismatch 'mismatch))) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
230 values) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
231 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
232 ;; Store symbols with a custom-get property. |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
233 (when (get symbol 'custom-get) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
234 (add-to-list 'cus-test-vars-with-custom-get |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
235 symbol 'append)) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
236 |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
237 ;; Changed outside the customize buffer? |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
238 ;; This routine is not very much tested. |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
239 (let ((c-value |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
240 (or (get symbol 'customized-value) |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
241 (get symbol 'saved-value) |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
242 (get symbol 'standard-value)))) |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
243 (and (consp c-value) |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
244 (boundp symbol) |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
245 (not (equal (eval (car c-value)) (symbol-value symbol))) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
246 (add-to-list 'cus-test-vars-with-changed-state |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
247 symbol 'append))) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
248 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
249 (if mismatch |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
250 (push symbol cus-test-errors))) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
251 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
252 (error |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
253 (push symbol cus-test-errors) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
254 (message "Error for %s: %s" symbol alpha)))) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
255 (cus-test-get-options regexp)) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
256 (message "%s options tested" |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
257 (length cus-test-tested-variables)) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
258 (cus-test-errors-display)) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
259 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
260 (defun cus-test-get-options (regexp) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
261 "Return a list of custom options matching REGEXP." |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
262 (let (found) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
263 (mapatoms |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
264 (lambda (symbol) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
265 (and |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
266 (or |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
267 ;; (user-variable-p symbol) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
268 (get symbol 'standard-value) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
269 ;; (get symbol 'saved-value) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
270 (get symbol 'custom-type)) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
271 (string-match regexp (symbol-name symbol)) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
272 (not (member symbol cus-test-skip-list)) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
273 (push symbol found)))) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
274 found)) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
275 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
276 (defun cus-test-errors-display () |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
277 "Report about the errors found by cus-test." |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
278 (with-output-to-temp-buffer "*cus-test-errors*" |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
279 (set-buffer standard-output) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
280 (insert (format "Cus Test tested %s variables.\ |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
281 See `cus-test-tested-variables'.\n\n" |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
282 (length cus-test-tested-variables))) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
283 (if (not cus-test-errors) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
284 (insert "No errors found by cus-test.") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
285 (insert "The following variables seem to have problems:\n\n") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
286 (dolist (E cus-test-errors) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
287 (insert (symbol-name E) "\n"))))) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
288 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
289 (defun cus-test-load-custom-loads () |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
290 "Call `custom-load-symbol' on all atoms." |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
291 (interactive) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
292 (mapatoms 'custom-load-symbol) |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
293 (run-hooks 'cus-test-after-load-libs-hook)) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
294 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
295 (defun cus-test-load-libs () |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
296 "Load the libraries with autoloads. |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
297 Don't load libraries in `cus-test-noloads'." |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
298 (interactive) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
299 (setq cus-test-libs-errors nil) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
300 (setq cus-test-libs-loaded nil) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
301 (mapc |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
302 (lambda (file) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
303 (condition-case alpha |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
304 (unless (member file cus-test-noloads) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
305 (load file) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
306 (push file cus-test-libs-loaded)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
307 (error |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
308 (push (cons file alpha) cus-test-libs-errors) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
309 (message "Error for %s: %s" file alpha)))) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
310 (cus-test-get-autoload-deps)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
311 (message "%s libraries loaded successfully" |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
312 (length cus-test-libs-loaded)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
313 (if (not cus-test-libs-errors) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
314 (message "No load problems encountered") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
315 (message "The following load problems appeared:") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
316 (cus-test-message cus-test-libs-errors)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
317 (run-hooks 'cus-test-after-load-libs-hook)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
318 |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
319 (defun cus-test-get-autoload-deps () |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
320 "Return the list of libraries with autoloads." |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
321 (with-temp-buffer |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
322 (insert-file-contents (locate-library "loaddefs")) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
323 ;; This is from `customize-option'. |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
324 (let (deps file) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
325 (while |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
326 (search-forward "\n;;; Generated autoloads from " nil t) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
327 (goto-char (match-end 0)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
328 (setq file (buffer-substring (point) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
329 (progn (end-of-line) (point)))) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
330 (setq file (file-name-nondirectory file)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
331 (string-match "\\.el\\'" file) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
332 (setq file (substring file 0 (match-beginning 0))) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
333 (setq deps (nconc deps (list file)))) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
334 deps))) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
335 |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
336 (defun cus-test-message (list) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
337 "Print the members of LIST line by line." |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
338 (dolist (m list) (message "%s" m))) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
339 |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
340 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
341 ;;; The routines for batch mode: |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
342 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
343 (defun cus-test-opts () |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
344 "Test custom options. |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
345 This function is suitable for batch mode. E.g., invoke |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
346 |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
347 src/emacs -batch -l admin/cus-test.el -f cus-test-opts |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
348 |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
349 in the emacs source directory." |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
350 (interactive) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
351 (message "Running %s" 'cus-test-load-custom-loads) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
352 (cus-test-load-custom-loads) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
353 (message "Running %s" 'cus-test-apropos) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
354 (cus-test-apropos "") |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
355 (if (not cus-test-errors) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
356 (message "No problems found") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
357 (message "The following options might have problems:") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
358 (cus-test-message cus-test-errors))) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
359 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
360 (defun cus-test-deps () |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
361 "Run a verbose version of `custom-load-symbol' on all atoms. |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
362 This function is suitable for batch mode. E.g., invoke |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
363 |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
364 src/emacs -batch -l admin/cus-test.el -f cus-test-deps |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
365 |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
366 in the emacs source directory." |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
367 (interactive) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
368 (setq cus-test-deps-errors nil) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
369 (setq cus-test-deps-required nil) |
47835
779560bedfb7
Supplementary streamlining.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47833
diff
changeset
|
370 (setq cus-test-deps-loaded nil) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
371 (mapatoms |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
372 ;; This code is mainly from `custom-load-symbol'. |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
373 (lambda (symbol) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
374 (unless custom-load-recursion |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
375 (let ((custom-load-recursion t)) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
376 (dolist (load (get symbol 'custom-loads)) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
377 (cond |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
378 ((symbolp load) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
379 ;; (condition-case nil (require load) (error nil)) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
380 (condition-case alpha |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
381 (unless (featurep load) |
47835
779560bedfb7
Supplementary streamlining.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47833
diff
changeset
|
382 (require load) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
383 (push (list symbol load) cus-test-deps-required)) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
384 (error |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
385 (push (list symbol load alpha) cus-test-deps-errors) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
386 (message "Require problem: %s %s %s" symbol load alpha)))) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
387 ((equal load "loaddefs") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
388 (push |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
389 (message "Symbol %s has loaddefs as custom dependency" symbol) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
390 cus-test-deps-errors)) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
391 ;; This is subsumed by the test below, but it's much |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
392 ;; faster. |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
393 ((assoc load load-history)) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
394 ;; This was just |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
395 ;; (assoc (locate-library load) load-history) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
396 ;; but has been optimized not to load locate-library |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
397 ;; if not necessary. |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
398 ((let ((regexp (concat "\\(\\`\\|/\\)" (regexp-quote load) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
399 "\\(\\'\\|\\.\\)")) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
400 (found nil)) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
401 (dolist (loaded load-history) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
402 (and (stringp (car loaded)) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
403 (string-match regexp (car loaded)) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
404 (setq found t))) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
405 found)) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
406 ;; Without this, we would load cus-edit recursively. |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
407 ;; We are still loading it when we call this, |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
408 ;; and it is not in load-history yet. |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
409 ((equal load "cus-edit")) |
47858
6ca67dbf4236
(cus-test-deps): Don't care about deps in lisp/term/.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47855
diff
changeset
|
410 ;; In this test, we don't care about deps in lisp/term/ |
6ca67dbf4236
(cus-test-deps): Don't care about deps in lisp/term/.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47855
diff
changeset
|
411 ((locate-library (concat term-file-prefix load))) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
412 (t |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
413 ;; (condition-case nil (load load) (error nil)) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
414 (condition-case alpha |
47835
779560bedfb7
Supplementary streamlining.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47833
diff
changeset
|
415 (progn |
779560bedfb7
Supplementary streamlining.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47833
diff
changeset
|
416 (load load) |
779560bedfb7
Supplementary streamlining.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47833
diff
changeset
|
417 (push (list symbol load) cus-test-deps-loaded)) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
418 (error |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
419 (push (list symbol load alpha) cus-test-deps-errors) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
420 (message "Load Problem: %s %s %s" symbol load alpha)))) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
421 )))))) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
422 (message "%s features required" |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
423 (length cus-test-deps-required)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
424 (message "%s files loaded" |
47835
779560bedfb7
Supplementary streamlining.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47833
diff
changeset
|
425 (length cus-test-deps-loaded)) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
426 (if (not cus-test-deps-errors) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
427 (message "No load problems encountered") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
428 (message "The following load problems appeared:") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
429 (cus-test-message cus-test-deps-errors)) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
430 (run-hooks 'cus-test-after-load-libs-hook)) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
431 |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
432 (defun cus-test-libs () |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
433 "Load the libraries with autoloads in separate processes. |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
434 This function is useful to detect load problems of libraries. |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
435 It is suitable for batch mode. E.g., invoke |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
436 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
437 src/emacs -batch -l admin/cus-test.el -f cus-test-libs |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
438 |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
439 in the emacs source directory." |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
440 (interactive) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
441 (with-temp-buffer |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
442 (setq cus-test-libs-errors nil) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
443 (setq cus-test-libs-loaded nil) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
444 (cd source-directory) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
445 (if (not (file-executable-p "src/emacs")) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
446 (error "No Emacs executable in %ssrc" default-directory)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
447 (mapc |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
448 (lambda (file) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
449 (condition-case alpha |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
450 (let (fn cmd status) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
451 (setq fn (locate-library file)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
452 (if (not fn) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
453 (error "Library %s not found" file)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
454 (setq cmd (concat "src/emacs -batch -l " fn)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
455 (setq status (call-process shell-file-name nil nil nil |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
456 shell-command-switch cmd)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
457 (if (= status 0) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
458 (message "%s" file) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
459 (error "%s" status)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
460 (push file cus-test-libs-loaded)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
461 (error |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
462 (push (cons file alpha) cus-test-libs-errors) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
463 (message "Error for %s: %s" file alpha)))) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
464 (cus-test-get-autoload-deps)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
465 (message "Default Directory: %s" default-directory) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
466 (message "%s libraries had no load errors" |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
467 (length cus-test-libs-loaded)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
468 (if (not cus-test-libs-errors) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
469 (message "No load problems encountered") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
470 (message "The following load problems appeared:") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
471 (cus-test-message cus-test-libs-errors)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
472 (run-hooks 'cus-test-after-load-libs-hook))) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
473 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
474 (provide 'cus-test) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
475 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
476 ;;; cus-test.el ends here |