|
From: | Paul F. Dietz |
Subject: | Re: [Gcl-devel] Two Windows ANSI crash examples |
Date: | Thu, 08 Jan 2004 21:08:30 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031210 |
Camm Maguire wrote:
This works, but I was wondering whether there was a way in lisp to make *internal-error-parms* only visible inside this function, yet 'special'/persistent, i.e. like a static local variable in C.
You can do this: (defun clcs-universal-error-handler-generator () (let ((internal-error-parms ...)) #'(lambda (...) ...))) (eval-when (:load-toplevel) ;; I think (setf (symbol-function 'clcs-universal-error-handler) (clcs-universal-error-handler-generator))) (I think just wrapping a let around the defun does not work, due to constraints on compiling defuns that are not in the null lexical environment.) Paul
[Prev in Thread] | Current Thread | [Next in Thread] |