[Ecls-list] [BUG] defmacro and &environment

Tobias C. Rittweiler tcr at freebits.de
Sun Nov 29 14:41:19 UTC 2009


In a file foo.lisp:

  (defmacro m (x &environment e)
     (if (typep x 'foo e)
         :FOO
         :BAR))

ECL (Embeddable Common-Lisp) 9.12.1
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help.  
Top level.
> (compile-file "foo.lisp")

;;; Loading #P"/home/tcr/software/ecl-cvs/lib/ecl-9.12.1/cmp.fas"
;;; Loading #P"/home/tcr/software/ecl-cvs/lib/ecl-9.12.1/sysfun.lsp"
;;; Compiling foo.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;; Compiling (DEFMACRO M ...).
;;; Error: in file /tmp/foo.lisp, position 358, and form 
;;;   (FSET 'M #'(LAMBDA-BLOCK M # ...) ...)
;;; The macro form (TYPEP X 'FOO E) was not expanded successfully.
;;; Error detected:
;;; Too many arguments supplied to a macro or a destructuring-bind form.
NIL
T
T
 






More information about the ecl-devel mailing list