I was fooling around when I came across an unexpected (to me) bug/feature. I wrote something like the following: (def trivial-example (obj key)
(obj key)) I expected that the global binding of obj would be shadowed, and so I'd end up looking up the value of key in obj. However, ac.scm always looks at global bindings when considering whether a symbol is a macro. Of course, changing 'obj' to 'ob' solves the problem, but it still seems to me that in a lisp-1, a lexical binding should always shadow a global binding, regardless of what's being bound. I made a few hacks to ac.scm to assume that any lexically bound symbol isn't a macro: http://twilightsentry.org/pub/ac.scm Or maybe there's a perfectly good reason for macros to act as they do now and I just don't see it. |