[latex3-commits] [git/LaTeX3-latex3-latex3] master: \expanded is \use_x:n (e8f119c)

Joseph Wright joseph.wright at morningstar2.co.uk
Tue Apr 17 15:14:21 CEST 2018


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

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

commit e8f119c40b61fef263f0d3ccfe5b78e31364c9bc
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Tue Apr 17 14:14:21 2018 +0100

    \expanded is \use_x:n
    
    As Chris argues, the namign should reflect the function,
    even if here we are resticted in engine coverage.


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

e8f119c40b61fef263f0d3ccfe5b78e31364c9bc
 l3kernel/l3basics.dtx                   |    8 ++++++++
 l3kernel/l3candidates.dtx               |   32 ++++++++++++++-----------------
 l3kernel/l3luatex.dtx                   |    9 ++-------
 l3kernel/l3str.dtx                      |    3 +--
 l3kernel/testfiles/m3expl001.luatex.tlg |    2 --
 l3kernel/testfiles/m3expl001.ptex.tlg   |    2 --
 l3kernel/testfiles/m3expl001.tlg        |    2 --
 l3kernel/testfiles/m3expl001.uptex.tlg  |    2 --
 l3kernel/testfiles/m3expl001.xetex.tlg  |    2 --
 l3kernel/testfiles/m3expl003.luatex.tlg |    2 --
 l3kernel/testfiles/m3expl003.ptex.tlg   |    2 --
 l3kernel/testfiles/m3expl003.tlg        |    2 --
 l3kernel/testfiles/m3expl003.uptex.tlg  |    2 --
 l3kernel/testfiles/m3expl003.xetex.tlg  |    2 --
 14 files changed, 25 insertions(+), 47 deletions(-)

diff --git a/l3kernel/l3basics.dtx b/l3kernel/l3basics.dtx
index e1818b4..6afc2ec 100644
--- a/l3kernel/l3basics.dtx
+++ b/l3kernel/l3basics.dtx
@@ -1443,6 +1443,14 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}[EXP]{\use_x:n}
+%   A candidate, but needed early as it links to string comparisons.
+%   Currently \LuaTeX-only.
+%    \begin{macrocode}
+\tex_let:D \use_x:n \luatex_expanded:D
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}[EXP]{\use:n, \use:nn, \use:nnn, \use:nnnn}
 %    These macros grab their arguments and returns them back to the input
 %    (with outer braces removed).
diff --git a/l3kernel/l3candidates.dtx b/l3kernel/l3candidates.dtx
index 77def08..3d10c40 100644
--- a/l3kernel/l3candidates.dtx
+++ b/l3kernel/l3candidates.dtx
@@ -136,6 +136,20 @@
 %   \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 primitive \tn{expanded}:
+%     when \LuaTeX{} is in us it requires a single expansion to
+%     operate.
+%   \end{texnote}
+% \end{function}
+%
 % \section{Additions to \pkg{l3box}}
 %
 % \subsection{Viewing part of a box}
@@ -358,24 +372,6 @@
 %   locally.
 % \end{function}
 %
