[latex3-commits] [git/LaTeX3-latex3-latex3] master: \use_x:n => \use:e (82d075c)

Joseph Wright joseph.wright at morningstar2.co.uk
Mon Jun 18 16:14:02 CEST 2018


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/82d075c550ae2adb10d35913a575b69f4e7c876e

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

commit 82d075c550ae2adb10d35913a575b69f4e7c876e
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Mon Jun 18 15:14:02 2018 +0100

    \use_x:n => \use:e


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

82d075c550ae2adb10d35913a575b69f4e7c876e
 l3kernel/l3basics.dtx     |   24 ++++++++++++++++++++----
 l3kernel/l3candidates.dtx |   13 -------------
 l3kernel/l3luatex.dtx     |    1 -
 l3kernel/l3str.dtx        |    2 +-
 4 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/l3kernel/l3basics.dtx b/l3kernel/l3basics.dtx
index c5581d4..44a2afa 100644
--- a/l3kernel/l3basics.dtx
+++ b/l3kernel/l3basics.dtx
@@ -939,6 +939,20 @@
 %   (\emph{i.e.}~an \texttt{N} argument).
 % \end{function}
 %
+% \begin{function}[EXP, added = 2018-06-18]{\use:e}
+%   \begin{syntax}
+%     \cs{use:e} \Arg{expandable tokens}
+%   \end{syntax}
+%   Fully expands the \meta{token list} in an \texttt{x}-type manner,
+%   \emph{but} the function remains fully expandable, and parameter
+%   character (usually~|#|) need not be doubled.
+%   \begin{texnote}
+%     \cs{use:e} the a wrapper around the primitive \tn{expanded}
+%     where it is available:
+%     it requires two expansions to complete its action.
+%   \end{texnote}
+% \end{function}
+%
 % \begin{function}[updated = 2011-12-31]{\use:x}
 %   \begin{syntax}
 %     \cs{use:x} \Arg{expandable tokens}
@@ -1454,11 +1468,13 @@
 %<@@=use>
 %    \end{macrocode}
 %
-% \begin{macro}[EXP]{\use_x:n}
-%   A candidate, but needed early as it links to string comparisons.
-%   Currently \LuaTeX-only.
+% \begin{macro}[EXP]{\use:e}
+%   Currently \LuaTeX-only: emulated for older engines.
 %    \begin{macrocode}
-\cs_set:Npn \use_x:n #1 { \tex_expanded:D {#1} }
+\cs_set:Npn \use:e #1 { \tex_expanded:D {#1} }
+\tex_ifdefined:D \tex_expanded:D \tex_else:D
+  \cs_set:Npn \use:e #1 { \exp_args:Ne \use:n {#1} }
+\tex_fi:D
 %    \end{macrocode}
 % \end{macro}
 %
diff --git a/l3kernel/l3candidates.dtx b/l3kernel/l3candidates.dtx
index 58c53af..5757cea 100644
--- a/l3kernel/l3candidates.dtx
+++ b/l3kernel/l3candidates.dtx
@@ -137,19 +137,6 @@
 %   \end{texnote}
 % \end{function}
 %
-% \begin{function}[EXP, added = 2018-04-17]{\use_x:n}
-%   \begin{syntax}
-%     \cs{use_x:n} \Arg{token list}
-%   \end{syntax}
-%   Fully expands the \meta{token list} in an \texttt{x}-type manner,
-%   \emph{but} the function remains fully expandable, and parameter
-%   character (usually~|#|) need not be doubled.
-%   \begin{texnote}
-%     \cs{use_x:n} the a wrapper around the primitive \tn{expanded}:
-%     it requires two expansions to complete its action.
-%   \end{texnote}
-% \end{function}
-%
 % \section{Additions to \pkg{l3box}}
 %
 % \subsection{Viewing part of a box}
diff --git a/l3kernel/l3luatex.dtx b/l3kernel/l3luatex.dtx
index 87a535c..2a65cb5 100644
--- a/l3kernel/l3luatex.dtx
+++ b/l3kernel/l3luatex.dtx
@@ -234,7 +234,6 @@
   {
     \clist_map_inline:nn
       {
-        \use_x:n ,
         \lua_escape_x:n , \lua_escape:n ,
         \lua_now_x:n , \lua_now:n
       }
diff --git a/l3kernel/l3str.dtx b/l3kernel/l3str.dtx
index 56e01c6..6376b0d 100644
--- a/l3kernel/l3str.dtx
+++ b/l3kernel/l3str.dtx
@@ -1062,7 +1062,7 @@
      \cs_new:Npn \@@_escape_x:n #1
        {
          \lua_escape_x:n
-           { \__kernel_tl_to_str:w \use_x:n { {#1} } }
+           { \__kernel_tl_to_str:w \use:e { {#1} } }
        }
    }
 %    \end{macrocode}





More information about the latex3-commits mailing list