X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fmacros.lisp;h=f7ddd36ac253ef78443a7fe490e6365771451c5b;hb=e0814eee6f6dea52db010b45a330100f2fe65832;hp=61a6d4473277788120a46a78eb2c7ddeb270e81b;hpb=872175cd9cb5b4966a36d4bd92421cc407a0355b;p=sbcl.git diff --git a/src/code/macros.lisp b/src/code/macros.lisp index 61a6d44..f7ddd36 100644 --- a/src/code/macros.lisp +++ b/src/code/macros.lisp @@ -31,8 +31,8 @@ some locations known to SETF, starting over with test-form. Returns NIL." `(do () (,test-form) (assert-error ',test-form ',places ,datum ,@arguments) - ,@(mapcar #'(lambda (place) - `(setf ,place (assert-prompt ',place ,place))) + ,@(mapcar (lambda (place) + `(setf ,place (assert-prompt ',place ,place))) places))) (defun assert-prompt (name value) @@ -91,7 +91,7 @@ (defun sb!c::%defconstant (name value doc) (unless (symbolp name) (error "The constant name is not a symbol: ~S" name)) - (about-to-modify name) + (about-to-modify-symbol-value name) (when (looks-like-name-of-special-var-p name) (style-warn "defining ~S as a constant, even though the name follows~@ the usual naming convention (names like *FOO*) for special variables" @@ -105,8 +105,8 @@ the usual naming convention (names like *FOO*) for special variables" ;; want bindings which are constant in some sense other than ;; EQL, I suggest either just using DEFVAR (which is usually ;; appropriate, despite the un-mnemonic name), or defining - ;; something like SB-INT:DEFCONSTANT-EQX (which is occasionally - ;; more appropriate). -- WHN 2000-11-03 + ;; something like the DEFCONSTANT-EQX macro used in SBCL (which + ;; is occasionally more appropriate). -- WHN 2001-12-21 (unless (eql value (info :variable :constant-value name)) (cerror "Go ahead and change the value." @@ -128,7 +128,6 @@ the usual naming convention (names like *FOO*) for special variables" ;; will be cross-compiled correctly. #-sb-xc-host (setf (symbol-value name) value) #+sb-xc-host (progn - (/show (symbol-package name)) ;; Redefining our cross-compilation host's CL symbols ;; would be poor form. ;; @@ -177,8 +176,8 @@ the usual naming convention (names like *FOO*) for special variables" ;; 2001-03-24 (eval `(defconstant ,name ',value)))) - (setf (info :variable :kind name) :constant) - (setf (info :variable :constant-value name) value) + (setf (info :variable :kind name) :constant + (info :variable :constant-value name) value) name) ;;;; DEFINE-COMPILER-MACRO @@ -199,7 +198,7 @@ the usual naming convention (names like *FOO*) for special variables" :environment environment) (let ((def `(lambda (,whole ,environment) ,@local-decs - (block ,(function-name-block-name name) + (block ,(fun-name-block-name name) ,body)))) `(sb!c::%define-compiler-macro ',name #',def ',lambda-list ,doc))))) (defun sb!c::%define-compiler-macro (name definition lambda-list doc) @@ -438,24 +437,9 @@ the usual naming convention (names like *FOO*) for special variables" #!+sb-doc "DECLAIM Declaration* Do a declaration or declarations for the global environment." - #-sb-xc-host `(eval-when (:compile-toplevel :load-toplevel :execute) - ,@(mapcar #'(lambda (x) - `(sb!xc:proclaim ',x)) - specs)) - ;; KLUDGE: The definition above doesn't work in the cross-compiler, - ;; because UNCROSS translates SB!XC:PROCLAIM into CL:PROCLAIM before - ;; the form gets executed. Instead, we have to explicitly do the - ;; proclamation at macroexpansion time. -- WHN ca. 19990810 - ;; - ;; FIXME: Maybe we don't need this special treatment any more now - ;; that we're using DEFMACRO-MUNDANELY instead of DEFMACRO? - #+sb-xc-host (progn - (mapcar #'sb!xc:proclaim specs) - `(progn - ,@(mapcar #'(lambda (x) - `(sb!xc:proclaim ',x)) - specs)))) + ,@(mapcar (lambda (spec) `(sb!xc:proclaim ',spec)) + specs))) (defmacro-mundanely print-unreadable-object ((object stream &key type identity) &body body) @@ -464,7 +448,7 @@ the usual naming convention (names like *FOO*) for special variables" code in BODY to provide possible further output." `(%print-unreadable-object ,object ,stream ,type ,identity ,(if body - `#'(lambda () ,@body) + `(lambda () ,@body) nil))) (defmacro-mundanely ignore-errors (&rest forms)