X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fprimordial-extensions.lisp;h=e25ed15cf8932f2555afe854af0243d176a8cc74;hb=baee4b0e353648e6f3e7a5826f462fec95df1738;hp=e28cb0e33fdb333bb2e56b590097d21a5fbe8ece;hpb=68664fcaa607ab61bc53bce1e9795622942135a4;p=sbcl.git diff --git a/src/code/primordial-extensions.lisp b/src/code/primordial-extensions.lisp index e28cb0e..e25ed15 100644 --- a/src/code/primordial-extensions.lisp +++ b/src/code/primordial-extensions.lisp @@ -131,16 +131,15 @@ (let ((block-name (when env (car (find-if #'car (sb!c::lexenv-blocks env)))))) (if block-name - (gensym (format nil "~A[~A]" name block-name)) - (gensym name)))) - + (sb!xc:gensym (format nil "~A[~A]" name block-name)) + (sb!xc:gensym name)))) ;;; Compile a version of BODY for all TYPES, and dispatch to the ;;; correct one based on the value of VAR. This was originally used ;;; only for strings, hence the name. Renaming it to something more ;;; generic might not be a bad idea. (defmacro string-dispatch ((&rest types) var &body body) - (let ((fun (gensym "STRING-DISPATCH-FUN-"))) + (let ((fun (sb!xc:gensym "STRING-DISPATCH-FUN"))) `(flet ((,fun (,var) ,@body)) (declare (inline ,fun)) @@ -260,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) @@ -268,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)))