X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Flate-format.lisp;h=2024d07f5536a7eae03674895474b31ef2c80925;hb=d720bc359f03734ccb9baf66cb45dc01d623f369;hp=5315b249806543ee9db35864438ddd31bc47ba14;hpb=c0578d9893429c9c0da80ea5920360e4621fddab;p=sbcl.git diff --git a/src/code/late-format.lisp b/src/code/late-format.lisp index 5315b24..2024d07 100644 --- a/src/code/late-format.lisp +++ b/src/code/late-format.lisp @@ -279,8 +279,7 @@ (let ((char (format-directive-character directive))) (typecase char (base-char - (aref *format-directive-expanders* (char-code char))) - (character nil)))) + (aref *format-directive-expanders* (sb!xc:char-code char)))))) (*default-format-error-offset* (1- (format-directive-end directive)))) (declare (type (or null function) expander)) @@ -389,13 +388,13 @@ (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) + (let ((code (sb!xc:char-code (char-upcase char)))) + (setf (aref *format-directive-expanders* code) fn)) char) (defun %set-format-directive-interpreter (char fn) - (setf (aref *format-directive-interpreters* - (char-code (char-upcase char))) - fn) + (let ((code (sb!xc:char-code (char-upcase char)))) + (setf (aref *format-directive-interpreters* code) fn)) char) (defun find-directive (directives kind stop-at-semi) @@ -603,9 +602,10 @@ (if params (expand-bind-defaults ((count 1)) params `(progn - (fresh-line stream) - (dotimes (i (1- ,count)) - (terpri stream)))) + (when (plusp ,count) + (fresh-line stream) + (dotimes (i (1- ,count)) + (terpri stream))))) '(fresh-line stream))) (def-format-directive #\| (colonp atsignp params)