[Ecls-list] Maxima + ECL

Robert Dodier robert.dodier at gmail.com
Sun Jan 13 16:17:38 UTC 2008

On 1/13/08, Juan Jose Garcia-Ripoll
<juanjose.garciaripoll at googlemail.com> wrote:

> In particular one needs reproducible cases. ECL reads perfectly fine
> the symbol ".n." when I type it, how and when does this happen?

Here is the macro DEFMFUN (slightly abbreviated) from Maxima.

(defmacro defmfun (function &body  rest &aux .n.)
  (cond ((and (car rest) (symbolp (car rest)))
         ;;old maclisp narg syntax
         (setq .n. (car rest))
         (setf (car rest)
               `(&rest narg-rest-argument &aux (, .n. (length
    (defun ,function . ,rest)))

Here is what I get in a fresh ECL session. /tmp/defmfun.lisp contains
just the macro definition shown above.

> (load "/tmp/defmfun.lisp")
;;; Loading "/tmp/defmfun.lisp"
> (macroexpand '(defmfun foo n (print (arg 0))))
The variable N. is unbound.
Broken at EVAL.No restarts available.
Broken at DEFMFUN.

Now if I change the symbol .n. to ecl-foo-.n. then I see this:

> (macroexpand '(defmfun foo n (print (arg 0))))
   (PRINT (ARG 0))))

... which is to be expected.

Thanks for your help,


More information about the ecl-devel mailing list