X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fmacros.lisp;h=4ef3dc0a749993e3f7f7ad6db16dacf4e60a5db2;hb=dd357f3be290498fb7ef172696d986337f517a93;hp=7e7783aedaf1c6f4f9f4d11d4bd76ff500e7e86a;hpb=22b819c0cd0ca0ea5be52ba280b9e9e0b8e86210;p=sbcl.git diff --git a/src/code/macros.lisp b/src/code/macros.lisp index 7e7783a..4ef3dc0 100644 --- a/src/code/macros.lisp +++ b/src/code/macros.lisp @@ -133,8 +133,7 @@ :environment environment) (let ((def `(lambda (,whole ,environment) ,@local-decs - (block ,(fun-name-block-name name) - ,body))) + ,body)) (debug-name (debug-namify "DEFINE-COMPILER-MACRO ~S" name))) `(eval-when (:compile-toplevel :load-toplevel :execute) (sb!c::%define-compiler-macro ',name @@ -320,7 +319,8 @@ ;;;; WITH-FOO i/o-related macros (defmacro-mundanely with-open-stream ((var stream) &body forms-decls) - (multiple-value-bind (forms decls) (parse-body forms-decls nil) + (multiple-value-bind (forms decls) + (parse-body forms-decls :doc-string-allowed nil) (let ((abortp (gensym))) `(let ((,var ,stream) (,abortp t)) @@ -339,7 +339,8 @@ (defmacro-mundanely with-input-from-string ((var string &key index start end) &body forms-decls) - (multiple-value-bind (forms decls) (parse-body forms-decls nil) + (multiple-value-bind (forms decls) + (parse-body forms-decls :doc-string-allowed nil) ;; The ONCE-ONLY inhibits compiler note for unreachable code when ;; END is true. (once-only ((string string)) @@ -364,16 +365,18 @@ ,@(when index `((setf ,index (string-input-stream-current ,var))))))))) -(defmacro-mundanely with-output-to-string ((var &optional string) - &body forms-decls) - (multiple-value-bind (forms decls) (parse-body forms-decls nil) +(defmacro-mundanely with-output-to-string + ((var &optional string &key (element-type ''character)) + &body forms-decls) + (multiple-value-bind (forms decls) + (parse-body forms-decls :doc-string-allowed nil) (if string `(let ((,var (make-fill-pointer-output-stream ,string))) ,@decls (unwind-protect (progn ,@forms) (close ,var))) - `(let ((,var (make-string-output-stream))) + `(let ((,var (make-string-output-stream :element-type ,element-type))) ,@decls (unwind-protect (progn ,@forms)