Re: Symbol substitution in macro

2010-08-04 Thread Andrew Boekhoff
Hi, because the symbol's namespace is then nil, and you still can't tell if they're shadowing it with a let binding, or have renamed it with :as. If the namespace is nil then its either been :used or :required. You could check ns-refers to see if its been :used. If its been shadowed the

Re: Symbol substitution in macro

2010-08-04 Thread Kyle Schaffrick
On Wed, 4 Aug 2010 14:58:46 -0400 Andrew Boekhoff boekho...@gmail.com wrote: Hi, because the symbol's namespace is then nil, and you still can't tell if they're shadowing it with a let binding, or have renamed it with :as. If the namespace is nil then its either been :used or

Re: Symbol substitution in macro

2010-08-03 Thread Kyle Schaffrick
On Mon, 2 Aug 2010 07:23:12 -0400 Andrew Boekhoff boekho...@gmail.com wrote: On Sunday 01 August 2010 21:34:16 Kyle Schaffrick wrote: Hello, I'm trying to write a library with two main parts. The first is a macro, I'll call it 'with-feature, that walks through forms passed inside it,

Re: Symbol substitution in macro

2010-08-02 Thread Andrew Boekhoff
On Sunday 01 August 2010 21:34:16 Kyle Schaffrick wrote: Hi, The following technique seems to work for finding out if you've been aliased: (ns somewhere.trial) (let [here *ns*] (defmacro whats-my-name [] (some (fn [[k v]] (when (= here v) `(quote ~k))) (ns-aliases

Symbol substitution in macro

2010-08-01 Thread Kyle Schaffrick
Hello, I'm trying to write a library with two main parts. The first is a macro, I'll call it 'with-feature, that walks through forms passed inside it, and any time it sees a call to another function in my library, 'feature, do some transformations. The problem I'm concerned about is as follows:

Re: Symbol substitution in macro

2010-08-01 Thread Heinz N. Gies
On Aug 2, 2010, at 3:34 , Kyle Schaffrick wrote: Hello, I'm trying to write a library with two main parts. The first is a macro, I'll call it 'with-feature, that walks through forms passed inside it, and any time it sees a call to another function in my library, 'feature, do some