[luatex] Behavior of node lists.

Stephan Hennig mailing_list at arcor.de
Sat Nov 10 11:58:23 CET 2012


Am 09.11.2012 22:10, schrieb Hans Hagen:
> On 11/9/2012 9:22 PM, Stephan Hennig wrote:
> 
>> That is,
>>
>>    node.insert_after(nil, N, x)
>>
>> is not a short-cut for inserting after N, but returns x as new head?
> 
> no, it returns n as head as well as x:
> 
>    head, current = node.insert_after(nil,current,x)
> 
> boils down to
> 
>    head    = current
>    current = x


But this is in contrast to what the manual says.

| If head is initially nil, it will become new.


> so:
> 
>    head, current = node.insert_after(head,current,x)
> 
> becomes:
> 
>    head    = head or current or x
>    current = x

All valuable additions to the manual ...

Best regards,
Stephan Hennig



More information about the luatex mailing list