All Manuals > LispWorks® User Guide and Reference Manual > 7 Dspecs: Tools for Handling Definitions

7.6 Subfunction dspecs

For some purposes, most usefully trace and defadvice, LispWorks allows dspecs that do not name a global definition, but a local function. These are of the form:

(subfunction sub-name parent-dspec)

where parent-dspec is another dspec (possibly a subfunction dspec itself). For flet and labels, it is also possible to use the form:

(flet sub-name parent-dspec)

An alias for (subfunction (flet sub-name) parent-dspec).

or:

(labels sub-name parent-dspec)

An alias for (subfunction (labels sub-name) parent-dspec).

sub-name is the name of the subfunction inside the parent, which by default is determined as follows:

You can override the default name by using the LispWorks-specific hcl:lambda-name declaration (see declare). Note that you should use the form:

(declare (lambda-name (subfunction sub-name))

to get a name that is useful for debugging. If you do not use subfunction, then the debugger cannot find the source for function.

Notes:


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:19