[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

formatting text



In specializing the generic function print-object, I use a function
indent shown below. The mention of the trap #_MoveTo by Bill St. Clair
in response to another question reminded me how inefficient indent
appears to be.

(defun indent (*indentation* stream)
  (format stream "~&")
  (let ((indentation ""))
    (dotimes (count *indentation*)
      (setf indentation (concatenate 'string indentation " ")))
    (format stream indentation)))


(with-focused-view stream
  (#_MoveTo *indentation* (point-v (view-position stream))))

doesn't indent at all (when followed by a format stream "...

Suggestions would be appreciated.


Sheldon S. Ball
BALLS@ccc.medcolpa.edu