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

Re: format on buffer



At  4:04 PM 12/18/93 -0500, Michael Burks wrote:
>Excerpts from internet.listserv.info-mcl: 18-Dec-93 format on buffer by
>Mathieu Lafourcade@imag.
>> Hi lispers,
>>
>> I am looking for a format like function working on buffer. The main idea is
>> to be able to construct text exactly as with format (with the same
>> formating options) but inside a buffer. That way it is possible to keep
>> style unmodified and perhaps being more efficent than just with plain
>> strings (the main purpose of buffer is to be more efficent than string, no
>> ???).
>>
>> If someone has any pointers
>>
>> Thank you in adavance.
>>
>
>Why don't you just pass the result of (format nil
>"asdkfjahsldkfjhasldkjf") to the standard insert functions?

FRED-DIALOG-ITEM & FRED-WINDOW instances are output streams, hence
you can call format on one of them:

(defparameter *v* (make-instance 'fred-dialog-item))

(format *v* "Hello there~%Here are three lines~%of text")

(make-instance 'window
  :view-subviews (list *v*))

As to whether output to a buffer is more efficient than output to a
string, I don't know, you'll have to time it.