Hello all,
Sorry for the delay, I got distracted by work, and then some
expandable floating point calculations. It would be great to
move on, and this means getting rid of the few places where
"\seq_elt:w" and "\seq_elt_end:" are still used explicitly.
Basically, I'd like to centralize the seq functions all into
l3seq. Right now, "\seq_elt:w" and "\seq_elt_end:" are used
in the following files (omitting test files).
Frank can probably help for the xor bundle.
===========
"xor/xo-place.dtx" defines "\seq_elt:w" to gobble its
argument in order to stop the current trial:
\cs_set_nopar:Npn \seq_elt:w ##1\seq_elt_end:{}
I think that we can replace each occurence of that by
<-trace> \seq_map_break:
<trace> \seq_map_break:n { \trace_pop:n{xor_check_callout_after:n} }
but I am not sure: the xor code is too complicated for me
right now, and I don't when the "\xor_check_callout_..."
functions are called.
===========
"xpackages/xor/xo-trace.dtx" is easy: the offending line is
\cs_set_nopar:Npn \seq_elt:w ##1\seq_elt_end:{##1\space}
and we can give that a name, e.g. put
\cs_new:Npn \seq_setup_display: {
\cs_set_nopar:Npn \seq_elt:w ##1\seq_elt_end:{##1\space} }
in l3seq, and use "\seq_setup_display:" in "xo-trace.dtx".
==========
"xpackages/xor/xo-or.dtx": two places. First,
\cs_set_nopar:Npn \seq_elt:w ##1\seq_elt_end: {##1,}
\cs_set_nopar:cpx {g_xor_flush_ \g_xor_collect_flush_seen_num
_classes_clist }
{\g_xor_float_classes_seq}
should be replaced by
\clist_set_from_seq:cN
{g_xor_flush_ \g_xor_collect_flush_seen_num _classes_clist }
\g_xor_float_classes_seq
adding \cs_generate_variant:Nn \clist_set_from_seq:NN {c} to "l3candidates.dtx".
Second, at two places, "\seq_elt:w" is let to "\relax" in order
to behave nicely under x expansion. The first one is
%%% FMi tmp
\cs_set_eq:NN \seq_elt:w \relax
\cs_set_eq:NN \seq_elt_end: \relax
\tl_gset:Nx \g_saved_float_state_tl
{ \cs_gset_nopar:Npn \exp_not:N \g_xor_floats_active_seq
{\g_xor_floats_active_seq} }
and can be replaced by
\tl_gset:Nx \g_saved_float_state_tl {
\cs_gset_nopar:Npn \exp_not:N \g_xor_floats_active_seq
\seq_exp_items:N \g_xor_floats_active_seq
}
where "\seq_exp_items:N" is not f-expandable, just x-expandable,
defined as
\cs_new:Npn \seq_exp_items:N #1 {
\exp_after:wN \seq_exp_items_aux:Nw #1
\q_recursion_tail \seq_elt_end: % no \seq_elt:w
\q_recursion_stop
}
\cs_new:Npn \seq_exp_items_aux:Nw #1 #2\seq_elt_end: {
\quark_if_recursion_tail_stop:N #1
\exp_not:N \seq_elt:w #2 \exp_not:N \seq_elt_end:
\seq_exp_items_aux:Nw
}
The second place can be converted to using the same "\seq_exp_items:N".
=========
Two more files,
l3in2e/l3prg.dtx (quicksort)
l3in2e/l3candidates.dtx (various fn)
but I looked at the functions there, and I can cope with
those easily, compared to the xor bundle.
========
Side comment: I found the following text in the doc of l3prg,
but I couldn't find the function it refers to.
% For the somewhat strange \meta{clist} type which doesn't
% enclose the items but uses a separator we define it by hand
% afterwards.
Best wishes,
Bruno
|