[latex3-commits] [git/LaTeX3-latex3-latex3] scan-quark: Move l3quark before l3tl (9c17fbc96)
PhelypeOleinik
tex.phelype at gmail.com
Thu Mar 19 02:39:41 CET 2020
Repository : https://github.com/latex3/latex3
On branch : scan-quark
Link : https://github.com/latex3/latex3/commit/9c17fbc960e8568292c273fb44d4d38063be3e03
>---------------------------------------------------------------
commit 9c17fbc960e8568292c273fb44d4d38063be3e03
Author: PhelypeOleinik <tex.phelype at gmail.com>
Date: Wed Mar 18 22:39:41 2020 -0300
Move l3quark before l3tl
>---------------------------------------------------------------
9c17fbc960e8568292c273fb44d4d38063be3e03
l3kernel/l3.ins | 2 +-
l3kernel/l3format.ins | 2 +-
l3kernel/l3quark.dtx | 32 +++++++++++++++++++++-----------
3 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/l3kernel/l3.ins b/l3kernel/l3.ins
index 86d4ac528..04d1e18a3 100644
--- a/l3kernel/l3.ins
+++ b/l3kernel/l3.ins
@@ -65,9 +65,9 @@ and all files in that bundle must be distributed together.
\from{l3names.dtx} {package}
\from{l3basics.dtx} {package}
\from{l3expan.dtx} {package}
+ \from{l3quark.dtx} {package}
\from{l3tl.dtx} {package}
\from{l3str.dtx} {package}
- \from{l3quark.dtx} {package}
\from{l3seq.dtx} {package}
\from{l3int.dtx} {package}
\from{l3flag.dtx} {package}
diff --git a/l3kernel/l3format.ins b/l3kernel/l3format.ins
index a4f728a0d..99e938972 100644
--- a/l3kernel/l3format.ins
+++ b/l3kernel/l3format.ins
@@ -62,9 +62,9 @@ and all files in that bundle must be distributed together.
\from{l3names.dtx} {initex}
\from{l3basics.dtx} {initex}
\from{l3expan.dtx} {initex}
+ \from{l3quark.dtx} {initex}
\from{l3tl.dtx} {initex}
\from{l3str.dtx} {initex}
- \from{l3quark.dtx} {initex}
\from{l3seq.dtx} {initex}
% ======== FORMAT ONLY =========
\from{l3alloc.dtx} {initex}
diff --git a/l3kernel/l3quark.dtx b/l3kernel/l3quark.dtx
index 8a5144279..166d2e4be 100644
--- a/l3kernel/l3quark.dtx
+++ b/l3kernel/l3quark.dtx
@@ -515,7 +515,7 @@
}
\cs_new_protected:Npn \@@_test_generate_aux:nnNN #1 #2 #3 #4
{
- \reverse_if:N \if_int_odd:w #3
+ \reverse_if:N \tex_ifodd:D #3
\__kernel_msg_error:nnx { kernel } { missing-colon }
{ \token_to_str:N #4 }
\exp_after:wN \use_none:nnnnn
@@ -672,18 +672,23 @@
{ \exp_last_unbraced:Nf \@@_get_name_aux:w { \cs_to_str:N #1 } \s_@@ }
\cs_new:Npn \@@_get_name_aux:w #1 #2 \s_@@
{
- \str_if_eq:nnTF {#1} { q }
+ \if_charcode:w q #1
+ \exp_after:wN \use:n
+ \else:
+ \__kernel_msg_expandable_error:nnf
+ { kernel } { invalid-quark } { \c_backslash_str #1 #2 }
+ \exp_after:wN \use_none:n
+ \fi:
{ \@@_remove_underscore:w #2 \s_@@ }
- {
- \__kernel_msg_expandable_error:nnf
- { kernel } { invalid-quark } { \c_backslash_str #1 #2 }
- }
}
\cs_new:Npn \@@_remove_underscore:w #1 #2 \s_@@
{
- \str_if_eq:nnTF {#1} { _ }
- { \@@_remove_underscore:w }
- { \@@_remove_underscore_end:w #1 }
+ \if_charcode:w _ #1
+ \exp_after:wN \@@_remove_underscore:w
+ \else:
+ \exp_after:wN \@@_remove_underscore_end:w
+ \exp_after:wN #1
+ \fi:
#2 \s_@@
}
\cs_new:Npn \@@_remove_underscore_end:w #1 \s_@@ {#1}
@@ -788,8 +793,9 @@
% \begin{variable}{\g_@@_marks_tl}
% \UnitTested
% The list of all scan marks currently declared.
+% No \pkg{l3tl} yet, so define this by hand.
% \begin{macrocode}
-\tl_new:N \g_@@_marks_tl
+\cs_gset:Npn \g_@@_marks_tl { }
% \end{macrocode}
% \end{variable}
%
@@ -817,8 +823,12 @@
% \UnitTested
% We only declare one scan mark here, more can be defined
% by specific modules.
+% Can't use \cs{scan_new:N} yet because \pkg{l3tl} isn't loaded,
+% so define \cs{s_stop} by hand and add it to \cs{g_@@_marks_tl}.
% \begin{macrocode}
-\scan_new:N \s_stop
+\cs_gset_nopar:Npx \g_@@_marks_tl
+ { \exp_not:o \g_@@_marks_tl \exp_not:n { \s_stop } }
+\cs_new_eq:NN \s_stop \scan_stop:
% \end{macrocode}
% \end{variable}
%
More information about the latex3-commits
mailing list.