annotate admin/cus-test.el @ 74043:2bd7a6d6a83f

(GC_MARK_SECONDARY_STACK): Update call to mark_memory.
author Andreas Schwab <schwab@suse.de>
date Sat, 18 Nov 2006 14:46:30 +0000
parents a8b22f12b3dc
children ddcbd2c1b70d 72dea2ff0142
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
70120
a8b22f12b3dc updated copyright year(s)
Ramprasad B <ramprasad_i82@yahoo.com>
parents: 64079
diff changeset
3 ;; Copyright (C) 1998, 2000, 2002, 2006 Free Software Foundation, Inc.
47801
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
64079
c53a9463c31a Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 52401
diff changeset
24 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
c53a9463c31a Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 52401
diff changeset
25 ;; Boston, MA 02110-1301, USA.
47801
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 ;;
47894
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
41 ;; src/emacs -batch -l admin/cus-test.el -f cus-test-noloads
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
42 ;;
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
43 ;; 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
44 ;;
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
45 ;; 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
46 ;;
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
47 ;; 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
48 ;;
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
49 ;; 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
50 ;;
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
51 ;; M-x cus-test-apropos RET
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
52 ;;
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
53 ;; 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
54 ;; variable `cus-test-errors'.
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
55 ;;
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
56 ;; 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
57 ;; 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
58 ;; libraries.
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
59 ;;
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
60 ;; 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
61 ;;
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
62 ;; loads all (!) custom dependencies and
47801
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
63 ;;
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
64 ;; 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
65 ;;
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
66 ;; loads all (!) libraries with autoloads.
47801
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
67 ;;
47815
a57526a55f0e Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47804
diff changeset
68 ;; 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
69 ;; 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
70 ;;
a57526a55f0e Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47804
diff changeset
71 ;; `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
72 ;;
a57526a55f0e Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47804
diff changeset
73 ;; 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
74 ;; 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
75 ;;
47815
a57526a55f0e Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47804
diff changeset
76 ;; `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
77 ;;
a57526a55f0e Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47804
diff changeset
78 ;; 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
79 ;; those options further.
a57526a55f0e Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47804
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-opts' tests many (all?) custom options.
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
82 ;;
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
83 ;; 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
84 ;; but reports about load errors.
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
85 ;;
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
86 ;; 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
87 ;; 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
88 ;;
47894
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
89 ;; The command `cus-test-noloads' returns a list of variables which
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
90 ;; are somewhere declared as custom options, but not loaded by
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
91 ;; `custom-load-symbol'.
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
92 ;;
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
93 ;; Some results from October 2002:
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
94 ;;
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
95 ;; 4523 options tested
47815
a57526a55f0e Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47804
diff changeset
96 ;; 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
97 ;; ps-mule-font-info-database-default
47884
b475e8cf9b0a Undo previous change, but leave a comment.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47858
diff changeset
98 ;; grep-tree-command
b475e8cf9b0a Undo previous change, but leave a comment.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47858
diff changeset
99 ;; grep-find-command
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
100 ;;
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
101 ;; 288 features required
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
102 ;; 10 files loaded
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
103 ;; The following load problems appeared:
47884
b475e8cf9b0a Undo previous change, but leave a comment.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47858
diff changeset
104 ;; (killing x-win (file-error Cannot open load file x-win))
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
105 ;; 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
106 ;; (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
107 ;; (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
108 ;; (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
109 ;; (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
110 ;; ...
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
111 ;;
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
112 ;; 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
113 ;; 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
114 ;; (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
115 ;; (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
116 ;; (ada-stmt error 255)
47894
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
117 ;;
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
118 ;; The following options were not loaded by custom-load-symbol:
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
119 ;; edt-bottom-scroll-margin
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
120 ;; edt-keep-current-page-delimiter
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
121 ;; edt-top-scroll-margin
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
122 ;; edt-use-EDT-control-key-bindings
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
123 ;; edt-word-entities
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
124 ;; grep-find-use-xargs
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
125 ;; master-mode-hook
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
126 ;; outline-level
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
127 ;; outline-minor-mode-hook
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
128 ;; refill-mode-hook
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
129
47889
9553f9fe9ad3 (cus-test-libs): Use equal instead of =.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47886
diff changeset
130
47801
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
131 ;;; Code:
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
132
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
133 ;;; 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
134
47815
a57526a55f0e Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47804
diff changeset
135 (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
136 "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
137
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
138 (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
139 "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
140
47894
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
141 (defvar cus-test-libs-noloads nil
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
142 "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
143
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
144 ;; 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
145 ;; 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
146 ;; 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
147 (provide 'bbdb)
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
148 (provide 'bbdb-com)
47801
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
149
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
150 ;; 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
151 ;; (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
152
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
153 ;; 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
154 (let (noninteractive) (load "dunnet"))
47894
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
155 (add-to-list 'cus-test-libs-noloads "dunnet")
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
156
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
157 ;; Never Viperize.
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
158 (setq viper-mode nil)
47801
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
159
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
160 ;; 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
161 (eval-after-load "saveplace"
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
162 '(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
163
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
164 ;; 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
165 (setq save-abbrevs nil)
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
166
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
167 ;; Avoid compile logs from adviced functions.
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
168 (eval-after-load "bytecomp"
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
169 '(setq ad-default-compilation-action 'never))
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
170
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
171
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
172 ;;; Main code:
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
173
47801
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
174 ;; We want to log all messages.
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
175 (setq message-log-max t)
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
176
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
177 (require 'cus-edit)
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
178 (require 'cus-load)
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
179
47801
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
180 (defvar cus-test-errors nil
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
181 "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
182
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
183 (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
184 "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
185
47894
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
186 ;; I haven't understood this :get stuff. The symbols with a
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
187 ;; custom-get property are stored here.
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
188 (defvar cus-test-vars-with-custom-get nil
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
189 "Set by `cus-test-apropos' to a list of options with :get property.")
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
190
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
191 (defvar cus-test-vars-with-changed-state nil
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
192 "Set by `cus-test-apropos' to a list of options with state 'changed.")
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
193
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
194 (defvar cus-test-deps-errors nil
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
195 "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
196
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
197 (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
198 "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
199 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
200
47835
779560bedfb7 Supplementary streamlining.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47833
diff changeset
201 (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
202 "List of dependencies loaded by `cus-test-deps'.")
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
203
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
204 (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
205 "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
206
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
207 (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
208 "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
209
47894
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
210 (defvar cus-test-vars-not-cus-loaded nil
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
211 "A list of options not loaded by `custom-load-symbol'.
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
212 Set by `cus-test-noloads'.")
47801
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
213
47894
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
214 ;; (defvar cus-test-vars-cus-loaded nil
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
215 ;; "A list of options loaded by `custom-load-symbol'.")
47815
a57526a55f0e Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47804
diff changeset
216
47801
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
217 (defun cus-test-apropos (regexp)
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
218 "Check the options matching REGEXP.
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
219 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
220 (interactive "sVariable regexp: ")
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
221 (setq cus-test-errors nil)
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
222 (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
223 (mapc
47801
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
224 (lambda (symbol)
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
225 (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
226 ;; 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
227 (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
228 (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
229 (condition-case alpha
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
230 (let* ((type (custom-variable-type symbol))
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
231 (conv (widget-convert type))
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
232 (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
233 values
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
234 mismatch)
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
235 (when (default-boundp symbol)
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
236 (push (funcall get symbol) values)
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
237 (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
238 (if (boundp symbol)
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
239 (push (symbol-value symbol) values))
47801
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
240 ;; That does not work.
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
241 ;; (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
242
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
243 ;; Check the values
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
244 (mapc (lambda (value)
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
245 (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
246 (setq mismatch 'mismatch)))
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
247 values)
47801
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
248
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
249 ;; Store symbols with a custom-get property.
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
250 (when (get symbol 'custom-get)
47886
02c982b64945 Minor change.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47884
diff changeset
251 (add-to-list 'cus-test-vars-with-custom-get symbol))
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
252
47801
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
253 ;; 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
254 ;; 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
255 (let ((c-value
a57526a55f0e Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47804
diff changeset
256 (or (get symbol 'customized-value)
a57526a55f0e Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47804
diff changeset
257 (get symbol 'saved-value)
a57526a55f0e Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47804
diff changeset
258 (get symbol 'standard-value))))
a57526a55f0e Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47804
diff changeset
259 (and (consp c-value)
a57526a55f0e Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47804
diff changeset
260 (boundp symbol)
a57526a55f0e Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47804
diff changeset
261 (not (equal (eval (car c-value)) (symbol-value symbol)))
47886
02c982b64945 Minor change.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47884
diff changeset
262 (add-to-list 'cus-test-vars-with-changed-state symbol)))
47801
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
263
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
264 (if mismatch
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
265 (push symbol cus-test-errors)))
47801
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
266
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
267 (error
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
268 (push symbol cus-test-errors)
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
269 (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
270 (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
271 (message "%s options tested"
47801
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
272 (length cus-test-tested-variables))
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
273 (cus-test-errors-display))
47801
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
274
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
275 (defun cus-test-get-options (regexp)
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
276 "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
277 (let (found)
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
278 (mapatoms
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
279 (lambda (symbol)
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
280 (and
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
281 (or
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
282 ;; (user-variable-p symbol)
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
283 (get symbol 'standard-value)
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
284 ;; (get symbol 'saved-value)
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
285 (get symbol 'custom-type))
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
286 (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
287 (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
288 (push symbol found))))
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
289 found))
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
290
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
291 (defun cus-test-errors-display ()
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
292 "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
293 (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
294 (set-buffer standard-output)
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
295 (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
296 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
297 (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
298 (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
299 (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
300 (insert "The following variables seem to have problems:\n\n")
47894
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
301 (dolist (e cus-test-errors)
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
302 (insert (symbol-name e) "\n")))))
47801
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
303
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
304 (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
305 "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
306 (interactive)
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
307 (mapatoms 'custom-load-symbol)
47815
a57526a55f0e Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47804
diff changeset
308 (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
309
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
310 (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
311 "Load the libraries with autoloads.
47894
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
312 Don't load libraries in `cus-test-libs-noloads'."
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
313 (interactive)
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
314 (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
315 (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
316 (mapc
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
317 (lambda (file)
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
318 (condition-case alpha
47894
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
319 (unless (member file cus-test-libs-noloads)
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
320 (load file)
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
321 (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
322 (error
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
323 (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
324 (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
325 (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
326 (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
327 (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
328 (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
329 (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
330 (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
331 (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
332 (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
333
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
334 (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
335 "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
336 (with-temp-buffer
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
337 (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
338 ;; 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
339 (let (deps file)
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
340 (while
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
341 (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
342 (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
343 (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
344 (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
345 (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
346 (string-match "\\.el\\'" file)
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
347 (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
348 (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
349 deps)))
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
350
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
351 (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
352 "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
353 (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
354
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
355
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
356 ;;; The routines for batch mode:
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
357
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
358 (defun cus-test-opts ()
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
359 "Test custom options.
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
360 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
361
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
362 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
363
47894
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
364 in the Emacs source directory."
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
365 (interactive)
47884
b475e8cf9b0a Undo previous change, but leave a comment.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47858
diff changeset
366 (message "Running %s" 'cus-test-load-libs)
b475e8cf9b0a Undo previous change, but leave a comment.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47858
diff changeset
367 (cus-test-load-libs)
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
368 (message "Running %s" 'cus-test-load-custom-loads)
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
369 (cus-test-load-custom-loads)
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
370 (message "Running %s" 'cus-test-apropos)
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
371 (cus-test-apropos "")
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
372 (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
373 (message "No problems found")
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
374 (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
375 (cus-test-message cus-test-errors)))
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
376
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
377 (defun cus-test-deps ()
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
378 "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
379 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
380
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
381 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
382
47894
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
383 in the Emacs source directory."
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
384 (interactive)
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
385 (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
386 (setq cus-test-deps-required nil)
47835
779560bedfb7 Supplementary streamlining.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47833
diff changeset
387 (setq cus-test-deps-loaded nil)
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
388 (mapatoms
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
389 ;; This code is mainly from `custom-load-symbol'.
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
390 (lambda (symbol)
47894
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
391 (let ((custom-load-recursion t))
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
392 (dolist (load (get symbol 'custom-loads))
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
393 (cond
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
394 ((symbolp load)
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
395 ;; (condition-case nil (require load) (error nil))
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
396 (condition-case alpha
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
397 (unless (featurep load)
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
398 (require load)
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
399 (push (list symbol load) cus-test-deps-required))
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
400 (error
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
401 (push (list symbol load alpha) cus-test-deps-errors)
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
402 (message "Require problem: %s %s %s" symbol load alpha))))
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
403 ((equal load "loaddefs")
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
404 (push
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
405 (message "Symbol %s has loaddefs as custom dependency" symbol)
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
406 cus-test-deps-errors))
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
407 ;; This is subsumed by the test below, but it's much
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
408 ;; faster.
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
409 ((assoc load load-history))
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
410 ;; This was just
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
411 ;; (assoc (locate-library load) load-history)
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
412 ;; but has been optimized not to load locate-library
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
413 ;; if not necessary.
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
414 ((let ((regexp (concat "\\(\\`\\|/\\)" (regexp-quote load)
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
415 "\\(\\'\\|\\.\\)"))
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
416 (found nil))
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
417 (dolist (loaded load-history)
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
418 (and (stringp (car loaded))
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
419 (string-match regexp (car loaded))
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
420 (setq found t)))
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
421 found))
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
422 ;; Without this, we would load cus-edit recursively.
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
423 ;; We are still loading it when we call this,
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
424 ;; and it is not in load-history yet.
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
425 ((equal load "cus-edit"))
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
426 ;; This would ignore load problems with files in
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
427 ;; lisp/term/
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
428 ;; ((locate-library (concat term-file-prefix load)))
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
429 (t
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
430 ;; (condition-case nil (load load) (error nil))
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
431 (condition-case alpha
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
432 (progn
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
433 (load load)
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
434 (push (list symbol load) cus-test-deps-loaded))
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
435 (error
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
436 (push (list symbol load alpha) cus-test-deps-errors)
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
437 (message "Load Problem: %s %s %s" symbol load alpha))))
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
438 )))))
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
439 (message "%s features required"
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
440 (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
441 (message "%s files loaded"
47835
779560bedfb7 Supplementary streamlining.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47833
diff changeset
442 (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
443 (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
444 (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
445 (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
446 (cus-test-message cus-test-deps-errors))
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
447 (run-hooks 'cus-test-after-load-libs-hook))
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
448
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
449 (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
450 "Load the libraries with autoloads in separate processes.
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
451 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
452 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
453
47833
330d29ed5c91 Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47815
diff changeset
454 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
455
47894
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
456 in the Emacs source directory."
47801
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
457 (interactive)
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
458 (with-temp-buffer
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
459 (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
460 (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
461 (cd source-directory)
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
462 (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
463 (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
464 (mapc
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
465 (lambda (file)
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
466 (condition-case alpha
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
467 (let (fn cmd status)
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
468 (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
469 (if (not fn)
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
470 (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
471 (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
472 (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
473 shell-command-switch cmd))
47889
9553f9fe9ad3 (cus-test-libs): Use equal instead of =.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47886
diff changeset
474 (if (equal status 0)
47855
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
475 (message "%s" file)
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
476 (error "%s" status))
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
477 (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
478 (error
ce2ef611f634 Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47835
diff changeset
479 (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
480 (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
481 (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
482 (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
483 (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
484 (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
485 (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
486 (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
487 (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
488 (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
489 (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
490
47894
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
491 (defun cus-test-noloads ()
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
492 "Find custom options not loaded by `custom-load-symbol'.
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
493 Calling this function after `cus-test-load-libs' is not meaningful.
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
494 It is suitable for batch mode. E.g., invoke
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
495
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
496 src/emacs -batch -l admin/cus-test.el -f cus-test-noloads
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
497
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
498 in the Emacs source directory."
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
499 (interactive)
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
500 (let (cus-loaded)
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
501
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
502 (message "Running %s" 'cus-test-load-custom-loads)
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
503 (cus-test-load-custom-loads)
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
504 (setq cus-loaded
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
505 (cus-test-get-options ""))
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
506
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
507 (message "Running %s" 'cus-test-load-libs)
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
508 (cus-test-load-libs)
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
509 (setq cus-test-vars-not-cus-loaded
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
510 (cus-test-get-options ""))
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
511
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
512 (dolist (o cus-loaded)
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
513 (setq cus-test-vars-not-cus-loaded
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
514 (delete o cus-test-vars-not-cus-loaded)))
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
515
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
516 (if (not cus-test-vars-not-cus-loaded)
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
517 (message "No options not loaded by custom-load-symbol found")
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
518 (message "The following options were not loaded by custom-load-symbol:")
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
519 (cus-test-message
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
520 (sort cus-test-vars-not-cus-loaded 'string<)))))
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
521
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
522 ;; And last but not least a quiz:
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
523 ;;
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
524 ;; Evaluation of the form (customize-option 'debug-on-error) yields a
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
525 ;; *Customize* buffer with a mismatch mess. Why?
11b74e54eddf Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 47889
diff changeset
526
47801
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
527 (provide 'cus-test)
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
528
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 52174
diff changeset
529 ;;; arch-tag: a4991a31-548d-48fb-8ba1-1ebbe68eb2e7
47801
6a024dc61d30 Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff changeset
530 ;;; cus-test.el ends here