[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Quick question about lexically scoped defun...
Date: Fri, 8 Jul 88 13:43 PDT
Here is a scenario which you can try:
Command: (let ((x 0)) (defun bar () x))
You have attempted to define BAR in a non-null lexical environment using a form usually used at top level. It
references freely the variable X, which is bound by the lexical environment.
Do you want the definition to use the lexical environment? (Yes or No) Yes
Command: (defun si:enclose-top-level (lambda env name) env)
Warning: Function SI:ENCLOSE-TOP-LEVEL, being redefined,
was previously defined by file BD:>rel-7>sys>eval. OK? (Y, P, or N) Yes.
[All hell breaking loose deleted.]
>From a quick look at the source, it appears that the patch Hornig gave
you was incorrect. Try
(defun si:enclose-top-level1-environment0 (lambda env name) env)
Sorry for the confusion. Charlie's on vacation at the moment, otherwise
I'm sure this would have been corrected a lot sooner.