[latex3-commits] [latex3/latex3] main: stuff from review (6f0abd640)
github at latex-project.org
github at latex-project.org
Sun Oct 15 22:04:00 CEST 2023
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/6f0abd640f237e279bb17c2828f653a87963eb2a
>---------------------------------------------------------------
commit 6f0abd640f237e279bb17c2828f653a87963eb2a
Author: Jonathan Spratte <jspratte at yahoo.de>
Date: Fri May 19 20:27:57 2023 +0200
stuff from review
>---------------------------------------------------------------
6f0abd640f237e279bb17c2828f653a87963eb2a
l3kernel/CHANGELOG.md | 1 +
l3kernel/l3token.dtx | 4 ++--
l3kernel/testfiles/m3token002.lvt | 26 ++++++++++++++++++++++++++
l3kernel/testfiles/m3token002.tlg | 5 +++++
4 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 62407ff15..27c79f14a 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -132,6 +132,7 @@ this project uses date-based 'snapshot' version identifiers.
- `\file_input_raw:n`
- `\int_if_zero:n(TF)`
- `\str_mdfive_hash:n`
+- `\token_to_catcode:N`
### Changed
- Remove `\noexpand` inside math mode in `\text_expand:n`
diff --git a/l3kernel/l3token.dtx b/l3kernel/l3token.dtx
index 369e5a34d..6c3b7c31e 100644
--- a/l3kernel/l3token.dtx
+++ b/l3kernel/l3token.dtx
@@ -481,7 +481,7 @@
% \end{texnote}
% \end{function}
%
-% \begin{function}[EXP]{\token_to_catcode:N}
+% \begin{function}[EXP,added=2023-19-05]{\token_to_catcode:N}
% \begin{syntax}
% \cs{token_to_catcode:N} \meta{token}
% \end{syntax}
@@ -1909,7 +1909,7 @@
\if_catcode:w \exp_not:N #1 \c_alignment_token
4
\else:
- \if_catcode:w \exp_not:N #1 \c_parameter_token
+ \if_catcode:w \exp_not:N #1 ##
6
\else:
\if_catcode:w \exp_not:N #1 \c_math_superscript_token
diff --git a/l3kernel/testfiles/m3token002.lvt b/l3kernel/testfiles/m3token002.lvt
index a37f6fb4f..a3c521f19 100644
--- a/l3kernel/testfiles/m3token002.lvt
+++ b/l3kernel/testfiles/m3token002.lvt
@@ -365,6 +365,32 @@
\token_to_meaning:N \token_to_meaning:N
}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\OMIT
+\cs_undefine:N \undefined_control_sequence:
+\cs_generate_variant:Nn \token_to_catcode:N { c }
+\TIMO
+\TESTEXP{token_to_catcode}{
+ \token_to_catcode:N \bgroup,
+ \token_to_catcode:N \egroup,
+ \token_to_catcode:N $,
+ \token_to_catcode:N &,
+ 5, % can't be checked
+ \token_to_catcode:N #,
+ \token_to_catcode:N ^,
+ \token_to_catcode:N \sb,
+ 9, % can't be checked
+ \token_to_catcode:c { @sptoken },
+ \token_to_catcode:N a,
+ \token_to_catcode:N +,
+ \token_to_catcode:N \prg_do_nothing:,
+ \token_to_catcode:N \relax,
+ \token_to_catcode:N \if:w,
+ \token_to_catcode:N \fi:,
+ \token_to_catcode:N \else:,
+ \token_to_catcode:N \undefined_control_sequence:
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\END
diff --git a/l3kernel/testfiles/m3token002.tlg b/l3kernel/testfiles/m3token002.tlg
index f5cc94fc7..3016eb3ce 100644
--- a/l3kernel/testfiles/m3token002.tlg
+++ b/l3kernel/testfiles/m3token002.tlg
@@ -346,3 +346,8 @@ TEST 30: token_to_meaning
============================================================
undefined, undefined, undefined, \relax, \relax, \meaning
============================================================
+============================================================
+TEST 31: token_to_catcode
+============================================================
+1,2,3,4,5,6,7,8,9,10,11,12,13,13,13,13,13,13
+============================================================
More information about the latex3-commits
mailing list.