do-command

Function

Package: top-level

Arguments: name &rest args

This function allows the execution of top-level commands from programs. It hides the method of dispatch for top-level commands, and should be the sole means of accessing top-level commands outside typing them to the top-level read-eval-print loop.

name must be a string or symbol naming a top-level command. An error is signaled if it is not. args are the arguments that are passed to the command.

For example, the form

(tpl:do-command "history":reverse t)

will print the command history in reverse order, just like

:history :reverse t

When Lisp is starting up, information necessary or environment necessary to process many top-level commands is not available while initialization files (such as .clinit.cl, clinit.cl, and sys:siteinit.cl) are being read. Therefore, using this function to call those top-level commands from within initialization files may cause an error (perhaps an unrecoverable error). Among the commands that are known to fail are :zoom and its relatives. We recommend that you do not call any top-level commands in initialization files.

This operator is not available in Lisp images built with a minimal top level, that is built with the include-tpl argument to build-lisp-image specified nil. See Minimal top levels in building-images.htm for information on minimal top levels.

See top-level.htm for more information on the top level.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.