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

Bugged new-defmacro for KCl



Calling member on a list whose last cons is a dotted pair causes
an error in KCl, so the definition of new-defmacro in kcl-patches.lsp
makes those kinds of lambda-lists for macros impossible. Here's my
stupid little fix. (Actually the same problem occurs for find, butlast
etc. Has anyone fixed KCl so that this doesn't happen?)

(defun new-defmacro (form env)
  (let ((defmacro (car form))
	(name (cadr form))
	(ll (caddr form)) ;;params
	(body (cdddr form))
	(&env nil))
    (cond ((not (and (eq defmacro 'defmacro)
		     (symbolp name)
	***	     (null (cdr (last ll)))
	   	     (listp ll)))
	   ;; Something is wrong, but we'll pass the whole thing off
	   ;; to the real defmacro and let it detect the error and
	   ;; complain about it in its own way.
	   (funcall *defmacro* form env))

	   [...]
-Eliot