mes: simple-format: support ~A, ~S.

* module/mes/display.scm (simple-format): support ~A, ~S.
This commit is contained in:
Jan Nieuwenhuizen 2018-02-03 20:06:38 +01:00
parent d176d1bf6c
commit 3d93eea456

View file

@ -182,11 +182,15 @@
(simple-format (cdr lst) args)) (simple-format (cdr lst) args))
(let ((c (cadr lst))) (let ((c (cadr lst)))
(case c (case c
((#\A) (display (car args) port))
((#\a) (display (car args) port)) ((#\a) (display (car args) port))
((#\s) (write (car args) port))) ((#\S) (write (car args) port))
((#\s) (write (car args) port))
(else (display (car args) port)))
(simple-format (cddr lst) (cdr args))))))) (simple-format (cddr lst) (cdr args)))))))
(if destination (simple-format lst rest) (if destination (simple-format lst rest)
(with-output-to-string (with-output-to-string
(lambda () (simple-format lst rest)))))) (lambda () (simple-format lst rest))))))
(define format simple-format) (define format simple-format)