This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: *print-right-margin* ineffective for write


On 01/12/11 21:50, Per Bothner wrote:
On 11/30/2011 03:43 PM, Charles Turner wrote:
On 30/11/11 22:49, Charles Turner wrote:
A solution is to factor the <check printing environment> stuff out of
startLogicalBlock and call it from writePositionMarker.

That only works when printSharing is true.

Why? The checkPrintMargins is called from both startLogicalBlock and writePositionMarker, so the fluid lookups will be done both when checkSharing is true and when it's false I think.


In general we should have a set of actions that we perform at the start
and end of 'top-level" calls to write/display. Not just checking fluid
parameters, but also the initializing and clearing the ID hash for sharing,
for example.

(At list in Common Lisp you might have nested calls to write, and you
probably don't want these start/finish actions in those cases.)

How do I check whether I'm really a top-level call and not nested?


Checking queueSize == 0 && bufferFillPointer == 0 isn't very expensive,
and we should only do the fluid lookups when that condition is true. I
think.

Ok. I'll lift that check out of the checkPrintMargins method.


Charlie.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]