$Revision: 5.0.2.4 $
Package: TOP-LEVEL
Arguments: (name args &rest body)
This macro is used to define top-level aliases. The syntax of top-level:alias
is similar to that of defun, and body can be anything acceptable
in the body of a lambda expression. name can be a string or a list of a string
and options. The string is the name of the top-level alias. If (string option*)
is used, the options are (either or both may be specified) the keyword :case-sensitive
and the integer abbreviation index.
If the :case-sensitive
option is chosen, the arguments will be read in
case-sensitive mode without regard to the current reader mode. This option is most
appropriate when the argument is a filename. Case-sensitivity is fully described in case.htm.
If an abbreviation index is supplied, it must be an integer which is interpreted as an index into the string specified by string. This index identifies the shortest substring which will stand for the entire command. Note that string indexing is zero-based. For example,
("load" 1)
specifies that lo and loa are valid abbreviations for load, while
("load" 0)
specifies l as well. Note that it is possible that the same substring will be common to more than one command. In that case, the substring calls the most recently defined command. However, no warning is printed when a command is defined that leads to such a conflict.
args is the list of formal parameters to the alias, and has the same form as the formal list of a lambda expression.
An alias can also be defined with setf, in the following way:
(setf (top-level:alias "foo")
#'(lambda (arg) (format t "foo: arg is ~s~%"
arg)))
That form has the same effect as:
(top-level:alias "foo" (arg) (format t "foo: arg is
~s~%" arg))
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 10.0 Minimal top levels in
building_images.htm for information on minimal
top levels.
An alias can be removed with tpl:remove-alias. See top_level.htm for more information on the top level.
The general documentation description is in introduction.htm. The index in index.htm.
Copyright (C) 1998-1999, Franz Inc., Berkeley, CA. All Rights Reserved.