Collect unprocessed command-line arguments in EXT:*COMMAND-LINE-ARGUMENT-LIST*.

Contributed by Dennis Lambe Jr.
parent db7dddcc
......@@ -211,10 +211,13 @@ public final class Interpreter
}
// Check for --noinit; verify that arguments are supplied for --load and
// --eval options.
// --eval options. Copy all unrecognized arguments into
// ext:*command-line-argument-list*
private static void preprocessCommandLineArguments(String[] args)
{
LispObject arglist = NIL;
if (args != null) {
for (int i = 0; i < args.length; ++i) {
String arg = args[i];
......@@ -239,9 +242,13 @@ public final class Interpreter
System.err.println("No argument supplied to --load");
System.exit(1);
}
} else {
arglist = new Cons(args[i], arglist);
}
}
}
_COMMAND_LINE_ARGUMENT_LIST_.setSymbolValue(arglist);
}
// Do the --load and --eval actions.
......
......@@ -2566,6 +2566,10 @@ public final class Lisp
public static final Symbol _SAVED_BACKTRACE_ =
exportSpecial("*SAVED-BACKTRACE*", PACKAGE_EXT, NIL);
// ### *command-line-argument-list*
public static final Symbol _COMMAND_LINE_ARGUMENT_LIST_ =
exportSpecial("*COMMAND-LINE-ARGUMENT-LIST*", PACKAGE_EXT, NIL);
// ### *batch-mode*
public static final Symbol _BATCH_MODE_ =
exportSpecial("*BATCH-MODE*", PACKAGE_EXT, NIL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment