projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.9.13.36: global policy / null-lexenv confusion fix
[sbcl.git]
/
src
/
code
/
target-format.lisp
diff --git
a/src/code/target-format.lisp
b/src/code/target-format.lisp
index
91b8309
..
5a29fba
100644
(file)
--- a/
src/code/target-format.lisp
+++ b/
src/code/target-format.lisp
@@
-228,12
+228,16
@@
(prin1 (next-arg) stream)
(write-char (next-arg) stream)))))
(prin1 (next-arg) stream)
(write-char (next-arg) stream)))))
+;;; "printing" as defined in the ANSI CL glossary, which is normative.
+(defun char-printing-p (char)
+ (and (not (eql char #\Space))
+ (graphic-char-p char)))
+
(defun format-print-named-character (char stream)
(defun format-print-named-character (char stream)
- (let* ((name (char-name char)))
- (cond (name
- (write-string (string-capitalize name) stream))
- (t
- (write-char char stream)))))
+ (cond ((not (char-printing-p char))
+ (write-string (string-capitalize (char-name char)) stream))
+ (t
+ (write-char char stream))))
(def-format-interpreter #\W (colonp atsignp params)
(interpret-bind-defaults () params
(def-format-interpreter #\W (colonp atsignp params)
(interpret-bind-defaults () params