X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fprimordial-extensions.lisp;h=e25ed15cf8932f2555afe854af0243d176a8cc74;hb=f8c8f81c3e10865a40ea6ceb79be0a045a6e6e4e;hp=95a70940787255f4d2843dada1cf7e861485e385;hpb=08d05510b51708853ca998154d8096b21d85edab;p=sbcl.git diff --git a/src/code/primordial-extensions.lisp b/src/code/primordial-extensions.lisp index 95a7094..e25ed15 100644 --- a/src/code/primordial-extensions.lisp +++ b/src/code/primordial-extensions.lisp @@ -259,7 +259,7 @@ dfd)) ;;; Give names to elements of a numeric sequence. -(defmacro defenum ((&key (prefix "") (suffix "") (start 0) (step 1)) +(defmacro defenum ((&key (start 0) (step 1)) &rest identifiers) (let ((results nil) (index 0) @@ -267,11 +267,11 @@ (step (eval step))) (dolist (id identifiers) (when id - (multiple-value-bind (root docs) + (multiple-value-bind (sym docs) (if (consp id) (values (car id) (cdr id)) (values id nil)) - (push `(def!constant ,(symbolicate prefix root suffix) + (push `(def!constant ,sym ,(+ start (* step index)) ,@docs) results)))