Am Mon, 2 Jan 2012 14:27:52 +0000 schrieb Joseph Wright:

>> Well I thought about 
>>   \hbox_unpack_clear:N\c_empty_box  
>> (as the documentation of source3 says that \hbox_unpack_clear:N is
>> \unhbox).
>> And as I can see l3galley uses 
>>   \tex_unhbox:D \c_empty_box.
>> Is there any real difference between the three variants?
> Must be an older version of l3galley: that version is not in the SVN.
> As you say, \hbox_unpack_clear:N = \unhbox while \hbox_unpack:N =
> \unhcopy. I'd prefer the latter as nothing should be modifying a
> constant (\c_...), even though here it would make no difference.

OK this sound convincing. I will use \hbox_unpack:N. 

>> And is the name in l3galley "\galley_leave_vmode:" stable? I would
>> prefer a standard command instead of my own local
>> \leavemode-command. \leavemode is imho such a central concept that
>> it should have a standard name. 
> There are two slightly separate concepts here (I think - Frank may
> correct me). One is the need in the galley mode to leave vertical mode,
> and the other is the more general case of 'some arbitrary command'. The
> galley has to work a particular way, and it therefore may on occasion do
> it's own thing. So I suspect that \galley_... is not the right place for
> a general 'ensure we are not in vertical mode' function.
> That leaves the question of where /is/ the right place. One obvious
> suggestion is \mode_leave_vertical: or \mode_ensure_not_vertical: (the
> latter is a bit awkward if more accurate).

The first location where I searched for mode-switching commands was
l3prg. But it only contained command to check the mode, not to
switch it. (Imho beside \leavevmode also a variant of \@ensuredmath
would be a good idea.) 

Ulrike Fischer