Mercurial > hg > xemacs-beta
annotate lisp/dumped-lisp.el @ 5753:dbd8305e13cb
Warn about non-string non-integer ARG to #'gensym, bytecomp.el.
lisp/ChangeLog addition:
2013-08-21 Aidan Kehoe <kehoea@parhasard.net>
* bytecomp.el:
* bytecomp.el (gensym):
* bytecomp.el (byte-compile-gensym): New.
Warn that gensym called in a for-effect context is unlikely to be
useful.
Warn about non-string non-integer ARGs, this is incorrect.
Am not changing the function to error with same, most code that
makes the mistake is has no problems, which is why it has survived
so long.
* window-xemacs.el (save-window-excursion/mapping):
* window.el (save-window-excursion):
Call #'gensym with a string, not a symbol.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Wed, 21 Aug 2013 19:02:59 +0100 |
parents | 69a08906ad27 |
children | 5b799fa6d75e c608d4b0b75e |
rev | line source |
---|---|
5404
91b3aa59f49b
Convert lisp/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents:
5264
diff
changeset
|
1 ;; This file is part of XEmacs. |
91b3aa59f49b
Convert lisp/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents:
5264
diff
changeset
|
2 |
91b3aa59f49b
Convert lisp/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents:
5264
diff
changeset
|
3 ;; XEmacs is free software: you can redistribute it and/or modify it |
91b3aa59f49b
Convert lisp/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents:
5264
diff
changeset
|
4 ;; under the terms of the GNU General Public License as published by the |
91b3aa59f49b
Convert lisp/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents:
5264
diff
changeset
|
5 ;; Free Software Foundation, either version 3 of the License, or (at your |
91b3aa59f49b
Convert lisp/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents:
5264
diff
changeset
|
6 ;; option) any later version. |
91b3aa59f49b
Convert lisp/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents:
5264
diff
changeset
|
7 |
91b3aa59f49b
Convert lisp/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents:
5264
diff
changeset
|
8 ;; XEmacs is distributed in the hope that it will be useful, but WITHOUT |
91b3aa59f49b
Convert lisp/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents:
5264
diff
changeset
|
9 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
91b3aa59f49b
Convert lisp/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents:
5264
diff
changeset
|
10 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
91b3aa59f49b
Convert lisp/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents:
5264
diff
changeset
|
11 ;; for more details. |
91b3aa59f49b
Convert lisp/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents:
5264
diff
changeset
|
12 |
91b3aa59f49b
Convert lisp/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents:
5264
diff
changeset
|
13 ;; You should have received a copy of the GNU General Public License |
91b3aa59f49b
Convert lisp/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents:
5264
diff
changeset
|
14 ;; along with XEmacs. If not, see <http://www.gnu.org/licenses/>. |
91b3aa59f49b
Convert lisp/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents:
5264
diff
changeset
|
15 |
1330 | 16 (defvar packages-hardcoded-lisp |
17 '( | |
18 ;; Nothing at this time | |
19 ) | |
20 "Lisp packages that are always dumped with XEmacs. | |
21 This includes every package that is loaded directly by a package listed | |
22 in dumped-lisp.el and is not itself listed.") | |
23 | |
2367 | 24 |
25 ;; WARNING WARNING WARNING: None of the files below, until where it says | |
26 ;; "All files after this can have extended characters in them", can have | |
27 ;; extended (non-ASCII characters) of any sort in them! Unfortunately, you | |
28 ;; will not get any error at load-time; however, you may get a later very | |
29 ;; cryptic error "Invalid opcode"! This is caused by the byte-code data | |
30 ;; being encoded as escape-quoted, when we can't handle that yet. | |
31 ;; | |
32 ;; #### We should resurrect the check for the coding-system magic cookie in | |
33 ;; fileio.c and put in an abort if we are not able to handle it yet. | |
34 | |
428 | 35 (setq preloaded-file-list |
1315 | 36 (list |
1333 | 37 ;; do not defcustom any variables in these files |
38 | |
1315 | 39 "backquote" ; needed for defsubst etc. |
40 "bytecomp-runtime" ; define defsubst | |
41 "subr" ; load the most basic Lisp functions | |
5284
d27c1ee1943b
Make the order of preloaded-file-list more sane.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5264
diff
changeset
|
42 "cl" |
d27c1ee1943b
Make the order of preloaded-file-list more sane.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5264
diff
changeset
|
43 "cl-extra" ; also loads cl-macs if we're running interpreted. |
d27c1ee1943b
Make the order of preloaded-file-list more sane.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5264
diff
changeset
|
44 "cl-seq" |
1315 | 45 "post-gc" |
4246 | 46 "version" |
5284
d27c1ee1943b
Make the order of preloaded-file-list more sane.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5264
diff
changeset
|
47 "custom" ; Before the world so everything can be customized |
d27c1ee1943b
Make the order of preloaded-file-list more sane.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5264
diff
changeset
|
48 "cus-start" ; for customization of builtin variables |
d27c1ee1943b
Make the order of preloaded-file-list more sane.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5264
diff
changeset
|
49 "find-paths" |
d27c1ee1943b
Make the order of preloaded-file-list more sane.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5264
diff
changeset
|
50 "packages" |
d27c1ee1943b
Make the order of preloaded-file-list more sane.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5264
diff
changeset
|
51 "setup-paths" |
d27c1ee1943b
Make the order of preloaded-file-list more sane.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5264
diff
changeset
|
52 "replace" |
1315 | 53 "widget" |
54 "cmdloop" | |
55 "keymap" | |
56 "syntax" | |
5532
69a08906ad27
Introducing syntax-ppss.el from GNU.
Mats Lidell <mats.lidell@cag.se>
parents:
5487
diff
changeset
|
57 "syntax-ppss" |
1315 | 58 "device" |
59 "console" | |
60 "obsolete" | |
61 "specifier" | |
62 "frame" ; needed by faces | |
3094 | 63 ;; #### this should be (featurep 'xft) |
3354 | 64 (when (featurep 'xft-fonts) "fontconfig") ; needed by x-faces |
1315 | 65 (when (featurep 'x) "x-faces") ; needed by faces |
66 (when (featurep 'gtk) "gtk-faces") | |
67 (when (valid-console-type-p 'mswindows) "msw-faces") | |
68 "faces" ; must be loaded before any make-face call | |
69 ;;(pureload "facemenu") #### not yet ported | |
70 "glyphs" | |
5176
8b2f75cecb89
rename objects* (.c, .h and .el files) to fontcolor*
Ben Wing <ben@xemacs.org>
parents:
4506
diff
changeset
|
71 "fontcolor" |
1315 | 72 "extents" |
73 "events" | |
74 "hash-table" | |
75 "text-props" | |
76 "process" ;; This is bad. network-streams may not be defined. | |
77 (when (featurep 'multicast) "multicast") ; #+network-streams implicitly true | |
78 "map-ynp" | |
79 "undo-stack" | |
80 "window" ; simple needs `save-window-excursion' | |
81 "window-xemacs" | |
3932 | 82 "resize-minibuffer" ; simple needs `resize-minibuffer-mode' |
1315 | 83 "simple" |
1333 | 84 "newcomment" |
1315 | 85 "keydefs" ; Before loaddefs so that keymap vars exist. |
86 "abbrev" | |
87 "derived" | |
88 "minibuf" | |
89 "list-mode" | |
90 "modeline" ; needs simple.el to be loaded first | |
428 | 91 ;; If SparcWorks support is included some additional packages are |
92 ;; dumped which would normally have autoloads. To avoid | |
93 ;; duplicate doc string warnings, SparcWorks uses a separate | |
94 ;; autoloads file with the dumped packages removed. | |
95 ;; After fixing, eos/loaddefs-eos and loaddefs appear identical?!! | |
96 ;; So just make loaddefs-eos go away... | |
97 ;;(pureload (if (featurep 'sparcworks) "eos/loaddefs-eos" "loaddefs")) | |
1315 | 98 "cus-file" |
99 "startup" ; For initialization of | |
428 | 100 ; `emacs-user-extension-dir' |
1315 | 101 "misc" |
102 ;; (pureload "profile") | |
3368 | 103 "loadhist" ; Must be dumped before loaddefs is loaded |
104 ; Used by help. | |
1315 | 105 ;; (pureload "hyper-apropos") Soon... |
106 "files" | |
107 "lib-complete" | |
108 "format" | |
109 "indent" | |
110 "isearch-mode" | |
111 "buffer" | |
112 "buff-menu" | |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
113 "paths" |
1315 | 114 "lisp" |
115 "page" | |
116 "register" | |
117 "iso8859-1" ; This must be before any modes | |
118 ; (sets standard syntax table.) | |
4506
bd28481bb0e1
Port #'window-buffer-height, #'fit-window-to-buffer, & window, buf, functions.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4372
diff
changeset
|
119 "easy-mmode" ; Added for 21.5. Used by help. |
bd28481bb0e1
Port #'window-buffer-height, #'fit-window-to-buffer, & window, buf, functions.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4372
diff
changeset
|
120 "help" |
1315 | 121 "easymenu" ; Added for 20.3. |
5487
dc37764a105b
Import special-mode from GNU Emacs.
Didier Verna <didier@lrde.epita.fr>
parents:
5475
diff
changeset
|
122 "special-mode" |
1315 | 123 "lisp-mode" |
124 "text-mode" | |
125 "fill" | |
126 "auto-save" ; Added for 20.4 | |
127 "movemail" ; Added for 21.2 | |
128 (when (eq system-type 'windows-nt) "win32-native") | |
129 (when (featurep 'lisp-float-type) "float-sup") | |
130 "itimer" ; for vars auto-save-timeout and | |
428 | 131 ; auto-gc-threshold |
1315 | 132 "itimer-autosave" |
133 "printer" | |
134 "behavior" | |
135 "behavior-defs" | |
136 "diagnose" | |
137 | |
442 | 138 ;;;;;;;;;;;;;;;;;; GUI support |
1315 | 139 (when (featurep 'window-system) |
140 '("gui" | |
141 "mouse" | |
142 "mode-motion" | |
143 )) | |
144 (when (featurep 'toolbar) "toolbar") | |
145 (when (featurep 'scrollbar) "scrollbar") | |
146 (when (featurep 'menubar) "menubar") | |
147 (when (featurep 'dialog) "dialog") | |
148 (when (featurep 'gutter) "gutter") | |
149 (when (featurep 'dragdrop-api) "dragdrop") | |
150 "select" | |
151 | |
442 | 152 ;;;;;;;;;;;;;;;;;; Content for GUI's |
1315 | 153 ;; There used to be window-system inserted in the when-feature, |
154 ;; but IMHO your configure script should turn off the menubar, | |
155 ;; toolbar, etc. features when there is no window system. We | |
156 ;; should just be able to assume that, if (featurep 'menubar), | |
157 ;; the menubar should work and if items are added, they can be | |
158 ;; seen clearly and usefully. | |
5228
5efbd1253905
Remove all support for InfoDock.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5178
diff
changeset
|
159 (when (featurep 'menubar) "menubar-items") |
5efbd1253905
Remove all support for InfoDock.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5178
diff
changeset
|
160 (when (featurep 'gutter) "gutter-items") |
5efbd1253905
Remove all support for InfoDock.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5178
diff
changeset
|
161 (when (featurep 'toolbar) "toolbar-items") |
5efbd1253905
Remove all support for InfoDock.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5178
diff
changeset
|
162 (when (featurep 'dialog) "dialog-items") |
442 | 163 |
164 ;;;;;;;;;;;;;;;;;; Coding-system support | |
1315 | 165 "coding" |
166 "code-files" | |
167 ;; Handle process with encoding/decoding coding-system. | |
168 "code-process" | |
169 ;; Provide basic commands to set coding systems to user | |
170 "code-cmds" | |
171 "unicode" | |
442 | 172 ;;;;;;;;;;;;;;;;;; MULE support |
1315 | 173 (when (featurep 'mule) |
2465 | 174 '("mule/mule-charset" |
175 "mule/mule-cmds" ; to sync with Emacs 20.1 | |
176 "mule/mule-coding" | |
177 "mule/mule-composite-stub" | |
178 "mule/mule-composite" | |
1315 | 179 )) |
180 ;; may initialize coding systems | |
2465 | 181 (when (featurep '(and mule x)) "mule/mule-x-init") |
182 (when (featurep '(and mule tty)) "mule/mule-tty-init") | |
1315 | 183 (when (and (featurep 'mule) (memq system-type '(windows-nt cygwin32))) |
2474 | 184 "mule/mule-win32-init") |
1315 | 185 "code-init" ; set up defaults |
186 ;; All files after this can have extended characters in them. | |
187 (when (featurep 'mule) | |
2465 | 188 '("mule/mule-category" |
189 "mule/kinsoku" | |
1315 | 190 )) |
428 | 191 |
192 ;; after this goes the specific lisp routines for a particular input system | |
193 ;; 97.2.5 JHod Shouldn't these go into a site-load file to allow site | |
194 ;; or user switching of input systems??? | |
195 ;(if (featurep 'wnn) | |
196 ; (progn | |
197 ; (pureload "egg") | |
198 ; (pureload "egg-wnn") | |
199 ; (setq egg-default-startup-file "eggrc-wnn"))) | |
200 | |
201 ;; (if (and (boundp 'CANNA) CANNA) | |
202 ;; (pureload "canna") | |
203 ;; ) | |
204 | |
780 | 205 ;; Now load files to set up all the different languages/environments that |
206 ;; Mule knows about. Formerly we had to worry about files shadowed by | |
207 ;; those of the same name in leim/quail.el, but no longer, since we now | |
208 ;; compile with -no-packages. | |
428 | 209 |
1315 | 210 (when (featurep 'mule) |
2465 | 211 '("mule/arabic" |
212 "mule/chinese" | |
213 "mule/cyrillic" | |
214 "mule/english" | |
215 "mule/ethiopic" | |
216 "mule/greek" | |
217 "mule/hebrew" | |
218 "mule/indian" | |
219 "mule/devanagari" ; must be loaded after indian.el | |
220 "mule/japanese" | |
221 "mule/korean" | |
4072 | 222 "mule/lao" ; sucks. |
2465 | 223 "mule/latin" |
224 "mule/misc-lang" | |
5396
75469840109b
Drop support for Thai-XTIS, which was always non-standard and never used.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5284
diff
changeset
|
225 "mule/thai" |
2465 | 226 "mule/tibetan" |
227 "mule/vietnamese" | |
1315 | 228 )) |
229 | |
428 | 230 ;; Specialized language support |
2973 | 231 (when (featurep 'mule) "mule/canna-leim") |
780 | 232 ;; needs access to the charsets created by the above |
233 ;; language-specific files. | |
1315 | 234 (when (and (featurep 'mule) (valid-console-type-p 'mswindows)) |
2465 | 235 "mule/mule-msw-init-late") |
780 | 236 |
3707 | 237 (when (featurep 'mule) |
238 "mule/general-late") | |
239 | |
428 | 240 ;;; mule-load.el ends here |
442 | 241 |
242 ;; preload the X code. | |
1315 | 243 (when (featurep '(and x scrollbar)) "x-scrollbar") |
244 (when (featurep 'x) | |
2828 | 245 '("x-mouse" |
1315 | 246 "x-select" |
247 "x-misc" | |
248 "x-init" | |
249 "x-win-xfree86" | |
250 "x-win-sun")) | |
251 ;; preload the GTK code | |
252 (when (featurep 'gtk) | |
253 '("gtk-ffi" | |
254 "gtk-widgets" | |
255 "gdk" | |
256 "gtk-init" | |
257 "gtk-select" | |
258 "gtk-mouse" | |
259 "gtk-glyphs" | |
260 "widgets-gtk")) | |
261 (when (featurep '(and gtk dialog)) "dialog-gtk") | |
262 (when (featurep 'glade) "glade") | |
462 | 263 |
428 | 264 ;; preload the mswindows code. |
1315 | 265 (when (valid-console-type-p 'mswindows) |
266 '("msw-glyphs" | |
267 "msw-mouse" | |
268 "msw-init" | |
269 "msw-select")) | |
428 | 270 ;; preload the TTY init code. |
1315 | 271 (when (featurep 'tty) "tty-init") |
428 | 272 ;;; Formerly in tooltalk/tooltalk-load.el |
273 ;; Moved to tooltalk package | |
1315 | 274 ;; (when (featurep 'tooltalk) |
275 ;; '("tooltalk-macros" "tooltalk-util" "tooltalk-init")) | |
428 | 276 ;; "vc-hooks" ; Packaged. Available in two versions. |
277 ;; "ediff-hook" ; Packaged. | |
1315 | 278 "fontl-hooks" |
279 "auto-show" | |
2579 | 280 "paragraphs" ; needs easy-mmode, coding |
1315 | 281 (when (featurep 'ldap) "ldap") |
428 | 282 |
1315 | 283 ;; (when (featurep 'energize) "energize/energize-load.el") |
428 | 284 ;;; formerly in sunpro/sunpro-load.el |
1315 | 285 ;; (when (featurep '(and mule sparcworks)) "mime-setup") |
428 | 286 |
287 ;; Moved to Sun package | |
1315 | 288 ;; (when (featurep 'sparcworks) |
289 ;; '("cc-mode" ; Requires cc-mode package | |
290 ;; "sunpro-init" | |
291 ;; "ring" | |
292 ;; "comint" ; Requires comint package | |
293 ;; "annotations")) | |
428 | 294 |
295 ;;; formerly in eos/sun-eos-load.el | |
1315 | 296 ;; (when (featurep 'sparcworks) |
297 ;; '("sun-eos-init" | |
298 ;; "sun-eos-common" | |
299 ;; "sun-eos-editor" | |
300 ;; "sun-eos-browser" | |
301 ;; "sun-eos-debugger" | |
302 ;; "sun-eos-debugger-extra" | |
303 ;; "sun-eos-menubar")) | |
304 "loaddefs" ; <=== autoloads get loaded here | |
305 )) | |
306 | |
307 (setq preloaded-file-list | |
5264
0d43872986b6
Change (apply 'nconc (mapcar ...)) to (mapcan ...); warn about first form.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5228
diff
changeset
|
308 (mapcan #'(lambda (x) (if (listp x) x (list x))) preloaded-file-list)) |