[latex3-commits] [git/LaTeX3-latex3-latex3] gh839: csname safety should go first (da12b8425)

PhelypeOleinik phelype.oleinik at latex-project.org
Wed Jan 13 00:30:55 CET 2021


Repository : https://github.com/latex3/latex3
On branch  : gh839
Link       : https://github.com/latex3/latex3/commit/da12b8425d9cb7031d169e52918de723f5901b07

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

commit da12b8425d9cb7031d169e52918de723f5901b07
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Tue Jan 12 20:30:55 2021 -0300

    csname safety should go first


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

da12b8425d9cb7031d169e52918de723f5901b07
 l3packages/xparse/testfiles/xparse001.lvt | 3 +++
 l3packages/xparse/testfiles/xparse001.tlg | 7 +++++++
 l3packages/xparse/xparse.dtx              | 2 +-
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/l3packages/xparse/testfiles/xparse001.lvt b/l3packages/xparse/testfiles/xparse001.lvt
index a0dc4fd72..0c8350548 100644
--- a/l3packages/xparse/testfiles/xparse001.lvt
+++ b/l3packages/xparse/testfiles/xparse001.lvt
@@ -366,6 +366,9 @@
     \TYPE { \exp_not:c { test- \foo abc { def } } }
     \DeclareDocumentCommand { \foo } { D... } { test-#1 }
     \TYPE { \exp_not:c { test- \foo .... } }
+    \cs_set:cpn { conditionally at traceoff } { \relax } % some int assignment
+    \DeclareDocumentCommand { \foo } { D... } { test-#1 }
+    \TYPE { \exp_not:c { test- \foo .... } }
   }
 
 \TEST{Checking~for~existing~expandable~definitions}{
diff --git a/l3packages/xparse/testfiles/xparse001.tlg b/l3packages/xparse/testfiles/xparse001.tlg
index 719a9a7fe..c9ef1a04f 100644
--- a/l3packages/xparse/testfiles/xparse001.tlg
+++ b/l3packages/xparse/testfiles/xparse001.tlg
@@ -811,6 +811,13 @@ l. ...  }
 The control sequence marked <to be read again> should
 not appear between \csname and \endcsname.
 \test- \xparse function is not expandable \bool_set_false:N \l__xparse_environment_bool \__xparse_start_aux:NNnnnn \foo code {D...}{\__xparse_grab_D:w ..}{{.}}{}....\cs_end: 
+! Missing \endcsname inserted.
+<to be read again> 
+                   \xparse function is not expandable 
+l. ...  }
+The control sequence marked <to be read again> should
+not appear between \csname and \endcsname.
+\test- \xparse function is not expandable \relax \bool_set_false:N \l__xparse_environment_bool \__xparse_start_aux:NNnnnn \foo code {D...}{\__xparse_grab_D:w ..}{{.}}{}....\cs_end: 
 ============================================================
 ============================================================
 TEST 20: Checking for existing expandable definitions
diff --git a/l3packages/xparse/xparse.dtx b/l3packages/xparse/xparse.dtx
index 6413c2f25..eeae7fdf2 100644
--- a/l3packages/xparse/xparse.dtx
+++ b/l3packages/xparse/xparse.dtx
@@ -1550,8 +1550,8 @@
   }
 \cs_new_protected:Npx \@@_start:nNNnnn #1#2#3
   {
-    \exp_not:n { \cs_if_exist_use:N \conditionally at traceoff }
     \exp_not:c { xparse~function~is~not~expandable }
+    \exp_not:n { \cs_if_exist_use:N \conditionally at traceoff }
     \exp_not:n { \bool_set_false:N \l_@@_environment_bool }
     \exp_not:N \@@_start_aux:NNnnnn
     #2 #3 {#1}





More information about the latex3-commits mailing list.