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

strange request



I am developing a mathematical software where it is
essential to have the maple like property that the
value of an unbound symbol is itself.

My parser parses a symbol into (var symbol) where
var is a macro that should do the right thing.

I thought I had the right solution with
(defmacro var (symbol)
  `(handler-case ,symbol
     (unbound-variable (cond)
       (declare (ignore cond))
       ',symbol)))

It works great but for one small problem.
If symbol is unbound the macro works just fine but the compiler
complains about an undeclared free variable symbol.

Is there a macro like (without-warnings expr) ???
Is there another solution to my problem ???
Help! I really need this to work!

Guillaume Cartier
LACIM, Universite du Quebec a Montreal.
Bureau: (514) 987-4290
E-Mail: cartier@math.uqam.ca