>>>> "Gunnar" == Gunnar Evermann
<ge204(a)eng.cam.ac.uk> writes:
> variables that are settable by command line option, the
> saves/restores should be unconditional, and the conditional
> initialization should be moved to the declaration.
Gunnar> Wouldn't it be easier to move the command line parsing for
Gunnar> the relvant variable after the loading of the dump file?
Gunnar> This would be more like the initialisation in a
Gunnar> traditional dumped xemacs.
Now that I've looked more carefully at the code, I agree. However,
doing this right is something I don't have time to do right now. Any
takers?
A light audit of the command line parsing code reveals the following
apparent bugs and issues:
1. There is a comment in startup.el indicating that some unidentified
hacker would like to move as much command line parsing as possible
out of C and into Lisp. I agree; among other things, it would
obviate all pdump issues with command args.
The command args that absolutely can't be moved into Lisp right away:
-nd, -sd, -batch, -d, -t, -nw: Used in emacs.c. I suspect that
with some effort -d and -nw could be moved into Lisp, but I doubt
it's trivial.
As far as I can tell, all the rest could be moved into Lisp by
creating a `really_very_early_command_line' function to be called
from `normal-top-level' rather than from `command-line'. But I
haven't checked terribly carefully.
2. The presence of -NXhost or -MachLaunch in the command line will
hose processing of all lower-priority args parsed in C.
3. Some C-parsed args have the same priority; if they come in the
wrong order in the command-line, the earlier one will be ignored,
as will all lower priority C-parsed args. This applies to
repetition of C-parsed args as well. (Any parsing done in Lisp
should not be affected.)
4. -debug-paths appears twice in the standard_args table in emacs.c
with different priorities, and is parsed twice in main_1 with
different semantics.
5. I haven't checked carefully, but I think that some options are
ordered differently in standard_args priority and in main_1.
There are probably more.
--
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences Tel/fax: +81 (298) 53-5091
_________________ _________________ _________________ _________________
What are those straight lines for? "XEmacs rules."