[latex3-commits] [git/LaTeX3-latex3-latex3] cs-delimited-args: Replace \group_begin/end: by temporary assignment (34a92f7d5)

PhelypeOleinik tex.phelype at gmail.com
Thu Feb 27 01:37:45 CET 2020


Repository : https://github.com/latex3/latex3
On branch  : cs-delimited-args
Link       : https://github.com/latex3/latex3/commit/34a92f7d5ebaa0e0937e4a9a51b16af809bb8c87

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

commit 34a92f7d5ebaa0e0937e4a9a51b16af809bb8c87
Author: PhelypeOleinik <tex.phelype at gmail.com>
Date:   Wed Feb 26 21:37:45 2020 -0300

    Replace \group_begin/end: by temporary assignment


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

34a92f7d5ebaa0e0937e4a9a51b16af809bb8c87
 l3packages/xparse/testfiles/xparse000.tlg |  1 +
 l3packages/xparse/xparse.dtx              | 18 +++++++++++-------
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/l3packages/xparse/testfiles/xparse000.tlg b/l3packages/xparse/testfiles/xparse000.tlg
index 81f95f3d6..a77d33369 100644
--- a/l3packages/xparse/testfiles/xparse000.tlg
+++ b/l3packages/xparse/testfiles/xparse000.tlg
@@ -6,5 +6,6 @@ Package: xparse ....-..-.. L3 Experimental document command parser
 \l__xparse_current_arg_int=\count...
 \g__xparse_grabber_int=\count...
 \l__xparse_m_args_int=\count...
+\l__xparse_tmp_int=\count...
 \l__xparse_v_nesting_int=\count...
 )
diff --git a/l3packages/xparse/xparse.dtx b/l3packages/xparse/xparse.dtx
index 18f43242d..4a9bfe19e 100644
--- a/l3packages/xparse/xparse.dtx
+++ b/l3packages/xparse/xparse.dtx
@@ -1152,10 +1152,11 @@
 %    \end{macrocode}
 % \end{variable}
 %
-% \begin{variable}{\l_@@_tmp_prop, \l_@@_tmpa_tl, \l_@@_tmpb_tl}
+% \begin{variable}{\l_@@_tmp_int, \l_@@_tmp_prop, \l_@@_tmpa_tl, \l_@@_tmpb_tl}
 % \begin{macro}{\@@_tmp:w}
 %   Scratch space.
 %    \begin{macrocode}
+\int_new:N \l_@@_tmp_int
 \prop_new:N \l_@@_tmp_prop
 \tl_new:N \l_@@_tmpa_tl
 \tl_new:N \l_@@_tmpb_tl
@@ -4296,12 +4297,15 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_token_if_cs:NTF #1
   {
-    \group_begin:
-      \int_set:Nn \tex_escapechar:D { 92 }
-      \exp_args:Nx \tl_if_empty:nTF
-          { \exp_args:No \str_tail:n { \token_to_str:N #1 } }
-        { \group_end: \use_ii:nn }
-        { \group_end: \use_i:nn }
+    \int_set_eq:NN \l_@@_tmp_int \tex_escapechar:D
+    \int_set:Nn \tex_escapechar:D { 92 }
+    \exp_args:Nx \tl_if_empty:nTF
+        {
+          \int_set_eq:NN \tex_escapechar:D \l_@@_tmp_int
+          \exp_args:No \str_tail:n { \token_to_str:N #1 }
+        }
+      { \use_ii:nn }
+      { \use_i:nn }
   }
 %    \end{macrocode}
 % \end{macro}





More information about the latex3-commits mailing list.