sailormoontw@gmail.com <sailormoontw@gmail.com> wrote:
+---------------
| Michal Krupka �g�D�G
|
| > (flet ((b () "a2")) (b))
| > is better
| I see, but what I want is replacing the current definition of a
| pre-defined function, that's why I use flet with a.
+---------------
In ANSI CL[1], functions are scoped lexically, not dynamically.
-Rob
[1] Yes, I am aware of the thread on "dynamically scoped functions"
and "DFLET" we had here several years ago [Google should have it,
start with <news:costanza-65382E.21360723042003@news.netcologne.de>],
but many of the proposals for adding dynamically scoped functions
discussed there required that the functions to be shadowed be
defined originally with some idiosyncratic macro, *not* CL:DEFUN.
And it certainly wouldn't work to shadow some function that had
been compiled (with CL:DEFUN) in a separate compilation unit,
since it might have been silently inlined in various places.
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607