stream-advance-to-column not used
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
New
|
Undecided
|
Unassigned |
Bug Description
I define new subclass of fundamental-
SBCL user manual says "This is intended for use by by pprint and format ~T." about the method (actually, this looks copied out as-is from gray streams specification). I call (format (make-instance 'tab-stream) "~8T") on the new class and I expect the method to be called; however, spaces are written instead.
In the sources I have at hand (1.3.3), formatter expands "~T" to sb-format:
Observed on Windows with sbcl 1.3.3 as well as on Linux with sbcl 1.3.6, I can provide Linux uname and *features* at both if needed, but I do not think it is dependent on it.
Full test case:
(defclass tab-stream (sb-gray:
())
(defmethod sb-gray:
(break "Do advance column") ;; <- I expect this break to be invoked
t)
(defmethod sb-gray:
(format *standard-output* "Asked for column~%")
0)
(defmethod sb-gray:
;; Must be defined
(format *standard-output* "Out: ~:c~%" char))
format (make-instance 'tab-stream) "~8T")
=>
Asked for column
Out: Space
Out: Space
Out: Space
Out: Space
Out: Space
Out: Space
Out: Space
Out: Space
tags: | added: printer |