the method is not one of the generic functions' methods.
** objects declared as MEMBER types can be admissible arguments to
structure accessors.
+ ** printing characters should simply be printed by the FORMAT ~:C
+ directive.
changes in sbcl-0.9.11 relative to sbcl-0.9.10:
* new platform: experimental support for SBCL x86/Darwin, including
(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)
- (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
(with-test (:name (:print-readable :character :iso-8859-1))
(test-readable-character (code-char #xfffe) :iso-8859-1))
+(assert (string= (eval '(format nil "~:C" #\a)) "a"))
+(assert (string= (format nil (formatter "~:C") #\a) "a"))
;;; success
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.11.2"
+"0.9.11.3"