[latex3-commits] [latex3/latex3] main: Save two internal variants (b5650a8e0)
github at latex-project.org
github at latex-project.org
Sat Feb 3 20:39:38 CET 2024
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/b5650a8e031a0d2e2d97027b26e9718e0074440b
>---------------------------------------------------------------
commit b5650a8e031a0d2e2d97027b26e9718e0074440b
Author: Yukai Chou <muzimuzhi at gmail.com>
Date: Sun Feb 4 00:09:10 2024 +0800
Save two internal variants
`\__coffin_(g)set_pole:Nnn` is always used as `Nne` forms. By moving the `e`-type
expansion to `\prop_put:cn(n->e)`, `\__coffin_(g)set_pole:Nnn` are implemented
more like friends `\coffin_(g)set_vertical_pole:Nnn`, which already use
`\prop_put:cne`.
>---------------------------------------------------------------
b5650a8e031a0d2e2d97027b26e9718e0074440b
l3kernel/l3coffins.dtx | 26 ++++++++++++--------------
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/l3kernel/l3coffins.dtx b/l3kernel/l3coffins.dtx
index df7c0488f..71ebd8ac0 100644
--- a/l3kernel/l3coffins.dtx
+++ b/l3kernel/l3coffins.dtx
@@ -715,13 +715,13 @@
\cs_new_protected:Npn \vcoffin_set:Nnn #1#2#3
{
\@@_set_vertical:NnnNNN #1 {#2} {#3}
- \vbox_set:Nn \coffin_reset_poles:N \@@_set_pole:Nne
+ \vbox_set:Nn \coffin_reset_poles:N \@@_set_pole:Nnn
}
\cs_generate_variant:Nn \vcoffin_set:Nnn { c }
\cs_new_protected:Npn \vcoffin_gset:Nnn #1#2#3
{
\@@_set_vertical:NnnNNN #1 {#2} {#3}
- \vbox_gset:Nn \coffin_greset_poles:N \@@_gset_pole:Nne
+ \vbox_gset:Nn \coffin_greset_poles:N \@@_gset_pole:Nnn
}
\cs_generate_variant:Nn \vcoffin_gset:Nnn { c }
\cs_new_protected:Npn \@@_set_vertical:NnnNNN #1#2#3#4#5#6
@@ -812,14 +812,14 @@
{
\@@_set_vertical:NnNNNNNw #1 {#2} \vbox_set:Nw
\vcoffin_set_end:
- \vbox_set_end: \coffin_reset_poles:N \@@_set_pole:Nne
+ \vbox_set_end: \coffin_reset_poles:N \@@_set_pole:Nnn
}
\cs_generate_variant:Nn \vcoffin_set:Nnw { c }
\cs_new_protected:Npn \vcoffin_gset:Nnw #1#2
{
\@@_set_vertical:NnNNNNNw #1 {#2} \vbox_gset:Nw
\vcoffin_gset_end:
- \vbox_gset_end: \coffin_greset_poles:N \@@_gset_pole:Nne
+ \vbox_gset_end: \coffin_greset_poles:N \@@_gset_pole:Nnn
}
\cs_generate_variant:Nn \vcoffin_gset:Nnw { c }
\cs_new_protected:Npn \@@_set_vertical:NnNNNNNw #1#2#3#4#5#6#7
@@ -989,7 +989,7 @@
% \coffin_gset_vertical_pole:Nnn, \coffin_gset_vertical_pole:cnn
% }
% \begin{macro}{\@@_set_vertical_pole:NnnN}
-% \begin{macro}{\@@_set_pole:Nnn, \@@_set_pole:Nne, \@@_gset_pole:Nnn, \@@_gset_pole:Nne}
+% \begin{macro}{\@@_set_pole:Nnn, \@@_gset_pole:Nnn}
% Setting the pole of a coffin at the user/designer level requires a
% bit more care. The idea here is to provide a reasonable interface to
% the system, then to do the setting with full expansion. The
@@ -1033,16 +1033,14 @@
}
\cs_new_protected:Npn \@@_set_pole:Nnn #1#2#3
{
- \prop_put:cnn { coffin ~ \@@_to_value:N #1 ~ poles }
+ \prop_put:cne { coffin ~ \@@_to_value:N #1 ~ poles }
{#2} {#3}
}
-\cs_generate_variant:Nn \@@_set_pole:Nnn { Nne }
\cs_new_protected:Npn \@@_gset_pole:Nnn #1#2#3
{
- \prop_gput:cnn { coffin ~ \@@_to_value:N #1 ~ poles }
+ \prop_gput:cne { coffin ~ \@@_to_value:N #1 ~ poles }
{#2} {#3}
}
-\cs_generate_variant:Nn \@@_gset_pole:Nnn { Nne }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2074,7 +2072,7 @@
\tl_if_in:nnTF {#2} { - }
{ \tl_set:Nn \l_@@_internal_tl { {#2} } }
{ \tl_set:Nn \l_@@_internal_tl { { #1 - #2 } } }
- \exp_last_unbraced:NNo \@@_set_pole:Nne \l_@@_aligned_coffin
+ \exp_last_unbraced:NNo \@@_set_pole:Nnn \l_@@_aligned_coffin
{ \l_@@_internal_tl }
{
{ \dim_use:N \l_@@_x_dim } { \dim_use:N \l_@@_y_dim }
@@ -2136,11 +2134,11 @@
{
\dim_compare:nNnTF {#2} < {#6}
{
- \@@_set_pole:Nne #9 { T }
+ \@@_set_pole:Nnn #9 { T }
{ { 0pt } {#6} { 1000pt } { 0pt } }
}
{
- \@@_set_pole:Nne #9 { T }
+ \@@_set_pole:Nnn #9 { T }
{ { 0pt } {#2} { 1000pt } { 0pt } }
}
}
@@ -2148,11 +2146,11 @@
{
\dim_compare:nNnTF {#2} < {#6}
{
- \@@_set_pole:Nne #9 { B }
+ \@@_set_pole:Nnn #9 { B }
{ { 0pt } {#2} { 1000pt } { 0pt } }
}
{
- \@@_set_pole:Nne #9 { B }
+ \@@_set_pole:Nnn #9 { B }
{ { 0pt } {#6} { 1000pt } { 0pt } }
}
}
More information about the latex3-commits
mailing list.