X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Flate-format.lisp;h=3d821ad0fa16da28601a0500fea0468ab02301ae;hb=22c1de0a40df83bb5628974010a879cb2c17ff53;hp=bc1cfe4ec7c5c1c35696eea639f1956ebe2d3f5b;hpb=4d50265fe5a3dd4ea5b35c8ec12fe2b88721d22c;p=sbcl.git diff --git a/src/code/late-format.lisp b/src/code/late-format.lisp index bc1cfe4..3d821ad 100644 --- a/src/code/late-format.lisp +++ b/src/code/late-format.lisp @@ -222,6 +222,7 @@ (char-code (format-directive-character directive)))) (*default-format-error-offset* (1- (format-directive-end directive)))) + (declare (type (or null function) expander)) (if expander (funcall expander directive more-directives) (error 'format-error @@ -326,7 +327,7 @@ (values (progn ,@body-without-decls) ,directives)))) -(eval-when (:compile-toplevel :load-toplevel :execute) +(eval-when (#-sb-xc :compile-toplevel :load-toplevel :execute) (defun %set-format-directive-expander (char fn) (setf (aref *format-directive-expanders* (char-code (char-upcase char))) fn) @@ -976,7 +977,7 @@ close params string end) (expand-format-logical-block prefix per-line-p insides suffix atsignp)) - (let ((count (apply #'+ (mapcar (lambda (x) (count-if #'illegal-inside-justification-p x)) segments)))) + (let ((count (reduce #'+ (mapcar (lambda (x) (count-if #'illegal-inside-justification-p x)) segments)))) (when (> count 0) ;; ANSI specifies that "an error is signalled" in this ;; situation. @@ -1116,7 +1117,8 @@ (block nil ,@(let ((*expander-next-arg-macro* 'expander-pprint-next-arg) (*only-simple-args* nil) - (*orig-args-available* t)) + (*orig-args-available* + (if atsignp *orig-args-available* t))) (expand-directive-list insides))))))) (defun expand-format-justification (segments colonp atsignp first-semi params)