[latex3-commits] [git/LaTeX3-latex3-latex3] luaintarray: Make token_create alias for token.create avaialbale for all expl3 code (d9eb1ce69)

Marcel Fabian Krüger tex at 2krueger.de
Fri Nov 12 19:54:25 CET 2021


Repository : https://github.com/latex3/latex3
On branch  : luaintarray
Link       : https://github.com/latex3/latex3/commit/d9eb1ce6910415f6258283392fe343e533e1091c

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

commit d9eb1ce6910415f6258283392fe343e533e1091c
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Fri Nov 12 19:54:25 2021 +0100

    Make token_create alias for token.create avaialbale for all expl3 code


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

d9eb1ce6910415f6258283392fe343e533e1091c
 l3kernel/l3bootstrap.dtx |  2 +-
 l3kernel/l3intarray.dtx  | 12 ++++++------
 l3kernel/l3luatex.dtx    | 10 +++++-----
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/l3kernel/l3bootstrap.dtx b/l3kernel/l3bootstrap.dtx
index 1f17916bf..3f715c817 100644
--- a/l3kernel/l3bootstrap.dtx
+++ b/l3kernel/l3bootstrap.dtx
@@ -201,7 +201,7 @@
       \expandafter\noexpand\csname prg_return_true:\endcsname
       \expandafter\noexpand\csname prg_return_false:\endcsname
     }\endgroup
-    \ifdefined\newluabytecode\newluabytecode\expl at luadata@bytecode\fi
+    \ifdefined\newluabytecode\newluabytecode\@expl at luadata@bytecode\fi
     \directlua{require("expl3")}%
 %    \end{macrocode}
 %   As the user might be making a custom format, no assumption is made about
diff --git a/l3kernel/l3intarray.dtx b/l3kernel/l3intarray.dtx
index ca6c1778c..e86564154 100644
--- a/l3kernel/l3intarray.dtx
+++ b/l3kernel/l3intarray.dtx
@@ -267,15 +267,15 @@ local scan_token = token.scan_token
 local scan_toks = token.scan_toks
 local get_csname = token.get_csname
 local put_next = token.put_next
-local s_@@ = token.create's_@@'
+local s_@@ = token_create's_@@'
 local use_none
-local comma = token.create(string.byte',')
+local comma = token_create(string.byte',')
 
-local use_i = token.create'use:n'
+local use_i = token_create'use:n'
 if use_i.cmdname == "undefined_cs" then
   use_i = nil
 else
-  use_none = token.create'use_none:n'
+  use_none = token_create'use_none:n'
 end
 
 local scan_argument = token.scan_argument
@@ -318,8 +318,8 @@ local sprint = tex.sprint
 
 luacmd('@@_gset_count:Nw', function()
   if not use_i then
-    use_i = token.create'use:n'
-    use_none = token.create'use_none:n'
+    use_i = token_create'use:n'
+    use_none = token_create'use_none:n'
   end
   local t = @@_table()
   local n = scan_int()
diff --git a/l3kernel/l3luatex.dtx b/l3kernel/l3luatex.dtx
index 71816edff..ce954e6f2 100644
--- a/l3kernel/l3luatex.dtx
+++ b/l3kernel/l3luatex.dtx
@@ -370,9 +370,10 @@ local scan_int     = token.scan_int or token.scan_integer
 local scan_string  = token.scan_string
 local scan_keyword = token.scan_keyword
 local put_next     = token.put_next
+local token_create = token.create
 
-local true_tok     = token.create'prg_return_true:'
-local false_tok    = token.create'prg_return_false:'
+local true_tok     = token_create'prg_return_true:'
+local false_tok    = token_create'prg_return_false:'
 %    \end{macrocode}
 %
 %    \begin{macrocode}
@@ -642,7 +643,6 @@ end)
 % a function instead of an index into the functions table.
 %    \begin{macrocode}
 local luacmd do
-  local token_create = token.create
   local set_lua = token.set_lua
   local undefined_cs = token.command_id'undefined_cs'
 
@@ -665,7 +665,7 @@ local luacmd do
     local register = context.functions.register
     local functions = context.functions.known
     function luacmd(name, func, ...)
-      local tok = token.create(name)
+      local tok = token_create(name)
       if tok.command == undefined_cs then
         token.set_lua(name, register(func), ...)
       else
@@ -695,7 +695,7 @@ end
 local register_luadata, get_luadata
 
 if luatexbase then
-  local register = token.create'expl at luadata@bytecode'.index
+  local register = token_create'@expl at luadata@bytecode'.index
   if status.ini_version then
 %    \end{macrocode}
 %





More information about the latex3-commits mailing list.