[ansi-test-devel] Local function binding shadows global macro

Sam Steingold sds at gnu.org
Thu Aug 25 21:51:10 UTC 2011


> * Erik Huelsmann <ruhryf at tznvy.pbz> [2011-08-25 23:09:05 +0200]:
>
> (defmacro var (name &optional value docs)
>    `(defparameter ,name ,@(when value (list value))))

(macroexpand-1 '(var foo))
==> 
(DEFPARAMETER FOO) ;
T

defparameter requires the second argument.

> (defun make-var (the-name))
>
> (defun foo (var-ref)
>   (flet ((var (x) (second x)))
>      `(make-var ,(var x))))

do you mean

(defun foo (var-ref)
  (flet ((var (x) (second x)))
     `(make-var ,(var var-ref))))

??

> Any ideas about translating this into a good test to be committed?

I am sorry, it is not clear what the code's intended behavior is.


-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 11.0.60900031
http://www.memritv.org http://openvotingconsortium.org http://pmw.org.il
http://palestinefacts.org http://mideasttruth.com http://thereligionofpeace.com
A PC without Windows is like ice cream without ketchup.




More information about the ansi-test-devel mailing list