From 1045e3f70340d9f7540d9c9328a282ee84f88a51 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Tue, 10 Oct 2023 20:27:00 +0000
Subject: l3 (10oct23)

git-svn-id: svn://tug.org/texlive/trunk@68507 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/source/latex/l3kernel/l3expan.dtx   | 64 ++++++++++++----------
 1 file changed, 36 insertions(+), 28 deletions(-)

(limited to 'Master/texmf-dist/source/latex/l3kernel/l3expan.dtx')

diff --git a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
index 0d7e3e877a9..d4fe6b3a30a 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
@@ -43,7 +43,7 @@
 %    }^^A
 % }
 %
-% \date{Released 2023-08-29}
+% \date{Released 2023-10-10}
 %
 % \maketitle
 %
@@ -501,6 +501,7 @@
 %     \exp_args:NNNo,
 %     \exp_args:NNNV,
 %     \exp_args:NNNv,
+%     \exp_args:NNNe,
 %     \exp_args:Nccc,
 %     \exp_args:NcNc,
 %     \exp_args:NcNo,
@@ -664,8 +665,8 @@
 %     This is the \TeX{} \tn{noexpand} primitive.  It only prevents
 %     expansion.  At the beginning of an |f|-type argument, a space
 %     \meta{token} is removed even if it appears as \cs{exp_not:N}
-%     \cs{c_space_token}.  In an |x|-expanding definition
-%     (\cs{cs_new:Npx}), a macro parameter introduces an argument even
+%     \cs{c_space_token}.  In an |e|-expanding definition
+%     (\cs{cs_new:Npe}), a macro parameter introduces an argument even
 %     if it appears as \cs{exp_not:N} |#| |1|.  This differs from
 %     \cs{exp_not:n}.
 %   \end{texnote}
@@ -692,7 +693,7 @@
 %   \emph{must} be surrounded by braces.
 %   \begin{texnote}
 %     This is the \eTeX{} \tn{unexpanded} primitive.  In an
