[Openmcl-devel] "Smalltalk Model" related questions
gb at clozure.com
Tue Jun 1 21:52:52 EDT 2004
On Tue, 1 Jun 2004, Dan Knapp wrote:
> None of your questions, actually, are specific to OpenMCL. The
> following information holds for most Lisps.
> It is sometimes possible to retrieve the source code for a
> function by > using the standard, portable function
> function-lambda-expression, ie, (function-lambda-expression
> #'foo). However, implementations are permitted to discard the
> source code if it is inconvenient for them to keep it around,
> and most (all?) implementations discard it at the time a
> function is compiled.
OpenMCL will retain a function's lambda-expression if the value of
the special variable CCL:*SAVE-DEFINITIONS* is non-nil when the function's
compiled. COMPILE-FILE binds CCL:*SAVE-DEFINITIONS* to the value of
CCL:*FASL-SAVE-DEFINITIONS* on entry. (Uh, yes: this should be
Note that this controls whether or not FUNCTION-LAMBDA-EXPRESSION
returns a non-NIL first value; if it does, that first value is ... a
LAMBDA expression (what the reader passed to the compiler or COMPILE's
second argument.) The other sense in which a function's "source code"
can be accessed is by retaining information about what source file
(and possibly location information within that source file) and making
that available to the development environment, and most Emacsy-Lispy
development environments usually make that functionality available via
the "meta-." key binding.
More information about the Openmcl-devel