[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Toplevel lexical variables



(DEFUN A ()                         (DEFUN B ()
   (LET ((X 1))                        (LET ((X 1))
      (DEFUN F () X)                      (SETF (SYMBOL-FUNCTION 'F)
						#'(LAMBDA () X))
      (DEFUN G (Y) (SETQ X Y))))          (SETF (SYMBOL-FUNCTION 'G)
						#'(LAMBDA (Y) (SETQ X Y)))))

I think definition B above would provide the behavior you desire and
skirt the issue of compiling DEFUN as other than a top-level form;
hence I believe it to be more portable.
--Christopher

P.S. My apologies to the list if this is so obvious that it doesn't
bear stating.
-------