-%     |x|-expanding definition (\cs{cs_new:Npx}), \cs{exp_not:n}~|{#1}|
+%     |x|-expanding definition (\cs{cs_new:Npe}), \cs{exp_not:n}~|{#1}|
 %     is equivalent to |##1| rather than to~|#1|, namely it inserts the
 %     two characters |#| and~|1|.  In an |e|-type argument
 %     \cs{exp_not:n}~|{#}| is equivalent to |#|, namely it inserts the
@@ -947,7 +948,7 @@
 % In this section a general mechanism for defining functions that handle
 % arguments is defined.  These general expansion functions are
 % expandable unless |x| is used.  (Any version of |x| is going to have
-% to use one of the \LaTeX3 names for \cs{cs_set:Npx} at some
+% to use one of the \LaTeX3 names for \cs{cs_set:Npe} at some
 % point, and so is never going to be expandable.)
 %
 % The definition of expansion functions with this technique happens
@@ -1080,7 +1081,7 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \::x #1 \::: #2#3
   {
-    \cs_set_nopar:Npx \l_@@_internal_tl
+    \cs_set_nopar:Npe \l_@@_internal_tl
       { \exp_not:n { #1 \::: } { \exp_not:n {#2} {#3} } }
     \l_@@_internal_tl
   }
@@ -1325,7 +1326,7 @@
 %
 % \begin{macro}[EXP]
 %   {
-%     \exp_args:NNNV, \exp_args:NNNv,
+%     \exp_args:NNNV, \exp_args:NNNv, \exp_args:NNNe,
 %     \exp_args:NcNc, \exp_args:NcNo,
 %     \exp_args:Ncco,
 %   }
@@ -1345,6 +1346,13 @@
     \exp_after:wN #3
     \exp_after:wN { \exp:w \@@_eval_register:c {#4} }
   }
+\cs_new:Npn \exp_args:NNNe #1#2#3#4
+  {
+    \exp_after:wN #1
+    \exp_after:wN #2
+    \exp_after:wN #3
+    \tex_expanded:D { {#4} }
+  }
 \cs_new:Npn \exp_args:NcNc #1#2#3#4
   {
     \exp_after:wN #1
@@ -1410,7 +1418,7 @@
   }
 \cs_new_protected:Npn \::x_unbraced \::: #1#2
   {
-    \cs_set_nopar:Npx \l_@@_internal_tl { \exp_not:n {#1} #2 }
+    \cs_set_nopar:Npe \l_@@_internal_tl { \exp_not:n {#1} #2 }
     \l_@@_internal_tl
   }
 %    \end{macrocode}
@@ -1682,7 +1690,7 @@
 %   \end{arguments}
 %   After making sure that the base form exists, test whether it is
 %   protected or not and define \cs{@@_tmp:w} as either
-%   \cs{cs_new:Npx} or \cs{cs_new_protected:Npx}, which is
+%   \cs{cs_new:Npe} or \cs{cs_new_protected:Npe}, which is
 %   then used to define all the variants (except those involving
 %   \texttt{x}-expansion, always protected).  Split up the original base
 %   function only once, to grab its name and signature.  Then we wish to
@@ -1692,7 +1700,7 @@
 \cs_new_protected:Npn \cs_generate_variant:Nn #1#2
   {
     \@@_generate_variant:N #1
-    \use:x
+    \use:e
       {
         \@@_generate_variant:nnNN
           \cs_split_function:N #1
@@ -1728,21 +1736,21 @@
 %   |\bot|, |\splittop|, or |\splitbot|, with |\| replaced by the
 %   appropriate escape character.  If |pr| appears in the part before
 %   |ma|, the first \cs{s_@@_mark} is taken as an argument of the |wwNw|
-%   auxiliary, and |#3| is \cs{cs_new_protected:Npx}, otherwise it
-%   is \cs{cs_new:Npx}.
+%   auxiliary, and |#3| is \cs{cs_new_protected:Npe}, otherwise it
+%   is \cs{cs_new:Npe}.
 %    \begin{macrocode}
-\cs_new_protected:Npx \@@_generate_variant:N #1
+\cs_new_protected:Npe \@@_generate_variant:N #1
   {
     \exp_not:N \exp_after:wN \exp_not:N \if_meaning:w
       \exp_not:N \exp_not:N #1 #1
-      \cs_set_eq:NN \exp_not:N \@@_tmp:w \cs_new_protected:Npx
+      \cs_set_eq:NN \exp_not:N \@@_tmp:w \cs_new_protected:Npe
     \exp_not:N \else:
       \exp_not:N \exp_after:wN \exp_not:N \@@_generate_variant:ww
         \exp_not:N \token_to_meaning:N #1 \tl_to_str:n { ma }
           \s_@@_mark
-        \s_@@_mark \cs_new_protected:Npx
+        \s_@@_mark \cs_new_protected:Npe
         \tl_to_str:n { pr }
-        \s_@@_mark \cs_new:Npx
+        \s_@@_mark \cs_new:Npe
         \s_@@_stop
     \exp_not:N \fi:
   }
@@ -1773,7 +1781,7 @@
 \cs_new_protected:Npn \@@_generate_variant:nnNN #1#2#3#4
   {
     \if_meaning:w \c_false_bool #3
-      \msg_error:nnx { kernel } { missing-colon }
+      \msg_error:nne { kernel } { missing-colon }
         { \token_to_str:c {#1} }
       \exp_after:wN \@@_use_none_delimit_by_q_recursion_stop:w
     \fi:
@@ -1837,7 +1845,7 @@
     \if_meaning:w \scan_stop: #4
       \exp_after:wN \@@_use_none_delimit_by_q_recursion_stop:w
     \fi:
-    \use:x
+    \use:e
       {
         \exp_not:N \@@_generate_variant:wwNN
         \@@_generate_variant_loop:nNwN { }
@@ -1976,7 +1984,7 @@
     \exp_not:n
       {
         \s_@@_mark
-        \msg_error:nnxx { kernel } { variant-too-long }
+        \msg_error:nnee { kernel } { variant-too-long }
           {#5} { \token_to_str:N #3 }
         \use_none:nnn
         \s_@@_stop
@@ -1991,7 +1999,7 @@
     \exp_not:n
       {
         \s_@@_mark
-        \msg_error:nnxxxx { kernel } { invalid-variant }
+        \msg_error:nneeee { kernel } { invalid-variant }
           {#7} { \token_to_str:N #5 } {#1} {#2}
         \use_none:nnn
         \s_@@_stop
@@ -2005,7 +2013,7 @@
     #3 \s_@@_stop #4 #5 {#6} {#7}
     \exp_not:n
       {
-        \msg_error:nnxxxx
+        \msg_error:nneeee
           { kernel } { deprecated-variant }
           {#7} { \token_to_str:N #5 } {#1} {#2}
       }
@@ -2039,7 +2047,7 @@
 %   (provided \texttt{log-functions} is active).
 %   Otherwise, make sure that the |\exp_args:N #3| form is defined, and
 %   if it contains |x|, change \cs{@@_tmp:w} locally to
-%   \cs{cs_new_protected:Npx}.  Then define the variant by
+%   \cs{cs_new_protected:Npe}.  Then define the variant by
 %   combining the |\exp_args:N #3| variant and the base function.
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_generate_variant:wwNN
@@ -2074,11 +2082,11 @@
 %   the \cs[no-index]{exp_args:N\dots} function as a macro taking up to
 %   $9$~arguments and expanding them using \cs{use:x} or \cs{tex_expanded:D}.
 %    \begin{macrocode}
-\cs_new_protected:Npx \@@_generate_internal_variant:n #1
+\cs_new_protected:Npe \@@_generate_internal_variant:n #1
   {
     \exp_not:N \@@_generate_internal_variant:wwnNwn
       #1 \s_@@_mark
-        { \cs_set_eq:NN \exp_not:N \@@_tmp:w \cs_new_protected:Npx }
+        { \cs_set_eq:NN \exp_not:N \@@_tmp:w \cs_new_protected:Npe }
         \cs_new_protected:cpn
         \use:x
       \token_to_str:N x \s_@@_mark
@@ -2111,7 +2119,7 @@
         ##3
         \s_@@_mark
         {
-          \use:x
+          \use:e
             {
               ##1 { exp_args:N ##3 }
                 { \@@_generate_internal_variant_loop:n ##3 { : \use_i:nn } }
@@ -2206,7 +2214,7 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \prg_generate_conditional_variant:Nnn #1
   {
-    \use:x
+    \use:e
       {
         \@@_generate_variant:nnNnn
           \cs_split_function:N #1
@@ -2215,7 +2223,7 @@
 \cs_new_protected:Npn \@@_generate_variant:nnNnn #1#2#3#4#5
   {
     \if_meaning:w \c_false_bool #3
-      \msg_error:nnx { kernel } { missing-colon }
+      \msg_error:nne { kernel } { missing-colon }
         { \token_to_str:c {#1} }
       \@@_use_i_delimit_by_s_stop:nw
     \fi:
@@ -2235,7 +2243,7 @@
       \cs_if_exist_use:cTF { @@_generate_variant_#1_form:nnn }
         { {#3} {#4} {#5} }
         {
-          \msg_error:nnxx
+          \msg_error:nnee
             { kernel } { conditional-form-unknown }
             {#1} { \token_to_str:c { #3 : #4 } }
         }
-- 
cgit v1.2.3

