Sorry for bugging you (again).
Some time ago (February 21, 2006) I suggested to add a :parse-options
keyword to saveinitmem such that
:executable t :parse-options nil
had the effect of adding an understood -- in front of the arguments to the
executable memory dump.
I also came up with a patch which burried a Boolean inside the executable.
That Boolean was checked as the very very first thing in the
craddle-to-grave sequence and decided whether the argument list should
have an understood -- in front.
The patch had the side effect that one could lock out the user from access
to clisp features, giving access only to the features of the dumped
program. As an example, one would be unable to see that the program was
actually a clisp memory dump. And if one knew that the program was a clisp
one, one would be unable to see e.g. which version of clisp was used. As
far as I understand, this side effect was undesired and the patch was
I just stumbled over yet another situation where an understood -- would be
nice to have: Suppose an executable memory dump M drops the user to a
clisp prompt. Suppose one invokes M by a command like 'M arg1 arg2 arg3'
where arg1 does not start with a hyphen. Suppose one accidentally invokes
the debugger from the clisp prompt. Then M quits. If one instead invokes M
by 'M -- arg1 arg2 arg3' then in the situation above, then instead of
quiting, M invokes the debugger as desired.
So I make another try:
I suggest adding a new argument named ++ which, when given first in the
argument list, forces traditional command line parsing. So that e.g.
has the same effect as
clisp ++ -version
In other words, I suggest having a new argument named ++ which has the
opposite effect of --.
Then I suggest adding a :parse-options keyword such that the
(saveinitmem ... :parse-options nil)
lets the dumped executable have an understood -- and such that the
(saveinitmem ... :parse-options t)
lets the dumped executable have an understood ++.
The default for :parse-options should be t for backward compatibility.
Then for a saved memory dump M we would have
'M -- arg1 arg2 arg3' does no parsing of arguments
'M ++ arg1 arg2 arg3' does parsing of arguments
'M arg1 arg2 arg3' does what :parse-options said.
I case this is acceptable, I would be happy to develop a patch which
implements the change.