(let olddef def (mac def (name args . body) (if (acons name) `(def= ,(cadr name) ,args ,@body) `(,olddef ,name ,args ,@body))))
(I also hope that works -- I'm not at home and can't test it.)
Error: "Bad object in expression #3(tagged mac #<procedure>)"
-----
Here's a better definition:
(let olddef def (mac def (name args . body) (if (acons name) `(def= ,(cadr name) ,args ,@body) (apply (rep olddef) (cons name (cons args body))))))
Anyway, nice work, but damn do we need 1st-class macros.