-% \section{Additions to \pkg{l3luatex}}
-%
-% \begin{function}[EXP, added = 2018-04-13]{\lua_use_x:n}
-%   \begin{syntax}
-%     \cs{lua_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.  \emph{This function is
-%   likely to be deprecated and renamed (after a year, as usual) if the
-%   \tn{expanded} primitive makes its way to other engines.}
-%   \begin{texnote}
-%     \cs{lua_use_x:n} is a macro wrapper around \tn{expanded}:
-%     when \LuaTeX{} is in use two expansions are required to yield the
-%     result.
-%   \end{texnote}
-% \end{function}
-%
 % \section{Additions to \pkg{l3msg}}
 %
 % In very rare cases it may be necessary to produce errors in an
diff --git a/l3kernel/l3luatex.dtx b/l3kernel/l3luatex.dtx
index e6ae303..035156a 100644
--- a/l3kernel/l3luatex.dtx
+++ b/l3kernel/l3luatex.dtx
@@ -193,10 +193,9 @@
 %<@@=luatex>
 %    \end{macrocode}
 %
-% \begin{macro}[EXP]{\@@_use_x:n, \@@_escape_x:n, \@@_now_x:n, \@@_shipout_x:n}
+% \begin{macro}[EXP]{\@@_escape_x:n, \@@_now_x:n, \@@_shipout_x:n}
 %   Copies of primitives.
 %    \begin{macrocode}
-\cs_new_eq:NN \@@_use_x:n     \luatex_expanded:D
 \cs_new_eq:NN \@@_escape_x:n  \luatex_luaescapestring:D
 \cs_new_eq:NN \@@_now_x:n     \luatex_directlua:D
 \cs_new_eq:NN \@@_shipout_x:n \luatex_latelua:D
@@ -206,14 +205,12 @@
 % These functions are set up in \pkg{l3str} for bootstrapping: we want to
 % replace them with a \enquote{proper} version at this stage, so clean up.
 %    \begin{macrocode}
-\cs_undefine:N \lua_use_x:n
 \cs_undefine:N \lua_escape_x:n
 \cs_undefine:N \lua_now_x:n
 %    \end{macrocode}
 %
 % \begin{macro}[EXP]{\lua_now_x:n, \lua_now:n}
 % \begin{macro}{\lua_shipout_x:n, \lua_shipout:n}
-% \begin{macro}[EXP]{\lua_use_x:n}
 % \begin{macro}[EXP]{\lua_escape_x:n, \lua_escape:n}
 %   Wrappers around the primitives. As with engines other than \LuaTeX{}
 %   these have to be macros, we give them the same status in all cases.
@@ -224,14 +221,13 @@
 \cs_new_protected:Npn \lua_shipout_x:n #1 { \@@_shiphout_x:n {#1} }
 \cs_new_protected:Npn \lua_shipout:n #1
   { \lua_shipout_x:n { \exp_not:n {#1} } }
-\cs_new:Npn \lua_use_x:n #1 { \@@_use_x:n {#1} }
 \cs_new:Npn \lua_escape_x:n #1 { \@@_escape_x:n {#1} }
 \cs_new:Npn \lua_escape:n #1 { \lua_escape_x:n { \exp_not:n {#1} } }
 \sys_if_engine_luatex:F
   {
     \clist_map_inline:nn
       {
-        \lua_use_x:n ,
+        \use_x:n ,
         \lua_escape_x:n , \lua_escape:n ,
         \lua_now_x:n , \lua_now:n
       }
@@ -256,7 +252,6 @@
 % \end{macro}
 % \end{macro}
 % \end{macro}
-% \end{macro}
 %
 % \subsection{Messages}
 %
diff --git a/l3kernel/l3str.dtx b/l3kernel/l3str.dtx
index f005760..c1e969a 100644
--- a/l3kernel/l3str.dtx
+++ b/l3kernel/l3str.dtx
@@ -1039,7 +1039,6 @@
 \cs_new:Npn \@@_if_eq_x:nn #1#2 { \pdftex_strcmp:D {#1} {#2} }
 \cs_if_exist:NT \luatex_luatexversion:D
    {
-     \cs_set_eq:NN \lua_use_x:n    \luatex_expanded:D
      \cs_set_eq:NN \lua_escape_x:n \luatex_luaescapestring:D
      \cs_set_eq:NN \lua_now_x:n    \luatex_directlua:D
      \cs_set:Npn \@@_if_eq_x:nn #1#2
@@ -1056,7 +1055,7 @@
      \cs_new:Npn \@@_escape_x:n #1
        {
          \lua_escape_x:n
-           { \__kernel_tl_to_str:w \lua_use_x:n { {#1} } }
+           { \__kernel_tl_to_str:w \use_x:n { {#1} } }
        }
    }
 %    \end{macrocode}
diff --git a/l3kernel/testfiles/m3expl001.luatex.tlg b/l3kernel/testfiles/m3expl001.luatex.tlg
index cdc9d23..3010647 100644
--- a/l3kernel/testfiles/m3expl001.luatex.tlg
+++ b/l3kernel/testfiles/m3expl001.luatex.tlg
@@ -5244,7 +5244,6 @@ Defining \sys_if_output_pdf:F on line ...
 Defining \sys_if_output_pdf:TF on line ...
 Defining \sys_if_output_pdf_p: on line ...
 Defining \c_sys_output_str on line ...
-Defining \__luatex_use_x:n on line ...
 Defining \__luatex_escape_x:n on line ...
 Defining \__luatex_now_x:n on line ...
 Defining \__luatex_shipout_x:n on line ...
@@ -5252,7 +5251,6 @@ Defining \lua_now_x:n on line ...
 Defining \lua_now:n on line ...
 Defining \lua_shipout_x:n on line ...
 Defining \lua_shipout:n on line ...
-Defining \lua_use_x:n on line ...
 Defining \lua_escape_x:n on line ...
 Defining \lua_escape:n on line ...
 Defining message LaTeX/kernel/luatex-required on line ...
diff --git a/l3kernel/testfiles/m3expl001.ptex.tlg b/l3kernel/testfiles/m3expl001.ptex.tlg
index 0d159db..bd5b281 100644
--- a/l3kernel/testfiles/m3expl001.ptex.tlg
+++ b/l3kernel/testfiles/m3expl001.ptex.tlg
@@ -5500,7 +5500,6 @@ Defining \sys_if_output_pdf:F on line ...
 Defining \sys_if_output_pdf:TF on line ...
 Defining \sys_if_output_pdf_p: on line ...
 Defining \c_sys_output_str on line ...
-Defining \__luatex_use_x:n on line ...
 Defining \__luatex_escape_x:n on line ...
 Defining \__luatex_now_x:n on line ...
 Defining \__luatex_shipout_x:n on line ...
@@ -5508,7 +5507,6 @@ Defining \lua_now_x:n on line ...
 Defining \lua_now:n on line ...
 Defining \lua_shipout_x:n on line ...
 Defining \lua_shipout:n on line ...
-Defining \lua_use_x:n on line ...
 Defining \lua_escape_x:n on line ...
 Defining \lua_escape:n on line ...
 Defining message LaTeX/kernel/luatex-required on line ...
diff --git a/l3kernel/testfiles/m3expl001.tlg b/l3kernel/testfiles/m3expl001.tlg
index 80e1323..88b9b67 100644
--- a/l3kernel/testfiles/m3expl001.tlg
+++ b/l3kernel/testfiles/m3expl001.tlg
@@ -5500,7 +5500,6 @@ Defining \sys_if_output_pdf:F on line ...
 Defining \sys_if_output_pdf:TF on line ...
 Defining \sys_if_output_pdf_p: on line ...
 Defining \c_sys_output_str on line ...
-Defining \__luatex_use_x:n on line ...
 Defining \__luatex_escape_x:n on line ...
 Defining \__luatex_now_x:n on line ...
 Defining \__luatex_shipout_x:n on line ...
@@ -5508,7 +5507,6 @@ Defining \lua_now_x:n on line ...
 Defining \lua_now:n on line ...
 Defining \lua_shipout_x:n on line ...
 Defining \lua_shipout:n on line ...
-Defining \lua_use_x:n on line ...
 Defining \lua_escape_x:n on line ...
 Defining \lua_escape:n on line ...
 Defining message LaTeX/kernel/luatex-required on line ...
diff --git a/l3kernel/testfiles/m3expl001.uptex.tlg b/l3kernel/testfiles/m3expl001.uptex.tlg
index 33c72c0..288920d 100644
--- a/l3kernel/testfiles/m3expl001.uptex.tlg
+++ b/l3kernel/testfiles/m3expl001.uptex.tlg
@@ -5498,7 +5498,6 @@ Defining \sys_if_output_pdf:F on line ...
 Defining \sys_if_output_pdf:TF on line ...
 Defining \sys_if_output_pdf_p: on line ...
 Defining \c_sys_output_str on line ...
-Defining \__luatex_use_x:n on line ...
 Defining \__luatex_escape_x:n on line ...
 Defining \__luatex_now_x:n on line ...
 Defining \__luatex_shipout_x:n on line ...
@@ -5506,7 +5505,6 @@ Defining \lua_now_x:n on line ...
 Defining \lua_now:n on line ...
 Defining \lua_shipout_x:n on line ...
 Defining \lua_shipout:n on line ...
-Defining \lua_use_x:n on line ...
 Defining \lua_escape_x:n on line ...
 Defining \lua_escape:n on line ...
 Defining message LaTeX/kernel/luatex-required on line ...
diff --git a/l3kernel/testfiles/m3expl001.xetex.tlg b/l3kernel/testfiles/m3expl001.xetex.tlg
index b2039be..fdc20c2 100644
--- a/l3kernel/testfiles/m3expl001.xetex.tlg
+++ b/l3kernel/testfiles/m3expl001.xetex.tlg
@@ -5217,7 +5217,6 @@ Defining \sys_if_output_pdf:F on line ...
 Defining \sys_if_output_pdf:TF on line ...
 Defining \sys_if_output_pdf_p: on line ...
 Defining \c_sys_output_str on line ...
-Defining \__luatex_use_x:n on line ...
 Defining \__luatex_escape_x:n on line ...
 Defining \__luatex_now_x:n on line ...
 Defining \__luatex_shipout_x:n on line ...
@@ -5225,7 +5224,6 @@ Defining \lua_now_x:n on line ...
 Defining \lua_now:n on line ...
 Defining \lua_shipout_x:n on line ...
 Defining \lua_shipout:n on line ...
-Defining \lua_use_x:n on line ...
 Defining \lua_escape_x:n on line ...
 Defining \lua_escape:n on line ...
 Defining message LaTeX/kernel/luatex-required on line ...
diff --git a/l3kernel/testfiles/m3expl003.luatex.tlg b/l3kernel/testfiles/m3expl003.luatex.tlg
index cdc9d23..3010647 100644
--- a/l3kernel/testfiles/m3expl003.luatex.tlg
+++ b/l3kernel/testfiles/m3expl003.luatex.tlg
@@ -5244,7 +5244,6 @@ Defining \sys_if_output_pdf:F on line ...
 Defining \sys_if_output_pdf:TF on line ...
 Defining \sys_if_output_pdf_p: on line ...
 Defining \c_sys_output_str on line ...
-Defining \__luatex_use_x:n on line ...
 Defining \__luatex_escape_x:n on line ...
 Defining \__luatex_now_x:n on line ...
 Defining \__luatex_shipout_x:n on line ...
@@ -5252,7 +5251,6 @@ Defining \lua_now_x:n on line ...
 Defining \lua_now:n on line ...
 Defining \lua_shipout_x:n on line ...
 Defining \lua_shipout:n on line ...
-Defining \lua_use_x:n on line ...
 Defining \lua_escape_x:n on line ...
 Defining \lua_escape:n on line ...
 Defining message LaTeX/kernel/luatex-required on line ...
diff --git a/l3kernel/testfiles/m3expl003.ptex.tlg b/l3kernel/testfiles/m3expl003.ptex.tlg
index 0d159db..bd5b281 100644
--- a/l3kernel/testfiles/m3expl003.ptex.tlg
+++ b/l3kernel/testfiles/m3expl003.ptex.tlg
@@ -5500,7 +5500,6 @@ Defining \sys_if_output_pdf:F on line ...
 Defining \sys_if_output_pdf:TF on line ...
 Defining \sys_if_output_pdf_p: on line ...
 Defining \c_sys_output_str on line ...
-Defining \__luatex_use_x:n on line ...
 Defining \__luatex_escape_x:n on line ...
 Defining \__luatex_now_x:n on line ...
 Defining \__luatex_shipout_x:n on line ...
@@ -5508,7 +5507,6 @@ Defining \lua_now_x:n on line ...
 Defining \lua_now:n on line ...
 Defining \lua_shipout_x:n on line ...
 Defining \lua_shipout:n on line ...
-Defining \lua_use_x:n on line ...
 Defining \lua_escape_x:n on line ...
 Defining \lua_escape:n on line ...
 Defining message LaTeX/kernel/luatex-required on line ...
diff --git a/l3kernel/testfiles/m3expl003.tlg b/l3kernel/testfiles/m3expl003.tlg
index 80e1323..88b9b67 100644
--- a/l3kernel/testfiles/m3expl003.tlg
+++ b/l3kernel/testfiles/m3expl003.tlg
@@ -5500,7 +5500,6 @@ Defining \sys_if_output_pdf:F on line ...
 Defining \sys_if_output_pdf:TF on line ...
 Defining \sys_if_output_pdf_p: on line ...
 Defining \c_sys_output_str on line ...
-Defining \__luatex_use_x:n on line ...
 Defining \__luatex_escape_x:n on line ...
 Defining \__luatex_now_x:n on line ...
 Defining \__luatex_shipout_x:n on line ...
@@ -5508,7 +5507,6 @@ Defining \lua_now_x:n on line ...
 Defining \lua_now:n on line ...
 Defining \lua_shipout_x:n on line ...
 Defining \lua_shipout:n on line ...
-Defining \lua_use_x:n on line ...
 Defining \lua_escape_x:n on line ...
 Defining \lua_escape:n on line ...
 Defining message LaTeX/kernel/luatex-required on line ...
diff --git a/l3kernel/testfiles/m3expl003.uptex.tlg b/l3kernel/testfiles/m3expl003.uptex.tlg
index 33c72c0..288920d 100644
--- a/l3kernel/testfiles/m3expl003.uptex.tlg
+++ b/l3kernel/testfiles/m3expl003.uptex.tlg
@@ -5498,7 +5498,6 @@ Defining \sys_if_output_pdf:F on line ...
 Defining \sys_if_output_pdf:TF on line ...
 Defining \sys_if_output_pdf_p: on line ...
 Defining \c_sys_output_str on line ...
-Defining \__luatex_use_x:n on line ...
 Defining \__luatex_escape_x:n on line ...
 Defining \__luatex_now_x:n on line ...
 Defining \__luatex_shipout_x:n on line ...
@@ -5506,7 +5505,6 @@ Defining \lua_now_x:n on line ...
 Defining \lua_now:n on line ...
 Defining \lua_shipout_x:n on line ...
 Defining \lua_shipout:n on line ...
-Defining \lua_use_x:n on line ...
 Defining \lua_escape_x:n on line ...
 Defining \lua_escape:n on line ...
 Defining message LaTeX/kernel/luatex-required on line ...
diff --git a/l3kernel/testfiles/m3expl003.xetex.tlg b/l3kernel/testfiles/m3expl003.xetex.tlg
index b2039be..fdc20c2 100644
--- a/l3kernel/testfiles/m3expl003.xetex.tlg
+++ b/l3kernel/testfiles/m3expl003.xetex.tlg
@@ -5217,7 +5217,6 @@ Defining \sys_if_output_pdf:F on line ...
 Defining \sys_if_output_pdf:TF on line ...
 Defining \sys_if_output_pdf_p: on line ...
 Defining \c_sys_output_str on line ...
-Defining \__luatex_use_x:n on line ...
 Defining \__luatex_escape_x:n on line ...
 Defining \__luatex_now_x:n on line ...
 Defining \__luatex_shipout_x:n on line ...
@@ -5225,7 +5224,6 @@ Defining \lua_now_x:n on line ...
 Defining \lua_now:n on line ...
 Defining \lua_shipout_x:n on line ...
 Defining \lua_shipout:n on line ...
-Defining \lua_use_x:n on line ...
 Defining \lua_escape_x:n on line ...
 Defining \lua_escape:n on line ...
 Defining message LaTeX/kernel/luatex-required on line ...





More information about the latex3-commits mailing list