X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fparse-defmacro.lisp;h=a4eb1bcca8d24fa5443ccc99382c6bd16278122d;hb=28d9bb7a509695caaf78d647b6aa1b0f02c0e83a;hp=8ee93ec437159a403c90e24e1fad72d8ff615197;hpb=de201aeb12169d0bd377eca4da6116c2797a66ad;p=sbcl.git diff --git a/src/code/parse-defmacro.lisp b/src/code/parse-defmacro.lisp index 8ee93ec..a4eb1bc 100644 --- a/src/code/parse-defmacro.lisp +++ b/src/code/parse-defmacro.lisp @@ -27,9 +27,9 @@ (defvar *ignorable-vars*) (declaim (type list *ignorable-vars*)) -;;; Return, as multiple-values, a body, possibly a declare form to put where -;;; this code is inserted, the documentation for the parsed body, and bounds -;;; on the number of arguments. +;;; Return, as multiple values, a body, possibly a declare form to put +;;; where this code is inserted, the documentation for the parsed +;;; body, and bounds on the number of arguments. (defun parse-defmacro (lambda-list arg-list-name body name error-kind &key (anonymousp nil) @@ -61,7 +61,7 @@ maximum))))) ;;; partial reverse-engineered documentation: -;;; TOP-LEVEL is true for calls through PARSE-DEFMACRO from DEFSETF and +;;; TOPLEVEL is true for calls through PARSE-DEFMACRO from DEFSETF and ;;; DESTRUCTURING-BIND, false otherwise. ;;; -- WHN 19990620 (defun parse-defmacro-lambda-list (possibly-dotted-lambda-list @@ -70,13 +70,13 @@ error-kind error-fun &optional - top-level + toplevel env-illegal env-arg-name) (let* (;; PATH is a sort of pointer into the part of the lambda list we're ;; considering at this point in the code. PATH-0 is the root of the ;; lambda list, which is the initial value of PATH. - (path-0 (if top-level + (path-0 (if toplevel `(cdr ,arg-list-name) arg-list-name)) (path path-0) ; (will change below) @@ -110,7 +110,7 @@ ((eq var '&environment) (cond (env-illegal (error "&ENVIRONMENT is not valid with ~S." error-kind)) - ((not top-level) + ((not toplevel) (error "&ENVIRONMENT is only valid at top level of ~ lambda-list."))) (cond ((and (cdr rest-of-args) (symbolp (cadr rest-of-args))) @@ -206,13 +206,13 @@ `(list-of-length-at-least-p ,path-0 ,minimum) `(proper-list-of-length-p ,path-0 ,minimum ,maximum)) ,(if (eq error-fun 'error) - `(do-arg-count-error ',error-kind ',name ,path-0 - ',lambda-list ,minimum - ,(unless restp maximum)) - `(,error-fun 'defmacro-ll-arg-count-error + `(arg-count-error ',error-kind ',name ,path-0 + ',lambda-list ,minimum + ,(unless restp maximum)) + `(,error-fun 'arg-count-error :kind ',error-kind ,@(when name `(:name ',name)) - :argument ,path-0 + :args ,path-0 :lambda-list ',lambda-list :minimum ,minimum ,@(unless restp