[latex3-commits] [git/LaTeX3-latex3-latex2e] gh569: Missing defaults in E type are -NoValue- (929eda3f)

PhelypeOleinik phelype.oleinik at latex-project.org
Fri Aug 13 04:35:21 CEST 2021


Repository : https://github.com/latex3/latex2e
On branch  : gh569
Link       : https://github.com/latex3/latex2e/commit/929eda3ff326776c50588fe133b3b0b259ac5f8d

>---------------------------------------------------------------

commit 929eda3ff326776c50588fe133b3b0b259ac5f8d
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Thu Aug 12 23:35:21 2021 -0300

    Missing defaults in E type are -NoValue-


>---------------------------------------------------------------

929eda3ff326776c50588fe133b3b0b259ac5f8d
 base/ltcmd.dtx                       | 17 +++++++++++------
 base/testfiles-ltcmd/github-569b.lvt |  7 +++++++
 base/testfiles-ltcmd/github-569b.tlg | 14 ++++++++++++++
 3 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/base/ltcmd.dtx b/base/ltcmd.dtx
index eab44107..fbe8d924 100644
--- a/base/ltcmd.dtx
+++ b/base/ltcmd.dtx
@@ -2412,16 +2412,21 @@
       }
     \@@_split_signature_loop:Nw
   }
-\cs_new_protected:Npn \@@_show_E:Nw #1 #2 #3
+\cs_set_protected:Npn \@@_tmp:w #1
   {
-    \cs_set_protected:Npn \@@_tmp:w ##1 ##2
+    \cs_new_protected:Npn \@@_show_E:Nw ##1 ##2 ##3
       {
-        \@@_split_start_item:
-        \@@_split_end_item:n { #1 ##1 {##2} }
+        \cs_set_protected:Npn \@@_tmp:w ####1 ####2
+          {
+            \@@_split_start_item:
+            \@@_split_end_item:n { ##1 ####1 {####2} }
+          }
+        \@@_tl_mapthread_function:nnN {##2}
+          { ##3 {#1} {#1} {#1} {#1} {#1} {#1} {#1} {#1} {#1} } \@@_tmp:w
+        \@@_split_signature_loop:Nw
       }
-    \@@_tl_mapthread_function:nnN {#2} {#3} \@@_tmp:w
-    \@@_split_signature_loop:Nw
   }
+\exp_args:NV \@@_tmp:w \c_novalue_tl
 %    \end{macrocode}
 %
 %   Minor wrinkle with the prefixes: they use \cs{@@_split_add_item:n}
diff --git a/base/testfiles-ltcmd/github-569b.lvt b/base/testfiles-ltcmd/github-569b.lvt
index 53e6e2a8..a0eaec72 100644
--- a/base/testfiles-ltcmd/github-569b.lvt
+++ b/base/testfiles-ltcmd/github-569b.lvt
@@ -1,5 +1,7 @@
 \input{test2e}
 
+\RequirePackage{xparse}
+
 \START
 
 \DeclareDocumentCommand\foo{+oD(){bar}+m!>{\SplitList{;}}O{b;a;z}t^e{_^}E{^_}{{UP}{DOWN}}}
@@ -12,4 +14,9 @@
 
 \ShowCommand\foo
 
+\DeclareDocumentCommand\foo{E{_^+-*/}{{A}{B}{C}}}
+  {\typeout{##1:#1^^J##2:#2^^J##3:#3^^J##4:#4^^J##5:#5^^J##6:#6^^J}}
+
+\ShowCommand\foo
+
 \END
diff --git a/base/testfiles-ltcmd/github-569b.tlg b/base/testfiles-ltcmd/github-569b.tlg
index f5e992c6..d19e9bbb 100644
--- a/base/testfiles-ltcmd/github-569b.tlg
+++ b/base/testfiles-ltcmd/github-569b.tlg
@@ -40,3 +40,17 @@ Don't change this file in any respect.
 ##8:#8
 ##9:#9
 }.
+> \foo=document command:
+  #1:E_{A}
+  #2:E^{B}
+  #3:E+{C}
+  #4:E-{-NoValue-}
+  #5:E*{-NoValue-}
+  #6:E/{-NoValue-}
+->\typeout {##1:#1
+##2:#2
+##3:#3
+##4:#4
+##5:#5
+##6:#6
+}.





More information about the latex3-commits mailing list.