summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-01-22 20:35:48 +0000
committerKarl Berry <karl@freefriends.org>2024-01-22 20:35:48 +0000
commit4c22629f53f90478aefb2eeaa53fcf57b662d29f (patch)
treea78162a089bbbe6a2559dd0921cefa772983bafe
parent6ea5b16c8bb91e0b54153c67071dc79032cfa961 (diff)
l3kernel (22jan24)
git-svn-id: svn://tug.org/texlive/trunk@69537 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/CHANGELOG.md16
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/README.md2
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/expl3.pdfbin623018 -> 623299 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/interface3.pdfbin1776647 -> 1776513 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3doc.pdfbin563777 -> 564281 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdfbin150985 -> 150985 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3news.pdfbin396222 -> 396222 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3news01.pdfbin122959 -> 122959 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3news02.pdfbin150919 -> 150919 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3news03.pdfbin148747 -> 148747 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3news04.pdfbin114754 -> 114754 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3news05.pdfbin112524 -> 112524 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3news06.pdfbin151591 -> 151591 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3news07.pdfbin128344 -> 128344 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3news08.pdfbin163484 -> 163484 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3news09.pdfbin250159 -> 250159 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3news10.pdfbin150302 -> 150302 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3news11.pdfbin170102 -> 170102 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3news12.pdfbin205020 -> 205020 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3obsolete.txt12
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3prefixes.pdfbin82696 -> 82696 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdfbin296516 -> 296657 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex2
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdfbin243162 -> 242421 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.tex4
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3term-glossary.pdfbin218315 -> 218315 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/source3.pdfbin7514579 -> 7488727 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/source3body.tex8
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/expl3.dtx30
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3.ins1
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3basics.dtx9
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3bitset.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3box.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx150
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3cctab.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3clist.dtx54
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3color.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3debug.dtx75
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx260
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3doc.dtx50
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3expan.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3file.dtx34
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3flag.dtx316
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-functions.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-symbolic.dtx12
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx30
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-types.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp.dtx18
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3int.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3keys.dtx161
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3legacy.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3msg.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3names.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3pdf.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prg.dtx11
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prop.dtx14
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3quark.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3regex.dtx545
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3seq.dtx114
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3skip.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3sort.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3str-convert.dtx250
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3str.dtx24
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3sys.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3text-case.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3text-map.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3text-purify.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3text.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl-build.dtx16
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl.dtx141
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3token.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx2
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex1473
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex2
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/expl3.ltx2
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/expl3.sty2
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3debug.def62
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3doc.cls32
97 files changed, 1855 insertions, 2183 deletions
diff --git a/Master/texmf-dist/doc/latex/l3kernel/CHANGELOG.md b/Master/texmf-dist/doc/latex/l3kernel/CHANGELOG.md
index 0c9d02efe4f..a8e4cb8d77d 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/CHANGELOG.md
+++ b/Master/texmf-dist/doc/latex/l3kernel/CHANGELOG.md
@@ -7,6 +7,19 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2024-01-22]
+
+### Added
+- `\keys_set_exclude_groups:nnn(nN)` to replace `\keys_set_filter:nnn(nN)`
+- Flags with N-type names, like other variable types
+
+### Changed
+- Set `l3doc` option `kernel` off as-standard (issue \#1403)
+- Moved `\seq_set_filter:NNn` to stable
+
+### Deprecated
+- `\keys_set_filter:nnn(nN)` in favor of `\keys_set_exclude_groups:nnn(nN)`
+
## [2024-01-04]
### Added
@@ -1635,7 +1648,8 @@ this project uses date-based 'snapshot' version identifiers.
- Step functions have been added for dim variables,
e.g. `\dim_step_inline:nnnn`
-[Unreleased]: https://github.com/latex3/latex3/compare/2024-01-04...HEAD
+[Unreleased]: https://github.com/latex3/latex3/compare/2024-01-22...HEAD
+[2024-01-22]: https://github.com/latex3/latex3/compare/2024-01-04...2024-01-22
[2024-01-04]: https://github.com/latex3/latex3/compare/2023-12-11...2024-01-04
[2023-12-11]: https://github.com/latex3/latex3/compare/2023-12-08...2023-12-11
[2023-12-08]: https://github.com/latex3/latex3/compare/2023-11-09...2023-12-08
diff --git a/Master/texmf-dist/doc/latex/l3kernel/README.md b/Master/texmf-dist/doc/latex/l3kernel/README.md
index 1173d3966fa..96b7e958f94 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/README.md
+++ b/Master/texmf-dist/doc/latex/l3kernel/README.md
@@ -1,7 +1,7 @@
LaTeX3 Programming Conventions
==============================
-Release 2024-01-04
+Release 2024-01-22
Overview
--------
diff --git a/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf b/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf
index 123d474f9be..8f722bc6b4c 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf b/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf
index 3144931ce49..7b5ffdc3e9a 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3doc.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3doc.pdf
index 9201da42ef5..352082c2abe 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3doc.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf
index cb2d544930c..2098a2ce213 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news.pdf
index 0a5bc3794d4..4719901866d 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3news.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3news.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news01.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news01.pdf
index ca854aca2dd..155535a4fd8 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3news01.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3news01.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news02.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news02.pdf
index abc710c5e83..678d28fe510 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3news02.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3news02.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news03.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news03.pdf
index 67c3c65908b..c4d3285b7e2 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3news03.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3news03.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news04.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news04.pdf
index aeae2e688f6..996d2face00 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3news04.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3news04.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news05.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news05.pdf
index 33026d2cdcf..daea9c248aa 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3news05.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3news05.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news06.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news06.pdf
index cab5c11273d..8193ffab13d 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3news06.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3news06.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news07.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news07.pdf
index c5a3d300a54..9492361a4ae 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3news07.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3news07.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news08.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news08.pdf
index 5a5517c002b..62d965b72f9 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3news08.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3news08.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news09.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news09.pdf
index 95f1aa0ee5e..988790dadfb 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3news09.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3news09.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news10.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news10.pdf
index 1b8dc9af299..6c13a5cbb1d 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3news10.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3news10.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news11.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news11.pdf
index bfb59818be2..d78d434fa71 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3news11.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3news11.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news12.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news12.pdf
index eddbad6dca3..6f9eac3b376 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3news12.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3news12.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3obsolete.txt b/Master/texmf-dist/doc/latex/l3kernel/l3obsolete.txt
index 2066ef6f0c1..a6a04625600 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3obsolete.txt
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3obsolete.txt
@@ -37,6 +37,18 @@ Function Date deprecated
\iow_shipout_x:cx 2023-09-17
\iow_shipout_x:Nn 2023-09-17
\iow_shipout_x:Nx 2023-09-17
+\keys_set_filter:nnn 2024-01-10
+\keys_set_filter:nnV 2024-01-10
+\keys_set_filter:nnv 2024-01-10
+\keys_set_filter:nno 2024-01-10
+\keys_set_filter:nnnN 2024-01-10
+\keys_set_filter:nnVN 2024-01-10
+\keys_set_filter:nnvN 2024-01-10
+\keys_set_filter:nnoN 2024-01-10
+\keys_set_filter:nnnnN 2024-01-10
+\keys_set_filter:nnVnN 2024-01-10
+\keys_set_filter:nnvnN 2024-01-10
+\keys_set_filter:nnonN 2024-01-10
\l_keys_key_tl 2020-02-08
\l_keys_path_tl 2020-02-08
\l_text_accents_tl 2023-02-07
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3prefixes.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3prefixes.pdf
index 4a23b2563d6..ea2bf159036 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3prefixes.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3prefixes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf
index 7e379d5eae0..dda0393c17c 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex
index c66e0df5d19..d2e46f56c49 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex
@@ -187,7 +187,7 @@ The only exception is where a \enquote{family} of modules share some
Any internal functions or variables \emph{must} be documented in the same way
as public ones.
-The \pkg{l3docstrip} method should be used for internal functions in a module.
+The \pkg{DocStrip} method should be used for internal functions in a module.
This requires a line
\begin{quote}
\ttfamily
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf
index 5fc4a897089..0bce9ea22a8 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.tex b/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.tex
index 1fbac1e5b42..0b64e144877 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.tex
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.tex
@@ -43,8 +43,8 @@ The released version of this bundle is available from CTAN.
This file describes functions that were expected to be completely
stable, but whose syntax has changed in ways that may potentially
require code relying on them to be changed. This file does not include
-bug-fixes, nor backward-compatible extensions of the syntax, nor changes
-to functions in \pkg{l3candidates}, nor functions that were completely
+bug-fixes, nor backward-compatible extensions of the syntax,
+nor functions that were completely
deprecated: the latter are listed in \texttt{l3obsolete.txt}. Only
changes after August 2011 are listed, with an approximate date.
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3term-glossary.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3term-glossary.pdf
index 2e4db4a60c9..da4ee7e7294 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3term-glossary.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3term-glossary.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/source3.pdf b/Master/texmf-dist/doc/latex/l3kernel/source3.pdf
index 8485500fb3d..d74db5c7963 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/source3.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/source3.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/source3body.tex b/Master/texmf-dist/doc/latex/l3kernel/source3body.tex
index 8066b02fda6..5ccc1401972 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/source3body.tex
+++ b/Master/texmf-dist/doc/latex/l3kernel/source3body.tex
@@ -321,7 +321,7 @@ following variable types:
\item[\texttt{box}] Box register.
\item[\texttt{coffin}] A \enquote{box with handles} --- a higher-level
data type for carrying out \texttt{box} alignment operations.
- \item[\texttt{flag}] Integer that can be incremented expandably.
+ \item[\texttt{flag}] Non-negative integer that can be incremented expandably.
\item[\texttt{fparray}] Fixed-size array of floating point values.
\item[\texttt{intarray}] Fixed-size array of integers.
\item[\texttt{ior}/\texttt{iow}] An input or output stream, for
@@ -335,7 +335,7 @@ following variable types:
Modules focussed on variable usage typically provide four scratch variables,
two local and two global, with names of the form
-\cs{\meta{scope}_tmpa_\meta{type}}/\cs{\meta{scope}_tmpb_\meta{type}}. These
+\cs[no-index]{\meta{scope}_tmpa_\meta{type}}/\cs[no-index]{\meta{scope}_tmpb_\meta{type}}. These
are never used by the core code. The nature of \TeX{} grouping means that as
with any other scratch variable, these should only be set and used with no
intervening third-party code.
@@ -607,9 +607,7 @@ used on top of \LaTeXe{} if \tn{outer} tokens are used in the arguments.
\DocInput{l3color.dtx}
\DocInput{l3pdf.dtx}
-\part{Additions and removals}
-
-\DocInput{l3candidates.dtx}
+\part{Removals}
\ExplSyntaxOn
\clist_gput_right:Nn \g_docinput_clist { l3deprecation.dtx }
diff --git a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
index c62a81f8ad4..8fbb777dcb0 100644
--- a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
@@ -24,7 +24,7 @@
%
%<*driver|generic|package|2ekernel>
%</driver|generic|package|2ekernel>
-\def\ExplFileDate{2024-01-04}%
+\def\ExplFileDate{2024-01-22}%
%<*driver>
\documentclass[full]{l3doc}
\usepackage{graphicx}
@@ -51,7 +51,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -425,11 +425,14 @@
% type for carrying out |box| alignment operations;
% \item[dim] \enquote{rigid} lengths;
% \item[fp] floating-point values;
+% \item[fparray] fixed-size vector of floating-point values;
+% \item[int] integer-valued count register;
+% \item[intarray] fixed-size vector of integer values;
% \item[ior] an input stream (for reading from a file);
% \item[iow] an output stream (for writing to a file);
-% \item[int] integer-valued count register;
% \item[muskip] math mode \enquote{rubber} lengths;
% \item[prop] property list;
+% \item[regex] regular expression;
% \item[seq] sequence: a data-type used to implement lists (with
% access at both ends) and stacks;
% \item[skip] \enquote{rubber} lengths;
@@ -437,6 +440,7 @@
% characters have category \enquote{other} (catcode~$12$),
% other than spaces which are category \enquote{space}
% (catcode~$10$);
+% \item[token] equal to a single arbitrary token;
% \item[tl] \enquote{token list variables}: placeholders for token lists.
% \end{description}
% When the \meta{type} and \meta{module} are identical (as often happens in
@@ -819,22 +823,22 @@
%
% The distribution of \pkg{expl3} is split up into three packages on
% CTAN: \pkg{l3kernel}, \pkg{l3packages} and \pkg{l3experimental}.
-% For historical reasons,
+% The core programming layer provided by \pkg{l3kernel} has been loaded
+% as part of the \LaTeX{} since 2020-02-02. For historical reasons, in
+% older kernel releases
% \begin{verbatim}
% \RequirePackage{expl3}
% \end{verbatim}
-% loads the code now distributed as \pkg{l3kernel}. This monolithic
+% loads the code distributed as \pkg{l3kernel}. This monolithic
% package contains all of the modules regarded by the team as stable,
% and any changes in this code are very limited. This material is
% therefore suitable for use in third-party packages without concern
% about changes in support. All of this code is documented in
-% \texttt{interface3.pdf}. With an up-to-date \LaTeXe{} kernel, this
-% code is built into the format file and therefore can be used
-% without any further steps.
+% \texttt{interface3.pdf}.
%
-% The material in \pkg{l3packages} is also stable, but is not always
-% at a programming level: most notably, \pkg{xparse} is stable and
-% suitable for wider use.
+% The material in \pkg{l3packages} is also stable; this bundle provides
+% user-level commands, some of which have been integrated in the
+% \LaTeX{} kernel.
%
% Finally, \pkg{l3experimental} contains modules ready for public use
% but not yet integrated into \pkg{l3kernel}. These modules have to
@@ -856,8 +860,8 @@
% For example, you may well need \tn{IfPackageLoadedTF}, as there
% is currently no native \pkg{expl3} package loading module.
% \item User level macros should be generated using the mechanism
-% available in the \pkg{xparse} package, which is part of the
-% \texttt{l3package} bundle.
+% available in the \pkg{ltcmd} module, which is part of the
+% the \LaTeX{} kernel since 2020-10-01.
% \item At an internal level, most functions should be generated
% \tn{long} (using \cs{cs_new:Npn}) rather than \enquote{short} (using
% \cs{cs_new_nopar:Npn}).
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3.ins b/Master/texmf-dist/source/latex/l3kernel/l3.ins
index 776e777c465..29402305057 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3.ins
+++ b/Master/texmf-dist/source/latex/l3kernel/l3.ins
@@ -113,7 +113,6 @@ and all files in that bundle must be distributed together.
\from{l3text-case.dtx} {package}
\from{l3text-map.dtx} {package}
\from{l3text-purify.dtx}{package}
- \from{l3candidates.dtx} {package}
\from{l3legacy.dtx} {package}
\from{l3deprecation.dtx}{package}
}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
index 761aa46a792..0be8bdc8b25 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -2824,17 +2824,18 @@
% The \texttt{c} variant is careful not to add the control sequence
% to the hash table if it isn't there yet, and it also avoids nesting
% \TeX{} conditionals in case |#1| is unbalanced in this matter.
+% We optimize the case where the command exists by reducing as much as
+% possible the tokens in the conditional.
% \begin{macrocode}
\cs_new_protected:Npn \cs_undefine:N #1
{ \cs_gset_eq:NN #1 \tex_undefined:D }
\cs_new_protected:Npn \cs_undefine:c #1
{
\if_cs_exist:w #1 \cs_end:
- \exp_after:wN \use:n
\else:
- \exp_after:wN \use_none:n
+ \use_i:nnnn
\fi:
- { \cs_gset_eq:cN {#1} \tex_undefined:D }
+ \exp_args:Nc \cs_undefine:N {#1}
}
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3bitset.dtx b/Master/texmf-dist/source/latex/l3kernel/l3bitset.dtx
index d362d59adb0..498e9954cc8 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3bitset.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3bitset.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
index 1e8af0f79e4..c1fb85f8c0d 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
index 82041737ef6..ae3bc283c2f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
deleted file mode 100644
index 05e3fdc23a0..00000000000
--- a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
+++ /dev/null
@@ -1,150 +0,0 @@
-% \iffalse meta-comment
-%
-%% File: l3candidates.dtx
-%
-% Copyright (C) 2012-2024 The LaTeX Project
-%
-% It may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License (LPPL), either version 1.3c of this
-% license or (at your option) any later version. The latest version
-% of this license is in the file
-%
-% https://www.latex-project.org/lppl.txt
-%
-% This file is part of the "l3kernel bundle" (The Work in LPPL)
-% and all files in that bundle must be distributed together.
-%
-% -----------------------------------------------------------------------
-%
-% The development version of the bundle can be found at
-%
-% https://github.com/latex3/latex3
-%
-% for those people who are interested.
-%
-%<*driver>
-\documentclass[full,kernel]{l3doc}
-\begin{document}
- \DocInput{\jobname.dtx}
-\end{document}
-%</driver>
-% \fi
-%
-% \title{^^A
-% The \pkg{l3candidates} module\\ Experimental additions to
-% \pkg{l3kernel}^^A
-% }
-%
-% \author{^^A
-% The \LaTeX{} Project\thanks
-% {^^A
-% E-mail:
-% \href{mailto:latex-team@latex-project.org}
-% {latex-team@latex-project.org}^^A
-% }^^A
-% }
-%
-% \date{Released 2024-01-04}
-%
-% \maketitle
-%
-% \begin{documentation}
-%
-% \section{Important notice}
-%
-% This module provides a space in which functions can be added to
-% \pkg{l3kernel} (\pkg{expl3}) while still being experimental.
-% \begin{quote}
-% \bfseries
-% As such, the
-% functions here may not remain in their current form, or indeed at all,
-% in \pkg{l3kernel} in the future.
-% \end{quote}
-% In contrast to the material in
-% \pkg{l3experimental}, the functions here are all \emph{small} additions to
-% the kernel. We encourage programmers to test them out and report back on
-% the \texttt{LaTeX-L} mailing list.
-%
-% \medskip
-%
-% Thus, if you intend to use any of these functions from the candidate module in a public package
-% offered to others for productive use (e.g., being placed on CTAN) please consider the following points carefully:
-% \begin{itemize}
-% \item Be prepared that your public packages might require updating when such functions
-% are being finalized.
-% \item Consider informing us that you use a particular function in your public package, e.g., by
-% discussing this on the \texttt{LaTeX-L}
-% mailing list. This way it becomes easier to coordinate any updates necessary without issues
-% for the users of your package.
-% \item Discussing and understanding use cases for a particular addition or concept also helps to
-% ensure that we provide the right interfaces in the final version so please give us feedback
-% if you consider a certain candidate function useful (or not).
-% \end{itemize}
-% We only add functions in this space if we consider them being serious candidates for a final inclusion
-% into the kernel. However, real use sometimes leads to better ideas, so functions from this module are
-% \textbf{not necessarily stable} and we may have to adjust them!
-%
-% \section{Additions to \pkg{l3seq}}
-%
-% \begin{function}{\seq_set_filter:NNn, \seq_gset_filter:NNn}
-% \begin{syntax}
-% \cs{seq_set_filter:NNn} \meta{sequence_1} \meta{sequence_2} \Arg{inline boolexpr}
-% \end{syntax}
-% Evaluates the \meta{inline boolexpr} for every \meta{item} stored
-% within the \meta{sequence_2}. The \meta{inline boolexpr}
-% receives the \meta{item} as |#1|. The sequence of all \meta{items}
-% for which the \meta{inline boolexpr} evaluated to \texttt{true}
-% is assigned to \meta{sequence_1}.
-% \begin{texnote}
-% Contrarily to other mapping functions, \cs{seq_map_break:} cannot
-% be used in this function, and would lead to low-level \TeX{} errors.
-% \end{texnote}
-% \end{function}
-%
-% \end{documentation}
-%
-% \begin{implementation}
-%
-% \section{\pkg{l3candidates} implementation}
-%
-% \begin{macrocode}
-%<*package>
-% \end{macrocode}
-%
-% \subsection{Additions to \pkg{l3seq}}
-%
-% \begin{macrocode}
-%<@@=seq>
-% \end{macrocode}
-%
-% \begin{macro}{\seq_set_filter:NNn, \seq_gset_filter:NNn}
-% \begin{macro}{\@@_set_filter:NNNn}
-% Similar to \cs{seq_map_inline:Nn}, without a
-% \cs{prg_break_point:} because the user's code
-% is performed within the evaluation of a boolean expression,
-% and skipping out of that would break horribly.
-% The \cs{@@_wrap_item:n} function inserts the relevant
-% \cs{@@_item:n} without expansion in the input stream,
-% hence in the \texttt{e}-expanding assignment.
-% \begin{macrocode}
-\cs_new_protected:Npn \seq_set_filter:NNn
- { \@@_set_filter:NNNn \__kernel_tl_set:Ne }
-\cs_new_protected:Npn \seq_gset_filter:NNn
- { \@@_set_filter:NNNn \__kernel_tl_gset:Ne }
-\cs_new_protected:Npn \@@_set_filter:NNNn #1#2#3#4
- {
- \@@_push_item_def:n { \bool_if:nT {#4} { \@@_wrap_item:n {##1} } }
- #1 #2 { #3 }
- \@@_pop_item_def:
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macrocode}
-%</package>
-% \end{macrocode}
-%
-% \end{implementation}
-%
-% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3cctab.dtx b/Master/texmf-dist/source/latex/l3kernel/l3cctab.dtx
index 325d4616dfa..e3285d9bd95 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3cctab.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3cctab.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
index 7b64db9863a..a8e24c2a300 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -165,10 +165,10 @@
% \clist_gset_eq:Nc, \clist_gset_eq:cc
% }
% \begin{syntax}
-% \cs{clist_set_eq:NN} \meta{comma list_1} \meta{comma list_2}
+% \cs{clist_set_eq:NN} \meta{clist~var_1} \meta{clist~var_2}
% \end{syntax}
-% Sets the content of \meta{comma list_1} equal to that of
-% \meta{comma list_2}. To set a token list variable equal to a comma
+% Sets the content of \meta{clist~var_1} equal to that of
+% \meta{clist~var_2}. To set a token list variable equal to a comma
% list variable, use \cs{tl_set_eq:NN}. Conversely, setting a comma
% list variable to a token list is unadvisable unless one checks
% space-trimming and related issues.
@@ -182,10 +182,10 @@
% \clist_gset_from_seq:Nc, \clist_gset_from_seq:cc
% }
% \begin{syntax}
-% \cs{clist_set_from_seq:NN} \meta{clist~var} \meta{sequence}
+% \cs{clist_set_from_seq:NN} \meta{clist~var} \meta{seq~var}
% \end{syntax}
-% Converts the data in the \meta{sequence} into a \meta{clist~var}:
-% the original \meta{sequence} is unchanged.
+% Converts the data in the \meta{seq~var} into a \meta{clist~var}:
+% the original \meta{seq~var} is unchanged.
% Items which contain either spaces or commas are surrounded by braces.
% \end{function}
%
@@ -195,11 +195,11 @@
% \clist_gconcat:NNN, \clist_gconcat:ccc
% }
% \begin{syntax}
-% \cs{clist_concat:NNN} \meta{comma list_1} \meta{comma list_2} \meta{comma list_3}
+% \cs{clist_concat:NNN} \meta{clist~var_1} \meta{clist~var_2} \meta{clist~var_3}
% \end{syntax}
-% Concatenates the content of \meta{comma list_2} and \meta{comma list_3}
-% together and saves the result in \meta{comma list_1}. The items in
-% \meta{comma list_2} are placed at the left side of the new comma list.
+% Concatenates the content of \meta{clist~var_2} and \meta{clist~var_3}
+% together and saves the result in \meta{clist~var_1}. The items in
+% \meta{clist~var_2} are placed at the left side of the new comma list.
% \end{function}
%
% \begin{function}[EXP, pTF, added=2012-03-03]
@@ -475,8 +475,8 @@
% (token list) \meta{variable} and applies the \meta{code}. The
% \meta{code} will usually make use of the \meta{variable}, but this
% is not enforced. The assignments to the \meta{variable} are local.
-% Its value after the loop is the last \meta{item} in the \meta{comma
-% list}, or its original value if there were no \meta{item}. The
+% Its value after the loop is the last \meta{item} in the \meta{clist~var},
+% or its original value if there were no \meta{item}. The
% \meta{items} are returned from left to right.
% \end{function}
%
@@ -1067,9 +1067,9 @@
% in the case of an empty comma-list.
% \begin{macrocode}
\cs_new_protected:Npn \clist_set_from_seq:NN
- { \@@_set_from_seq:NNNN \clist_clear:N \__kernel_tl_set:Ne }
+ { \@@_set_from_seq:NNNN \clist_clear:N \__kernel_tl_set:Nx }
\cs_new_protected:Npn \clist_gset_from_seq:NN
- { \@@_set_from_seq:NNNN \clist_gclear:N \__kernel_tl_gset:Ne }
+ { \@@_set_from_seq:NNNN \clist_gclear:N \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \@@_set_from_seq:NNNN #1#2#3#4
{
\seq_if_empty:NTF #4
@@ -1108,9 +1108,9 @@
% a little work to do.
% \begin{macrocode}
\cs_new_protected:Npn \clist_concat:NNN
- { \@@_concat:NNNN \__kernel_tl_set:Ne }
+ { \@@_concat:NNNN \__kernel_tl_set:Nx }
\cs_new_protected:Npn \clist_gconcat:NNN
- { \@@_concat:NNNN \__kernel_tl_gset:Ne }
+ { \@@_concat:NNNN \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \@@_concat:NNNN #1#2#3#4
{
#1 #2
@@ -1155,9 +1155,9 @@
% }
% \begin{macrocode}
\cs_new_protected:Npn \clist_set:Nn #1#2
- { \__kernel_tl_set:Ne #1 { \@@_sanitize:n {#2} } }
+ { \__kernel_tl_set:Nx #1 { \@@_sanitize:n {#2} } }
\cs_new_protected:Npn \clist_gset:Nn #1#2
- { \__kernel_tl_gset:Ne #1 { \@@_sanitize:n {#2} } }
+ { \__kernel_tl_gset:Nx #1 { \@@_sanitize:n {#2} } }
\cs_generate_variant:Nn \clist_set:Nn { NV , Ne , c , cV , ce }
\cs_generate_variant:Nn \clist_set:Nn { No , Nx , co , cx }
\cs_generate_variant:Nn \clist_gset:Nn { NV , Ne , c , cV , ce }
@@ -1295,9 +1295,9 @@
% result can safely be an empty comma list.
% \begin{macrocode}
\cs_new_protected:Npn \clist_pop:NN
- { \@@_pop:NNN \__kernel_tl_set:Ne }
+ { \@@_pop:NNN \__kernel_tl_set:Nx }
\cs_new_protected:Npn \clist_gpop:NN
- { \@@_pop:NNN \__kernel_tl_gset:Ne }
+ { \@@_pop:NNN \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \@@_pop:NNN #1#2#3
{
\if_meaning:w #2 \c_empty_clist
@@ -1342,9 +1342,9 @@
}
\prg_generate_conditional_variant:Nnn \clist_get:NN { c } { T , F , TF }
\prg_new_protected_conditional:Npnn \clist_pop:NN #1#2 { T , F , TF }
- { \@@_pop_TF:NNN \__kernel_tl_set:Ne #1 #2 }
+ { \@@_pop_TF:NNN \__kernel_tl_set:Nx #1 #2 }
\prg_new_protected_conditional:Npnn \clist_gpop:NN #1#2 { T , F , TF }
- { \@@_pop_TF:NNN \__kernel_tl_gset:Ne #1 #2 }
+ { \@@_pop_TF:NNN \__kernel_tl_gset:Nx #1 #2 }
\cs_new_protected:Npn \@@_pop_TF:NNN #1#2#3
{
\if_meaning:w #2 \c_empty_clist
@@ -1473,9 +1473,9 @@
% the second step removes it.
% \begin{macrocode}
\cs_new_protected:Npn \clist_remove_all:Nn
- { \@@_remove_all:NNNn \clist_set_from_seq:NN \__kernel_tl_set:Ne }
+ { \@@_remove_all:NNNn \clist_set_from_seq:NN \__kernel_tl_set:Nx }
\cs_new_protected:Npn \clist_gremove_all:Nn
- { \@@_remove_all:NNNn \clist_gset_from_seq:NN \__kernel_tl_gset:Ne }
+ { \@@_remove_all:NNNn \clist_gset_from_seq:NN \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \@@_remove_all:NNNn #1#2#3#4
{
\@@_if_wrap:nTF {#4}
@@ -1529,9 +1529,9 @@
% \texttt{N}-type comma lists, but the slow-down is not too bad.
% \begin{macrocode}
\cs_new_protected:Npn \clist_reverse:N #1
- { \__kernel_tl_set:Ne #1 { \exp_args:No \clist_reverse:n {#1} } }
+ { \__kernel_tl_set:Nx #1 { \exp_args:No \clist_reverse:n {#1} } }
\cs_new_protected:Npn \clist_greverse:N #1
- { \__kernel_tl_gset:Ne #1 { \exp_args:No \clist_reverse:n {#1} } }
+ { \__kernel_tl_gset:Nx #1 { \exp_args:No \clist_reverse:n {#1} } }
\cs_generate_variant:Nn \clist_reverse:N { c }
\cs_generate_variant:Nn \clist_greverse:N { c }
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
index e3d23ea5375..c6882fe5b39 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3color.dtx b/Master/texmf-dist/source/latex/l3kernel/l3color.dtx
index 7f9e36e6dfd..950bf3d6beb 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3color.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3color.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3debug.dtx b/Master/texmf-dist/source/latex/l3kernel/l3debug.dtx
index 423ffd55776..e8f577a4bb6 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3debug.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3debug.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -99,13 +99,16 @@
% different.
% \end{function}
%
-% \begin{function}[EXP]{\__kernel_chk_flag_exist:n}
+% \begin{function}[EXP]{\__kernel_chk_flag_exist:NN}
% \begin{syntax}
-% \cs{__kernel_chk_flag_exist:n} \Arg{flag}
+% \cs{__kernel_chk_flag_exist:NN}
+% \meta{function} \meta{flag}
% \end{syntax}
% This function is only created if debugging is enabled. It checks
% that the \meta{flag} is defined according to the criterion for
-% \cs{flag_if_exist_p:n}, and if not raises a kernel-level error.
+% \cs{flag_if_exist_p:N}, and if not raises a kernel-level error and
+% calls the function with the argument \cs{l_tmpa_flag} to proceed
+% somehow without producing too many errors.
% \end{function}
%
% \begin{function}{\__kernel_debug_log:e}
@@ -128,7 +131,7 @@
%
% Standard file identification.
% \begin{macrocode}
-\ProvidesExplFile{l3debug.def}{2024-01-04}{}{L3 Debugging support}
+\ProvidesExplFile{l3debug.def}{2024-01-22}{}{L3 Debugging support}
% \end{macrocode}
%
% \begin{variable}{\s_@@_stop}
@@ -220,7 +223,7 @@
}
\cs_set_protected:Npn \debug_resume:
{
- \__kernel_tl_set:Ne \l_@@_suspended_tl
+ \__kernel_tl_set:Nx \l_@@_suspended_tl
{ \tl_tail:N \l_@@_suspended_tl }
\tl_if_empty:NT \l_@@_suspended_tl
{
@@ -241,7 +244,7 @@
% \__kernel_chk_cs_exist:N,
% \__kernel_chk_cs_exist:c
% }
-% \begin{macro}[EXP]{\__kernel_chk_flag_exist:n}
+% \begin{macro}[EXP]{\__kernel_chk_flag_exist:NN}
% \begin{macro}{\__kernel_chk_var_local:N, \__kernel_chk_var_global:N}
% \begin{macro}{\__kernel_chk_var_scope:NN}
% When debugging is enabled these two functions set up functions that
@@ -258,7 +261,7 @@
\cs_new_protected:Npn \__kernel_chk_var_exist:N #1 { }
\cs_new_protected:Npn \__kernel_chk_cs_exist:N #1 { }
\cs_generate_variant:Nn \__kernel_chk_cs_exist:N { c }
-\cs_new:Npn \__kernel_chk_flag_exist:n #1 { }
+\cs_new:Npn \__kernel_chk_flag_exist:NN { }
\cs_new_protected:Npn \__kernel_chk_var_local:N #1 { }
\cs_new_protected:Npn \__kernel_chk_var_global:N #1 { }
\cs_new_protected:Npn \__kernel_chk_var_scope:NN #1#2 { }
@@ -282,13 +285,14 @@
{ \token_to_str:N ##1 }
}
}
- \cs_set:Npn \__kernel_chk_flag_exist:n ##1
+ \cs_set:Npn \__kernel_chk_flag_exist:NN ##1##2
{
- \@@_suspended:T \use_none:nnn
- \flag_if_exist:nF {##1}
+ \@@_suspended:T \use_iii:nnnn
+ \flag_if_exist:NTF ##2
+ { ##1 ##2 }
{
- \msg_expandable_error:nnn
- { kernel } { bad-variable } { flag~##1~ }
+ \msg_expandable_error:nnn { kernel } { bad-variable } {##2}
+ ##1 \l_tmpa_flag
}
}
\cs_set_protected:Npn \__kernel_chk_var_scope:NN
@@ -313,7 +317,7 @@
{
\cs_set_protected:Npn \__kernel_chk_var_exist:N ##1 { }
\cs_set_protected:Npn \__kernel_chk_cs_exist:N ##1 { }
- \cs_set:Npn \__kernel_chk_flag_exist:N ##1 { }
+ \cs_set:Npn \__kernel_chk_flag_exist:NN { }
\cs_set_protected:Npn \__kernel_chk_var_local:N ##1 { }
\cs_set_protected:Npn \__kernel_chk_var_global:N ##1 { }
\cs_set_protected:Npn \__kernel_chk_var_scope:NN ##1##2 { }
@@ -510,11 +514,11 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_generate_parameter_list:NNN #1#2#3
{
- \__kernel_tl_set:Ne \l_@@_internal_tl
+ \__kernel_tl_set:Nx \l_@@_internal_tl
{ \exp_last_unbraced:Nf \use_ii:nnn \cs_split_function:N #1 }
- \__kernel_tl_set:Ne #2
+ \__kernel_tl_set:Nx #2
{ \exp_args:NV \@@_build_parm_text:n \l_@@_internal_tl }
- \__kernel_tl_set:Ne #3
+ \__kernel_tl_set:Nx #3
{ \exp_args:NV \@@_build_arg_list:n \l_@@_internal_tl }
}
\cs_new:Npn \@@_build_parm_text:n #1
@@ -790,8 +794,8 @@
%
%
% \begin{macrocode}
-\cs_gset_protected:Npn \__kernel_tl_set:Ne { \cs_set_nopar:Npe }
-\cs_gset_protected:Npn \__kernel_tl_gset:Ne { \cs_gset_nopar:Npe }
+\cs_gset_protected:Npn \__kernel_tl_set:Nx { \cs_set_nopar:Npe }
+\cs_gset_protected:Npn \__kernel_tl_gset:Nx { \cs_gset_nopar:Npe }
% \end{macrocode}
%
% Patching where the first argument to a function needs scope-checking:
@@ -842,7 +846,7 @@
\str_set_eq:NN
\str_put_left:Nn
\str_put_right:Nn
- \__kernel_tl_set:Ne
+ \__kernel_tl_set:Nx
\tl_clear:N
\tl_set_eq:NN
\tl_put_left:Nn
@@ -911,7 +915,7 @@
\str_gset_eq:NN
\str_gput_left:Nn
\str_gput_right:Nn
- \__kernel_tl_gset:Ne
+ \__kernel_tl_gset:Nx
\tl_gclear:N
\tl_gset_eq:NN
\tl_gput_left:Nn
@@ -957,16 +961,16 @@
% Flag functions.
% \begin{macrocode}
\__kernel_patch:nnn
- { \__kernel_chk_flag_exist:n {#1} }
+ { \__kernel_chk_flag_exist:NN }
{ }
{
- \flag_if_raised:nT
- \flag_if_raised:nF
- \flag_if_raised:nTF
- \flag_if_raised_p:n
- \flag_height:n
- \flag_ensure_raised:n
- \flag_clear:n
+ \flag_ensure_raised:N
+ \flag_height:N
+ \flag_if_raised:NT
+ \flag_if_raised:NF
+ \flag_if_raised:NTF
+ \flag_if_raised_p:N
+ \flag_raise:N
}
% \end{macrocode}
%
@@ -981,6 +985,17 @@
{ }
{ \cctab_new:N }
\__kernel_patch:nnn
+ { \__kernel_chk_var_scope:NN l #1 }
+ { }
+ { \flag_new:N }
+ \__kernel_patch:nnn
+ {
+ \__kernel_chk_var_scope:NN l #1
+ \__kernel_chk_flag_exist:NN
+ }
+ { }
+ { \flag_clear:N }
+ \__kernel_patch:nnn
{ \__kernel_chk_var_scope:NN g #1 }
{ }
{ \intarray_new:Nn }
@@ -1069,7 +1084,7 @@
{
\@@_trace_push:nnN { regex } { 1 } \@@_escape_use:nnnn
\group_begin:
- \__kernel_tl_set:Ne \l_@@_internal_a_tl
+ \__kernel_tl_set:Nx \l_@@_internal_a_tl
{ \@@_trace_pop:nnN { regex } { 1 } \@@_escape_use:nnnn }
\use_none:nnn
}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx b/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx
index 59007c67253..99b52ec961d 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -209,229 +209,6 @@
}
% \end{macrocode}
%
-% \subsection{Removed functions}
-%
-% \begin{macro}{\@@_old_protected:Nnn, \@@_old:Nnn}
-% Short-hands for old commands whose definition does not matter
-% any more as they were removed.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_old_protected:Nnn #1#2#3
- {
- \__kernel_patch_deprecation:nnNNpn {#3} {#2}
- \cs_gset_protected:Npn #1 { }
- }
-\cs_new_protected:Npn \@@_old:Nnn #1#2#3
- {
- \__kernel_patch_deprecation:nnNNpn {#3} {#2}
- \cs_gset:Npn #1 { }
- }
-\@@_old_protected:Nnn \box_gset_eq_clear:NN
- { \box_gset_eq_drop:NN } { 2021-07-01 }
-\@@_old_protected:Nnn \box_set_eq_clear:NN
- { \box_set_eq_drop:NN } { 2021-07-01 }
-\@@_old_protected:Nnn \box_resize:Nnn
- { \box_resize_to_wd_and_ht_plus_dp:Nnn } { 2019-01-01 }
-\@@_old_protected:Nnn \box_use_clear:N
- { \box_use_drop:N } { 2019-01-01 }
-\@@_old:Nnn \c_job_name_tl
- { \c_sys_jobname_str } { 2017-01-01 }
-\@@_old:Nnn \c_minus_one
- { -1 } { 2019-01-01 }
-\@@_old:Nnn \c_zero
- { 0 } { 2020-01-01 }
-\@@_old:Nnn \c_one
- { 1 } { 2020-01-01 }
-\@@_old:Nnn \c_two
- { 2 } { 2020-01-01 }
-\@@_old:Nnn \c_three
- { 3 } { 2020-01-01 }
-\@@_old:Nnn \c_four
- { 4 } { 2020-01-01 }
-\@@_old:Nnn \c_five
- { 5 } { 2020-01-01 }
-\@@_old:Nnn \c_six
- { 6 } { 2020-01-01 }
-\@@_old:Nnn \c_seven
- { 7 } { 2020-01-01 }
-\@@_old:Nnn \c_eight
- { 8 } { 2020-01-01 }
-\@@_old:Nnn \c_nine
- { 9 } { 2020-01-01 }
-\@@_old:Nnn \c_ten
- { 10 } { 2020-01-01 }
-\@@_old:Nnn \c_eleven
- { 11 } { 2020-01-01 }
-\@@_old:Nnn \c_twelve
- { 12 } { 2020-01-01 }
-\@@_old:Nnn \c_thirteen
- { 13 } { 2020-01-01 }
-\@@_old:Nnn \c_fourteen
- { 14 } { 2020-01-01 }
-\@@_old:Nnn \c_fifteen
- { 15 } { 2020-01-01 }
-\@@_old:Nnn \c_sixteen
- { 16 } { 2020-01-01 }
-\@@_old:Nnn \c_thirty_two
- { 32 } { 2020-01-01 }
-\@@_old:Nnn \c_one_hundred
- { 100 } { 2020-01-01 }
-\@@_old:Nnn \c_two_hundred_fifty_five
- { 255 } { 2020-01-01 }
-\@@_old:Nnn \c_two_hundred_fifty_six
- { 256 } { 2020-01-01 }
-\@@_old:Nnn \c_one_thousand
- { 1000 } { 2020-01-01 }
-\@@_old:Nnn \c_ten_thousand
- { 10000 } { 2020-01-01 }
-\@@_old:Nnn \c_term_ior
- { -1 } { 2021-07-01 }
-\@@_old:Nnn \dim_case:nnn
- { \dim_case:nnF } { 2015-07-14 }
-\@@_old_protected:Nnn \file_add_path:nN
- { \file_get_full_name:nN } { 2019-01-01 }
-\@@_old_protected:Nnn \file_if_exist_input:nT
- { \file_if_exist:nT and~ \file_input:n } { 2018-03-05 }
-\@@_old_protected:Nnn \file_if_exist_input:nTF
- { \file_if_exist:nT and~ \file_input:n } { 2018-03-05 }
-\@@_old_protected:Nnn \file_list:
- { \file_log_list: } { 2019-01-01 }
-\@@_old:Nnn \file_path_include:n
- { \seq_put_right:Nn \l_file_search_path_seq } { 2019-01-01 }
-\@@_old_protected:Nnn \file_path_remove:n
- { \seq_remove_all:Nn \l_file_search_path_seq } { 2019-01-01 }
-\@@_old:Nnn \g_file_current_name_tl
- { \g_file_curr_name_str } { 2019-01-01 }
-\@@_old_protected:Nnn \hbox_unpack_clear:N
- { \hbox_unpack_drop:N } { 2021-07-01 }
-\@@_old:Nnn \int_case:nnn
- { \int_case:nnF } { 2015-07-14 }
-\@@_old:Nnn \int_from_binary:n
- { \int_from_bin:n } { 2016-01-05 }
-\@@_old:Nnn \int_from_hexadecimal:n
- { \int_from_hex:n } { 2016-01-05 }
-\@@_old:Nnn \int_from_octal:n
- { \int_from_oct:n } { 2016-01-05 }
-\@@_old:Nnn \int_to_binary:n
- { \int_to_bin:n } { 2016-01-05 }
-\@@_old:Nnn \int_to_hexadecimal:n
- { \int_to_hex:n } { 2016-01-05 }
-\@@_old:Nnn \int_to_octal:n
- { \int_to_oct:n } { 2016-01-05 }
-\@@_old_protected:Nnn \ior_get_str:NN
- { \ior_str_get:NN } { 2018-03-05 }
-\@@_old_protected:Nnn \ior_list_streams:
- { \ior_show_list: } { 2019-01-01 }
-\@@_old_protected:Nnn \ior_log_streams:
- { \ior_log_list: } { 2019-01-01 }
-\@@_old_protected:Nnn \iow_list_streams:
- { \iow_show_list: } { 2019-01-01 }
-\@@_old_protected:Nnn \iow_log_streams:
- { \iow_log_list: } { 2019-01-01 }
-\@@_old:Nnn \lua_escape_x:n
- { \lua_escape:e } { 2020-01-01 }
-\@@_old:Nnn \lua_now_x:n
- { \lua_now:e } { 2020-01-01 }
-\@@_old_protected:Nnn \lua_shipout_x:n
- { \lua_shipout_e:n } { 2020-01-01 }
-\@@_old:Nnn \luatex_if_engine_p:
- { \sys_if_engine_luatex_p: } { 2017-01-01 }
-\@@_old:Nnn \luatex_if_engine:F
- { \sys_if_engine_luatex:F } { 2017-01-01 }
-\@@_old:Nnn \luatex_if_engine:T
- { \sys_if_engine_luatex:T } { 2017-01-01 }
-\@@_old:Nnn \luatex_if_engine:TF
- { \sys_if_engine_luatex:TF } { 2017-01-01 }
-\@@_old_protected:Nnn \msg_interrupt:nnn
- { [Defined~error~message] } { 2020-01-01 }
-\@@_old_protected:Nnn \msg_log:n
- { \iow_log:n } { 2020-01-01 }
-\@@_old_protected:Nnn \msg_term:n
- { \iow_term:n } { 2020-01-01 }
-\@@_old:Nnn \pdftex_if_engine_p:
- { \sys_if_engine_pdftex_p: } { 2017-01-01 }
-\@@_old:Nnn \pdftex_if_engine:F
- { \sys_if_engine_pdftex:F } { 2017-01-01 }
-\@@_old:Nnn \pdftex_if_engine:T
- { \sys_if_engine_pdftex:T } { 2017-01-01 }
-\@@_old:Nnn \pdftex_if_engine:TF
- { \sys_if_engine_pdftex:TF } { 2017-01-01 }
-\@@_old:Nnn \prop_get:cn
- { \prop_item:cn } { 2016-01-05 }
-\@@_old:Nnn \prop_get:Nn
- { \prop_item:Nn } { 2016-01-05 }
-\@@_old:Nnn \quark_if_recursion_tail_break:N
- { } { 2015-07-14 }
-\@@_old:Nnn \quark_if_recursion_tail_break:n
- { } { 2015-07-14 }
-\@@_old:Nnn \scan_align_safe_stop:
- { protected~commands } { 2017-01-01 }
-\@@_old:Nnn \sort_ordered:
- { \sort_return_same: } { 2019-01-01 }
-\@@_old:Nnn \sort_reversed:
- { \sort_return_swapped: } { 2019-01-01 }
-\@@_old:Nnn \str_case:nnn
- { \str_case:nnF } { 2015-07-14 }
-\@@_old:Nnn \str_case:onn
- { \str_case:onF } { 2015-07-14 }
-\@@_old:Nnn \str_case_x:nn
- { \str_case_e:nn } { 2020-01-01 }
-\@@_old:Nnn \str_case_x:nnn
- { \str_case_e:nnF } { 2015-07-14 }
-\@@_old:Nnn \str_case_x:nnT
- { \str_case_e:nnT } { 2020-01-01 }
-\@@_old:Nnn \str_case_x:nnTF
- { \str_case_e:nnTF } { 2020-01-01 }
-\@@_old:Nnn \str_case_x:nnF
- { \str_case_e:nnF } { 2020-01-01 }
-\@@_old:Nnn \str_if_eq_x_p:nn
- { \str_if_eq_p:ee } { 2020-01-01 }
-\@@_old:Nnn \str_if_eq_x:nnT
- { \str_if_eq:eeT } { 2020-01-01 }
-\@@_old:Nnn \str_if_eq_x:nnF
- { \str_if_eq:eeF } { 2020-01-01 }
-\@@_old:Nnn \str_if_eq_x:nnTF
- { \str_if_eq:eeTF } { 2020-01-01 }
-\@@_old_protected:Nnn \tl_show_analysis:N
- { \tl_analysis_show:N } { 2020-01-01 }
-\@@_old_protected:Nnn \tl_show_analysis:n
- { \tl_analysis_show:n } { 2020-01-01 }
-\@@_old:Nnn \tl_case:cnn
- { \exp_args:Nc \token_case_meaning:NnF } { 2015-07-14 }
-\@@_old:Nnn \tl_case:Nnn
- { \token_case_meaning:NnF } { 2015-07-14 }
-\@@_old_protected:Nnn \tl_gset_from_file:Nnn
- { \file_get:nnN } { 2021-07-01 }
-\@@_old_protected:Nnn \tl_gset_from_file_x:Nnn
- { \file_get:nnN } { 2021-07-01 }
-\@@_old_protected:Nnn \tl_set_from_file:Nnn
- { \file_get:nnN } { 2021-07-01 }
-\@@_old_protected:Nnn \tl_set_from_file_x:Nnn
- { \file_get:nnN } { 2021-07-01 }
-\@@_old_protected:Nnn \tl_to_lowercase:n
- { \tex_lowercase:D } { 2018-03-05 }
-\@@_old_protected:Nnn \tl_to_uppercase:n
- { \tex_uppercase:D } { 2018-03-05 }
-\@@_old:Nnn \token_get_arg_spec:N
- { \cs_argument_spec:N } { 2021-07-01 }
-\@@_old:Nnn \token_get_prefix_spec:N
- { \cs_prefix_spec:N } { 2021-07-01 }
-\@@_old:Nnn \token_get_replacement_spec:N
- { \cs_replacement_spec:N } { 2021-07-01 }
-\@@_old_protected:Nnn \token_new:Nn
- { \cs_new_eq:NN } { 2019-01-01 }
-\@@_old_protected:Nnn \vbox_unpack_clear:N
- { \vbox_unpack_drop:N } { 2021-07-01 }
-\@@_old:Nnn \xetex_if_engine_p:
- { \sys_if_engine_xetex_p: } { 2017-01-01 }
-\@@_old:Nnn \xetex_if_engine:F
- { \sys_if_engine_xetex:F } { 2017-01-01 }
-\@@_old:Nnn \xetex_if_engine:T
- { \sys_if_engine_xetex:T } { 2017-01-01 }
-\@@_old:Nnn \xetex_if_engine:TF
- { \sys_if_engine_xetex:TF } { 2017-01-01 }
-% \end{macrocode}
-% \end{macro}
-%
% \subsection{Deprecated \pkg{l3basics} functions}
%
% \begin{macrocode}
@@ -503,6 +280,39 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}[deprecated]
+% {
+% \keys_set_filter:nnnN, \keys_set_filter:nnVN,
+% \keys_set_filter:nnvN, \keys_set_filter:nnoN
+% }
+% \begin{macro}[deprecated]
+% {
+% \keys_set_filter:nnnnN, \keys_set_filter:nnVnN,
+% \keys_set_filter:nnvnN, \keys_set_filter:nnonN
+% }
+% \begin{macro}[deprecated]
+% {
+% \keys_set_filter:nnn, \keys_set_filter:nnV,
+% \keys_set_filter:nnv, \keys_set_filter:nno
+% }
+% We need a transition here so for the present this is commented out:
+% only needed for \texttt{latex-lab} code so this should not last for
+% too long.
+% \begin{macrocode}
+%\__kernel_patch_deprecation:nnNNpn { 2024-01-10 } { \keys_set_exclude_groups:nnn }
+\cs_set_protected:Npn \keys_set_filter:nnn { \keys_set_exclude_groups:nnn }
+\cs_generate_variant:Nn \keys_set_filter:nnn { nnV , nnv , nno }
+%\__kernel_patch_deprecation:nnNNpn { 2024-01-10 } { \keys_set_exclude_groups:nnnN }
+\cs_set_protected:Npn \keys_set_filter:nnnN { \keys_set_exclude_groups:nnnN }
+\cs_generate_variant:Nn \keys_set_filter:nnnN { nnV , nnv , nno }
+%\__kernel_patch_deprecation:nnNNpn { 2024-01-10 } { \keys_set_exclude_groups:nnnnN }
+\cs_set_protected:Npn \keys_set_filter:nnnnN { \keys_set_exclude_groups:nnnnN }
+\cs_generate_variant:Nn \keys_set_filter:nnnnN { nnV , nnv , nno }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Deprecated \pkg{l3pdf} functions}
%
% \begin{macrocode}
@@ -729,7 +539,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\tl_build_get:NN}
+% \begin{macro}[deprecated]{\tl_build_get:NN}
% \begin{macrocode}
\__kernel_patch_deprecation:nnNNpn { 2023-10-25 } { \tl_build_get_intermediate:NN }
\cs_new_protected:Npn \tl_build_get:NN { \tl_build_get_intermediate:NN }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
index d24fcce4f85..fde5ddd103f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
@@ -71,7 +71,7 @@ and all files in that bundle must be distributed together.
% This isn't included in the typeset documentation because it's a bit
% ugly:
%<*class>
-\ProvidesExplClass{l3doc}{2024-01-04}{}
+\ProvidesExplClass{l3doc}{2024-01-22}{}
{L3 Experimental documentation class}
%</class>
% \fi
@@ -84,7 +84,7 @@ and all files in that bundle must be distributed together.
% require you to do updates, if the class changes.}}
%
% \author{\Team}
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
% \maketitle
% \tableofcontents
%
@@ -237,8 +237,10 @@ and all files in that bundle must be distributed together.
% encoding (the standard setting) or leaves the font setup unchanged.
%
% \DescribeOption{kernel}
-% Determines whether \pkg{l3doc} treats |\__kernel_| commands and
-% |\(c|g|l)__kernel_| variables as allowable in code. In general,
+% Determines whether \pkg{l3doc} treats internal functions and variables
+% belonging to |kernel| module as allowable in code, for instance
+% \cs{__kernel_tl_to_str:w}, \cs{c__kernel_expl_date_tl}, and
+% \cs{l__kernel_expl_bool}. In general,
% \emph{no} internal material from outside the current module is allowed.
% However, for bootstrapping the \pkg{expl3} kernel, a small number of
% cross-module functions are needed. To suppress the error message that
@@ -270,6 +272,12 @@ and all files in that bundle must be distributed together.
% class option. To disable hyphenation of control sequences entirely, use
% \texttt{cs-break = false}.
%
+% By default, class options
+% \begin{verbatim}
+% full , check = false , checktest = false , lm-default
+% \end{verbatim}
+% are set.
+%
% \subsection{Partitioning documentation and implementation}
%
% \pkg{doc} uses the \cs{OnlyDocumentation}/\cs{AlsoImplementation}
@@ -322,7 +330,7 @@ and all files in that bundle must be distributed together.
% it doesn't rely on catcodes being \enquote{correct} and is therefore
% recommended.
%
-% These commands are aware of the |@@| \pkg{l3docstrip} syntax and
+% These commands are aware of the |@@| \pkg{DocStrip} syntax and
% replace such instances correctly in the typeset documentation.
% This only happens after a |%<@@=|\meta{module}|>| declaration.
%
@@ -343,7 +351,7 @@ and all files in that bundle must be distributed together.
% main index. By default, the \meta{module} is deduced
% automatically from the command name.
% \item |replace| is a boolean key (\texttt{true} by default) which
-% indicates whether to replace |@@| as \pkg{l3docstrip} does.
+% indicates whether to replace |@@| as \pkg{DocStrip} does.
% \end{itemize}
% These commands allow hyphenation of control sequences after (most) underscores.
% By default, a hyphen is used to mark the hyphenation, but this can be changed with
@@ -1046,7 +1054,7 @@ and all files in that bundle must be distributed together.
\cs_new_protected:Npn \@@_trim_right:Nn #1#2
{
\cs_set:Npn \@@_tmp:w ##1 #2 ##2 \q_stop { \exp_not:n {##1} }
- \__kernel_tl_set:Ne #1 { \exp_after:wN \@@_tmp:w #1 #2 \q_stop }
+ \__kernel_tl_set:Nx #1 { \exp_after:wN \@@_tmp:w #1 #2 \q_stop }
}
\cs_generate_variant:Nn \@@_trim_right:Nn { No }
% \end{macrocode}
@@ -1266,14 +1274,14 @@ and all files in that bundle must be distributed together.
\@@_if_almost_str:nTF {#1}
{
\@@_key_get_base_TF:nN {#1} \l_@@_tmpa_tl
- \__kernel_tl_set:Ne #2
+ \__kernel_tl_set:Nx #2
{ \@@_split_function_do:on \l_@@_tmpa_tl { \@@_base_form_aux:nnN } }
}
{ \tl_set:Nn #2 {#1} }
}
\cs_new:Npe \@@_key_get_base_TF:nN #1#2
{
- \__kernel_tl_set:Ne #2 { \exp_not:N \tl_to_str:n {#1} }
+ \__kernel_tl_set:Nx #2 { \exp_not:N \tl_to_str:n {#1} }
\tl_if_in:NoF #2 { \tl_to_str:n {:} }
{ \exp_not:N \prg_break: }
\tl_if_in:onT { #2 z } { \tl_to_str:n {TF} z }
@@ -1464,7 +1472,7 @@ and all files in that bundle must be distributed together.
\DeclareUnknownKeyHandler [ l3doc / options ]
{ \PassOptionsToClass { \CurrentOption } { article } }
\SetKeys [ l3doc / options ]
- { full , kernel , check = false , checktest = false , lm-default }
+ { full , check = false , checktest = false , lm-default }
\PassOptionsToClass { a4paper } { article }
% \end{macrocode}
%
@@ -1998,7 +2006,7 @@ and all files in that bundle must be distributed together.
\verbatim@font
\@@_if_almost_str:VT \l_@@_cmd_tl
{
- \__kernel_tl_set:Ne \l_@@_cmd_tl { \tl_to_str:N \l_@@_cmd_tl }
+ \__kernel_tl_set:Nx \l_@@_cmd_tl { \tl_to_str:N \l_@@_cmd_tl }
\bool_if:NT \g_@@_cs_break_bool
{
\regex_replace_all:nnN
@@ -2020,13 +2028,13 @@ and all files in that bundle must be distributed together.
{
\quark_if_no_value:NF \l_@@_cmd_index_tl
{
- \__kernel_tl_set:Ne \l_@@_cmd_tl
+ \__kernel_tl_set:Nx \l_@@_cmd_tl
{ \c_backslash_str \exp_not:o { \l_@@_cmd_index_tl } }
}
\exp_args:No \@@_key_get:n { \l_@@_cmd_tl }
\quark_if_no_value:NF \l_@@_cmd_module_tl
{
- \__kernel_tl_set:Ne \l_@@_index_module_tl
+ \__kernel_tl_set:Nx \l_@@_index_module_tl
{ \tl_to_str:N \l_@@_cmd_module_tl }
}
\@@_special_index_module:ooonN
@@ -2142,7 +2150,7 @@ and all files in that bundle must be distributed together.
% \begin{macrocode}
\cs_new_protected:Npn \@@_get_hyper_target:nN #1#2
{
- \__kernel_tl_set:Ne #2 { \tl_to_str:n {#1} }
+ \__kernel_tl_set:Nx #2 { \tl_to_str:n {#1} }
\tl_replace_all:NVn #2 \c_underscore_str { / }
\tl_remove_all:NV #2 \c_backslash_str
\tl_put_left:Nn #2 { doc/function// }
@@ -2165,7 +2173,7 @@ and all files in that bundle must be distributed together.
% \begin{macrocode}
\cs_new_protected:Npn \@@_names_get_seq:nN #1#2
{
- \__kernel_tl_set:Ne \l_@@_tmpa_tl { \tl_to_str:n {#1} }
+ \__kernel_tl_set:Nx \l_@@_tmpa_tl { \tl_to_str:n {#1} }
\bool_if:NTF \l_@@_names_verb_bool
{
\seq_clear:N #2
@@ -3051,7 +3059,7 @@ and all files in that bundle must be distributed together.
\l_@@_macro_do_not_index_tl
\exp_args:NNV \seq_set_from_clist:Nn
\l_@@_tmpa_seq \l_@@_macro_do_not_index_tl
- \__kernel_tl_set:Ne \l_@@_macro_do_not_index_tl
+ \__kernel_tl_set:Nx \l_@@_macro_do_not_index_tl
{ \seq_use:Nn \l_@@_tmpa_seq { , } }
\exp_args:NV \DoNotIndex \l_@@_macro_do_not_index_tl
}
@@ -4367,7 +4375,7 @@ and all files in that bundle must be distributed together.
% \begin{macrocode}
\cs_new_protected:Npn \@@_special_index_set:Nn #1#2
{
- \__kernel_tl_set:Ne #1 { \tl_to_str:n {#2} }
+ \__kernel_tl_set:Nx #1 { \tl_to_str:n {#2} }
\@@_if_almost_str:nTF {#2}
{
\tl_replace_all:Nen #1 { \tl_to_str:n { __ } }
@@ -4385,7 +4393,7 @@ and all files in that bundle must be distributed together.
\token_to_str:N \verb * \verbatimchar
}
}
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{
\token_to_str:N \verb * \verbatimchar
#1 \verbatimchar
@@ -4436,7 +4444,7 @@ and all files in that bundle must be distributed together.
\cs_new_protected:Npe \@@_key_get:n #1
{
\exp_not:N \@@_key_get_base:nN {#1} \exp_not:N \l_@@_index_macro_tl
- \__kernel_tl_set:Ne \exp_not:N \l_@@_index_key_tl
+ \__kernel_tl_set:Nx \exp_not:N \l_@@_index_key_tl
{ \exp_not:N \tl_to_str:N \exp_not:N \l_@@_index_macro_tl }
\tl_clear:N \exp_not:N \l_@@_index_module_tl
\tl_if_in:NnTF \exp_not:N \l_@@_index_key_tl { \tl_to_str:n { __ } }
@@ -4458,7 +4466,7 @@ and all files in that bundle must be distributed together.
}
\cs_new_protected:Npn \@@_key_pop:
{
- \__kernel_tl_set:Ne \l_@@_index_key_tl
+ \__kernel_tl_set:Nx \l_@@_index_key_tl
{ \tl_tail:N \l_@@_index_key_tl }
}
% \end{macrocode}
@@ -4473,7 +4481,7 @@ and all files in that bundle must be distributed together.
{
\cs_set:Npn \@@_tmpa:w ##1 #1 ##2 \q_stop
{ \exp_not:n {##1} }
- \__kernel_tl_set:Ne \l_@@_index_module_tl
+ \__kernel_tl_set:Nx \l_@@_index_module_tl
{ \exp_after:wN \@@_tmpa:w \l_@@_index_module_tl #1 \q_stop }
}
\cs_new_protected:Npn \@@_key_drop_underscores:
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
index 9e28f867c25..9034fb71768 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
@@ -63,7 +63,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
index dd682a37d82..5ea58b75d5b 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
index c715b4da659..cc14b48980f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -1212,7 +1212,7 @@
{ \@@_open_stream:Nn #1 {#2} }
{
\@@_new:N #1
- \__kernel_tl_set:Ne \l_@@_stream_tl { \int_eval:n {#1} }
+ \__kernel_tl_set:Nx \l_@@_stream_tl { \int_eval:n {#1} }
\@@_open_stream:Nn #1 {#2}
}
}
@@ -1687,14 +1687,14 @@
% \begin{macrocode}
\cs_new_protected:Npn \iow_open:Nn #1#2
{
- \__kernel_tl_set:Ne \l_@@_file_name_tl
+ \__kernel_tl_set:Nx \l_@@_file_name_tl
{ \__kernel_file_name_sanitize:n {#2} }
\iow_close:N #1
\seq_gpop:NNTF \g_@@_streams_seq \l_@@_stream_tl
{ \@@_open_stream:NV #1 \l_@@_file_name_tl }
{
\@@_new:N #1
- \__kernel_tl_set:Ne \l_@@_stream_tl { \int_eval:n {#1} }
+ \__kernel_tl_set:Nx \l_@@_stream_tl { \int_eval:n {#1} }
\@@_open_stream:NV #1 \l_@@_file_name_tl
}
}
@@ -1966,7 +1966,7 @@
\cs_new:Npn \@@_unindent:w { }
\cs_new_protected:Npn \@@_set_indent:n #1
{
- \__kernel_tl_set:Ne \l_@@_one_indent_tl
+ \__kernel_tl_set:Nx \l_@@_one_indent_tl
{ \exp_args:No \__kernel_str_to_other_fast:n { \tl_to_str:n {#1} } }
\int_set:Nn \l_@@_one_indent_int
{ \str_count:N \l_@@_one_indent_tl }
@@ -2143,7 +2143,7 @@
% \cs{iow_wrap:nnnN}.
% \begin{macrocode}
\cs_set_eq:NN \protect \token_to_str:N
- \__kernel_tl_set:Ne \l_@@_wrap_tl {#1}
+ \__kernel_tl_set:Nx \l_@@_wrap_tl {#1}
\cs_set_eq:NN \iow_wrap_allow_break: \@@_wrap_allow_break_error:
\cs_set_eq:NN \iow_indent:n \@@_indent_error:n
% \end{macrocode}
@@ -2151,8 +2151,8 @@
% then convert to a string) and initialize the target count for lines
% (the first line has target count \cs{l_iow_line_count_int} instead).
% \begin{macrocode}
- \__kernel_tl_set:Ne \l_@@_newline_tl { \iow_newline: #2 }
- \__kernel_tl_set:Ne \l_@@_newline_tl { \tl_to_str:N \l_@@_newline_tl }
+ \__kernel_tl_set:Nx \l_@@_newline_tl { \iow_newline: #2 }
+ \__kernel_tl_set:Nx \l_@@_newline_tl { \tl_to_str:N \l_@@_newline_tl }
\int_set:Nn \l_@@_line_target_int
{ \l_iow_line_count_int - \str_count:N \l_@@_newline_tl + 1 }
% \end{macrocode}
@@ -2192,12 +2192,12 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_wrap_do:
{
- \__kernel_tl_set:Ne \l_@@_wrap_tl
+ \__kernel_tl_set:Nx \l_@@_wrap_tl
{
\exp_args:No \__kernel_str_to_other_fast:n \l_@@_wrap_tl
\c_@@_wrap_end_marker_tl
}
- \__kernel_tl_set:Ne \l_@@_wrap_tl
+ \__kernel_tl_set:Nx \l_@@_wrap_tl
{
\exp_after:wN \@@_wrap_fix_newline:w \l_@@_wrap_tl
^^J \q_@@_nil ^^J \s_@@_stop
@@ -2461,7 +2461,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_wrap_allow_break:n #1
{
- \__kernel_tl_set:Ne \l_@@_line_tl
+ \__kernel_tl_set:Nx \l_@@_line_tl
{ \l_@@_line_tl \@@_wrap_trim:N \l_@@_line_part_tl }
\bool_set_false:N \l_@@_line_break_bool
\tl_if_empty:NTF \l_@@_line_part_tl
@@ -2492,7 +2492,7 @@
\tl_put_right:Ne \l_@@_line_tl { \l_@@_line_part_tl }
\bool_set_false:N \l_@@_line_break_bool
\int_sub:Nn \l_@@_indent_int { \l_@@_one_indent_int }
- \__kernel_tl_set:Ne \l_@@_indent_tl
+ \__kernel_tl_set:Nx \l_@@_indent_tl
{ \exp_after:wN \@@_unindent:w \l_@@_indent_tl }
\@@_wrap_chunk:nw {#1}
}
@@ -2531,9 +2531,9 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_wrap_store_do:n #1
{
- \__kernel_tl_set:Ne \l_@@_line_tl
+ \__kernel_tl_set:Nx \l_@@_line_tl
{ \l_@@_line_tl \l_@@_line_part_tl }
- \__kernel_tl_set:Ne \l_@@_wrap_tl
+ \__kernel_tl_set:Nx \l_@@_wrap_tl
{
\l_@@_wrap_tl
\l_@@_newline_tl
@@ -3132,7 +3132,7 @@
\cs_generate_variant:Nn \file_get_full_name:nN { V }
\prg_new_protected_conditional:Npnn \file_get_full_name:nN #1#2 { T , F , TF }
{
- \__kernel_tl_set:Ne #2
+ \__kernel_tl_set:Nx #2
{ \file_full_name:n {#1} }
\tl_if_empty:NTF #2
{ \prg_return_false: }
@@ -3312,7 +3312,7 @@
{ V } { T , F , TF }
\cs_new_protected:Npn \@@_get_details:nnN #1#2#3
{
- \__kernel_tl_set:Ne #3
+ \__kernel_tl_set:Nx #3
{ \use:c { file_ #2 :n } {#1} }
\tl_if_empty:NTF #3
{ \prg_return_false: }
@@ -3334,7 +3334,7 @@
\prg_new_protected_conditional:Npnn \file_get_hex_dump:nnnN #1#2#3#4
{ T , F , TF }
{
- \__kernel_tl_set:Ne #4
+ \__kernel_tl_set:Nx #4
{ \file_hex_dump:nnn {#1} {#2} {#3} }
\tl_if_empty:NTF #4
{ \prg_return_false: }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx b/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx
index 05768ae069d..b0a586d48ba 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -54,16 +54,13 @@
% cases, booleans or integers should be preferred to flags because they
% are very significantly faster.
%
-% A flag can hold any non-negative value, which we call its
+% A flag can hold any (small) non-negative value, which we call its
% \meta{height}. In expansion-only contexts, a flag can only be
% \enquote{raised}: this increases the \meta{height} by $1$. The \meta{height}
% can also be queried expandably. However, decreasing it, or setting it
% to zero requires non-expandable assignments.
%
-% Flag variables are always local. They are referenced by a \meta{flag
-% name} such as \texttt{fp_overflow}. The \meta{flag name} is used as
-% part of \cs{use:c} constructions hence is expanded at point of use.
-% It must expand to character tokens only, with no spaces.
+% Flag variables are always local.
%
% A typical use case of flags would be to keep track of whether an
% exceptional condition has occurred during expandable processing, and
@@ -74,94 +71,111 @@
% error message describing incorrect inputs that were encountered.
%
% Flags should not be used without carefully considering the fact that
-% raising a flag takes a time and memory proportional to its height.
-% Flags should not be used unless unavoidable.
+% raising a flag takes a time and memory proportional to its height and
+% that the memory cannot be reclaimed even if the flag is cleared.
+% Flags should not be used unless it is unavoidable.
+%
+% In earlier versions, flags were referenced by an \texttt{n}-type
+% \meta{flag name} such as \texttt{fp_overflow}, used as part of
+% \cs{use:c} constructions. All of the commands described below have
+% \texttt{n}-type analogues that can still appear in old code, but the
+% \texttt{N}-type commands are to be preferred moving forward. The
+% \texttt{n}-type \meta{flag name} is simply mapped to
+% \cs[no-index]{l_\meta{flag name}_flag}, which makes it easier for
+% packages using public flags (such as \pkg{l3fp}) to retain backwards
+% compatibility.
%
% \section{Setting up flags}
%
-% \begin{function}{\flag_new:n}
+% \begin{function}[added = 2024-01-12]{\flag_new:N, \flag_new:c}
% \begin{syntax}
-% \cs{flag_new:n} \Arg{flag name}
+% \cs{flag_new:N} \meta{flag~var}
% \end{syntax}
-% Creates a new flag with a name given by \meta{flag name}, or raises
-% an error if the name is already taken. The \meta{flag name} may not
-% contain spaces. The declaration is global, but flags are always
-% local variables. The \meta{flag} initially has zero height.
+% Creates a new \meta{flag~var}, or raises an error if the name is
+% already taken. The declaration is global, but flags are always local
+% variables. The \meta{flag~var} initially has zero height.
% \end{function}
%
-% \begin{function}{\flag_clear:n}
+% \begin{function}[added = 2024-01-12]{\flag_clear:N, \flag_clear:c}
% \begin{syntax}
-% \cs{flag_clear:n} \Arg{flag name}
+% \cs{flag_clear:N} \meta{flag~var}
% \end{syntax}
-% The \meta{flag}'s height is set to zero. The assignment is local.
+% Sets the height of the \meta{flag~var} to zero. The assignment is local.
% \end{function}
%
-% \begin{function}{\flag_clear_new:n}
+% \begin{function}[added = 2024-01-12]{\flag_clear_new:N, \flag_clear_new:c}
% \begin{syntax}
-% \cs{flag_clear_new:n} \Arg{flag name}
+% \cs{flag_clear_new:N} \meta{flag~var}
% \end{syntax}
-% Ensures that the \meta{flag} exists globally by applying
-% \cs{flag_new:n} if necessary, then applies \cs{flag_clear:n}, setting
+% Ensures that the \meta{flag~var} exists globally by applying
+% \cs{flag_new:N} if necessary, then applies \cs{flag_clear:N}, setting
% the height to zero locally.
% \end{function}
%
-% \begin{function}{\flag_show:n}
+% \begin{function}[added = 2024-01-12]{\flag_show:N, \flag_show:c}
% \begin{syntax}
-% \cs{flag_show:n} \Arg{flag name}
+% \cs{flag_show:N} \meta{flag~var}
% \end{syntax}
-% Displays the \meta{flag}'s height in the terminal.
+% Displays the height of the \meta{flag~var} in the terminal.
% \end{function}
%
-% \begin{function}{\flag_log:n}
+% \begin{function}[added = 2024-01-12]{\flag_log:N, \flag_log:c}
% \begin{syntax}
-% \cs{flag_log:n} \Arg{flag name}
+% \cs{flag_log:N} \meta{flag~var}
% \end{syntax}
-% Writes the \meta{flag}'s height to the log file.
+% Writes the height of the \meta{flag~var} in the log file.
% \end{function}
%
% \section{Expandable flag commands}
%
-% \begin{function}[EXP,pTF]{\flag_if_exist:n}
+% \begin{function}[EXP, pTF, added = 2024-01-12]{\flag_if_exist:N, \flag_if_exist:c}
% \begin{syntax}
-% \cs{flag_if_exist_p:n} \Arg{flag name}
-% \cs{flag_if_exist:nTF} \Arg{flag name} \Arg{true code} \Arg{false code}
+% \cs{flag_if_exist_p:N} \meta{flag~var}
+% \cs{flag_if_exist:NTF} \meta{flag~var} \Arg{true code} \Arg{false code}
% \end{syntax}
-% This function returns \texttt{true} if the \meta{flag name}
-% references a flag that has been defined previously, and
-% \texttt{false} otherwise.
+% This function returns \texttt{true} if the \meta{flag~var} is
+% currently defined, and \texttt{false} otherwise. This does not check
+% that the \meta{flag~var} really is a flag variable.
% \end{function}
%
-% \begin{function}[EXP,pTF]{\flag_if_raised:n}
+% \begin{function}[EXP, pTF, added = 2024-01-12]{\flag_if_raised:N, \flag_if_raised:c}
% \begin{syntax}
-% \cs{flag_if_raised_p:n} \Arg{flag name}
-% \cs{flag_if_raised:nTF} \Arg{flag name} \Arg{true code} \Arg{false code}
+% \cs{flag_if_raised_p:N} \meta{flag~var}
+% \cs{flag_if_raised:NTF} \meta{flag~var} \Arg{true code} \Arg{false code}
% \end{syntax}
-% This function returns \texttt{true} if the \meta{flag} has non-zero
-% height, and \texttt{false} if the \meta{flag} has zero height.
+% This function returns \texttt{true} if the \meta{flag~var} has non-zero
+% height, and \texttt{false} if the \meta{flag~var} has zero height.
% \end{function}
%
-% \begin{function}[EXP]{\flag_height:n}
+% \begin{function}[EXP, added = 2024-01-12]{\flag_height:N, \flag_height:c}
% \begin{syntax}
-% \cs{flag_height:n} \Arg{flag name}
+% \cs{flag_height:N} \meta{flag~var}
% \end{syntax}
-% Expands to the height of the \meta{flag} as an integer denotation.
+% Expands to the height of the \meta{flag~var} as an integer denotation.
% \end{function}
%
-% \begin{function}[EXP]{\flag_raise:n}
+% \begin{function}[EXP, added = 2024-01-12]{\flag_raise:N, \flag_raise:c}
% \begin{syntax}
-% \cs{flag_raise:n} \Arg{flag name}
+% \cs{flag_raise:N} \meta{flag~var}
% \end{syntax}
-% The \meta{flag}'s height is increased by $1$ locally.
+% The height of \meta{flag~var} is increased by $1$ locally.
% \end{function}
%
-% \begin{function}[EXP, added = 2023-04-25]{\flag_ensure_raised:n}
+% \begin{function}[EXP, added = 2024-01-12]{\flag_ensure_raised:N, \flag_ensure_raised:c}
% \begin{syntax}
-% \cs{flag_ensure_raised:n} \Arg{flag name}
+% \cs{flag_ensure_raised:N} \meta{flag~var}
% \end{syntax}
-% Ensures the \meta{flag} is raised by making its height at least~$1$,
+% Ensures the \meta{flag~var} is raised by making its height at least~$1$,
% locally.
% \end{function}
%
+% \begin{variable}[added = 2024-01-12]{\l_tmpa_flag, \l_tmpb_flag}
+% Scratch flag for local assignment. These are never used by
+% the kernel code, and so are safe for use with any \LaTeX3-defined
+% function. However, they may be overwritten by other non-kernel
+% code and so should only be used for short-term storage.
+% \end{variable}
+%
% \end{documentation}
%
% \begin{implementation}
@@ -178,149 +192,197 @@
%
% \TestFiles{m3flag001}
%
-% \subsection{Non-expandable flag commands}
+% \subsection{Protected flag commands}
%
-% The height $h$ of a flag (initially zero) is stored by setting control
-% sequences of the form \cs[no-index]{flag \meta{name} \meta{integer}}
-% to \tn{relax} for $0\leq\meta{integer}<h$. When a flag is raised, a
-% \enquote{trap} function \cs[no-index]{flag \meta{name}} is called.
-% The existence of this function is also used to test for the existence
-% of a flag.
+% The height $h$ of a flag (which is initially zero) is stored by
+% setting control sequences of the form \cs[no-index]{\meta{flag
+% name}\meta{integer}} to \tn{relax} for $0\leq\meta{integer}<h$. These
+% control sequences are produced by \cs{cs:w} \meta{flag~var}
+% \meta{integer} \cs{cs_end:}, namely the \meta{flag~var} is actually a
+% (protected) macro expanding to its own csname.
%
-% \begin{macro}{\flag_new:n}
-% For each flag, we define a \enquote{trap} function, which by default
-% simply increases the flag by $1$ by letting the appropriate control
-% sequence to \tn{relax}. This can be done expandably!
+% \begin{macro}{\flag_new:N, \flag_new:c}
+% Evaluate the csname of~|#1| for use in constructing the various
+% indexed macros.
% \begin{macrocode}
-\cs_new_protected:Npn \flag_new:n #1
- {
- \cs_new:cpn { flag~#1 } ##1 ;
- { \exp_after:wN \use_none:n \cs:w flag~#1~##1 \cs_end: }
- }
+\cs_new_protected:Npn \flag_new:N #1
+ { \cs_new_protected:Npe #1 { \cs_to_str:N #1 } }
+\cs_generate_variant:Nn \flag_new:N { c }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\flag_clear:n}
-% \begin{macro}{\@@_clear:wn}
+% \begin{variable}{\l_tmpa_flag, \l_tmpb_flag}
+% Two flag variables for scratch use.
+% \begin{macrocode}
+\flag_new:N \l_tmpa_flag
+\flag_new:N \l_tmpb_flag
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}{\flag_clear:N, \flag_clear:c}
+% \begin{macro}{\@@_clear:wN}
% Undefine control sequences, starting from the |0| flag, upwards,
% until reaching an undefined control sequence. We don't use
% \cs{cs_undefine:c} because that would act globally.
-% When the option \texttt{check-declarations} is used, check for the
-% function defined by \cs{flag_new:n}.
% \begin{macrocode}
-\cs_new_protected:Npn \flag_clear:n #1 { \@@_clear:wn 0 ; {#1} }
-\cs_new_protected:Npn \@@_clear:wn #1 ; #2
+\cs_new_protected:Npn \flag_clear:N #1
{
- \if_cs_exist:w flag~#2~#1 \cs_end:
- \cs_set_eq:cN { flag~#2~#1 } \tex_undefined:D
- \exp_after:wN \@@_clear:wn
- \int_value:w \int_eval:w 1 + #1
- \else:
- \use_i:nnn
+ \@@_clear:wN 0 ; #1
+ \prg_break_point:
+ }
+\cs_generate_variant:Nn \flag_clear:N { c }
+\cs_new_protected:Npn \@@_clear:wN #1 ; #2
+ {
+ \if_cs_exist:w #2 #1 \cs_end: \else:
+ \prg_break:n
\fi:
- ; {#2}
+ \cs_set_eq:cN { #2 #1 } \tex_undefined:D
+ \exp_after:wN \@@_clear:wN
+ \int_value:w \int_eval:w \c_one_int + #1 ; #2
}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\flag_clear_new:n}
-% As for other datatypes, clear the \meta{flag} or create a new one,
+% \begin{macro}{\flag_clear_new:N, \flag_clear_new:c}
+% As for other datatypes, clear the \meta{flag~var} or create a new one,
% as appropriate.
% \begin{macrocode}
-\cs_new_protected:Npn \flag_clear_new:n #1
- { \flag_if_exist:nTF {#1} { \flag_clear:n } { \flag_new:n } {#1} }
+\cs_new_protected:Npn \flag_clear_new:N #1
+ { \flag_if_exist:NTF #1 { \flag_clear:N } { \flag_new:N } #1 }
+\cs_generate_variant:Nn \flag_clear_new:N { c }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\flag_show:n, \flag_log:n, \@@_show:Nn}
+% \begin{macro}{\flag_show:N, \flag_show:c, \flag_log:N, \flag_log:c, \@@_show:NN}
% Show the height (terminal or log file) using appropriate \pkg{l3msg}
% auxiliaries.
% \begin{macrocode}
-\cs_new_protected:Npn \flag_show:n { \@@_show:Nn \tl_show:n }
-\cs_new_protected:Npn \flag_log:n { \@@_show:Nn \tl_log:n }
-\cs_new_protected:Npn \@@_show:Nn #1#2
+\cs_new_protected:Npn \flag_show:N { \@@_show:NN \tl_show:n }
+\cs_generate_variant:Nn \flag_show:N { c }
+\cs_new_protected:Npn \flag_log:N { \@@_show:NN \tl_log:n }
+\cs_generate_variant:Nn \flag_log:N { c }
+\cs_new_protected:Npn \@@_show:NN #1#2
{
- \exp_args:Nc \__kernel_chk_defined:NT { flag~#2 }
- {
- \exp_args:Ne #1
- { \tl_to_str:n { flag~#2~height } = \flag_height:n {#2} }
- }
+ \__kernel_chk_defined:NT #2
+ { \exp_args:Ne #1 { \tl_to_str:n { #2 height } = \flag_height:N #2 } }
}
% \end{macrocode}
% \end{macro}
%
% \subsection{Expandable flag commands}
%
-% \begin{macro}[EXP, pTF]{\flag_if_exist:n}
-% A flag exist if the corresponding trap \cs[no-index]{flag \meta{flag
-% name}:n} is defined.
+% \begin{macro}[EXP, pTF]{\flag_if_exist:N, \flag_if_exist:c}
+% Copies of the \texttt{cs} functions defined in \pkg{l3basics}.
% \begin{macrocode}
-\prg_new_conditional:Npnn \flag_if_exist:n #1 { p , T , F , TF }
- {
- \cs_if_exist:cTF { flag~#1 }
- { \prg_return_true: } { \prg_return_false: }
- }
+\prg_new_eq_conditional:NNn \flag_if_exist:N \cs_if_exist:N
+ { TF , T , F , p }
+\prg_new_eq_conditional:NNn \flag_if_exist:c \cs_if_exist:c
+ { TF , T , F , p }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP, pTF]{\flag_if_raised:n}
+% \begin{macro}[EXP, pTF]{\flag_if_raised:N, \flag_if_raised:c}
% Test if the flag has a non-zero height, by checking the |0| control sequence.
% \begin{macrocode}
-\prg_new_conditional:Npnn \flag_if_raised:n #1 { p , T , F , TF }
+\prg_new_conditional:Npnn \flag_if_raised:N #1 { p , T , F , TF }
{
- \if_cs_exist:w flag~#1~0 \cs_end:
+ \if_cs_exist:w #1 0 \cs_end:
\prg_return_true:
\else:
\prg_return_false:
\fi:
}
+\prg_generate_conditional_variant:Nnn \flag_if_raised:N
+ { c } { p , T , F , TF }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP]{\flag_height:n}
-% \begin{macro}[EXP]{\@@_height_loop:wn, \@@_height_end:wn}
+% \begin{macro}[EXP]{\flag_height:N, \flag_height:c}
+% \begin{macro}[EXP]{\@@_height_loop:wN, \@@_height_end:wN}
% Extract the value of the flag by going through all of the
% control sequences starting from |0|.
% \begin{macrocode}
-\cs_new:Npn \flag_height:n #1 { \@@_height_loop:wn 0; {#1} }
-\cs_new:Npn \@@_height_loop:wn #1 ; #2
+\cs_new:Npn \flag_height:N #1 { \@@_height_loop:wN 0; #1 }
+\cs_new:Npn \@@_height_loop:wN #1 ; #2
{
- \if_cs_exist:w flag~#2~#1 \cs_end:
- \exp_after:wN \@@_height_loop:wn \int_value:w \int_eval:w 1 +
- \else:
- \exp_after:wN \@@_height_end:wn
+ \if_cs_exist:w #2 #1 \cs_end: \else:
+ \exp_after:wN \@@_height_end:wN
\fi:
- #1 ; {#2}
+ \exp_after:wN \@@_height_loop:wN
+ \int_value:w \int_eval:w \c_one_int + #1 ; #2
}
-\cs_new:Npn \@@_height_end:wn #1 ; #2 {#1}
+\cs_new:Npn \@@_height_end:wN #1 + #2 ; #3 {#2}
+\cs_generate_variant:Nn \flag_height:N { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
%
-% \begin{macro}[EXP]{\flag_raise:n}
-% Simply apply the trap to the height, after expanding the latter.
+% \begin{macro}[EXP]{\flag_raise:N, \flag_raise:c}
+% Change the appropriate control sequence to \tn{relax} by expanding a
+% \cs{cs:w} \ldots{} \cs{cs_end:} construction, then pass it to
+% \cs{use_none:n} to avoid leaving anything in the input stream.
% \begin{macrocode}
-\cs_new:Npn \flag_raise:n #1
- {
- \cs:w flag~#1 \exp_after:wN \cs_end:
- \int_value:w \flag_height:n {#1} ;
- }
+\cs_new:Npn \flag_raise:N #1
+ { \exp_after:wN \use_none:n \cs:w #1 \flag_height:N #1 \cs_end: }
+\cs_generate_variant:Nn \flag_raise:N { c }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP]{\flag_ensure_raised:n}
-% It might be faster to just call the \enquote{trap} function in all
-% cases but conceptually the function name suggests we should only run
-% it if the flag is zero in case the \enquote{trap} made customizable
-% in the future.
+% \begin{macro}[EXP]{\flag_ensure_raised:N, \flag_ensure_raised:c}
+% Pass the control sequence with name \meta{flag name}\texttt{0} to
+% \cs{use_none:n}. Constructing the control sequence ensures that it
+% changes from being undefined (if it was so) to being \tn{relax}.
% \begin{macrocode}
-\cs_new:Npn \flag_ensure_raised:n #1
+\cs_new:Npn \flag_ensure_raised:N #1
+ { \exp_after:wN \use_none:n \cs:w #1 0 \cs_end: }
+\cs_generate_variant:Nn \flag_ensure_raised:N { c }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Old \texttt{n}-type flag commands}
+%
+% Here we keep the old flag commands since our policy is to no longer
+% delete deprecated functions. The idea is to simply map \meta{flag
+% name} to \cs[no-index]{l_\meta{flag name}_flag}. When the debugging
+% code is activated, it checks existence of the \texttt{N}-type flag
+% variables that result.
+%
+% \begin{macro}{\flag_new:n, \flag_clear:n, \flag_clear_new:n}
+% \begin{macro}[EXP, pTF]{\flag_if_exist:n, \flag_if_raised:n}
+% \begin{macro}[EXP]{\flag_height:n, \flag_raise:n, \flag_ensure_raised:n}
+% \begin{macrocode}
+\cs_new_protected:Npn \flag_new:n #1 { \flag_new:c { l_#1_flag } }
+\cs_new_protected:Npn \flag_clear:n #1 { \flag_clear:c { l_#1_flag } }
+\cs_new_protected:Npn \flag_clear_new:n #1 { \flag_clear_new:c { l_#1_flag } }
+\cs_new:Npn \flag_if_exist_p:n #1 { \flag_if_exist_p:c { l_#1_flag } }
+\cs_new:Npn \flag_if_exist:nT #1 { \flag_if_exist:cT { l_#1_flag } }
+\cs_new:Npn \flag_if_exist:nF #1 { \flag_if_exist:cF { l_#1_flag } }
+\cs_new:Npn \flag_if_exist:nTF #1 { \flag_if_exist:cTF { l_#1_flag } }
+\cs_new:Npn \flag_if_raised_p:n #1 { \flag_if_raised_p:c { l_#1_flag } }
+\cs_new:Npn \flag_if_raised:nT #1 { \flag_if_raised:cT { l_#1_flag } }
+\cs_new:Npn \flag_if_raised:nF #1 { \flag_if_raised:cF { l_#1_flag } }
+\cs_new:Npn \flag_if_raised:nTF #1 { \flag_if_raised:cTF { l_#1_flag } }
+\cs_new:Npn \flag_height:n #1 { \flag_height:c { l_#1_flag } }
+\cs_new:Npn \flag_raise:n #1 { \flag_raise:c { l_#1_flag } }
+\cs_new:Npn \flag_ensure_raised:n #1 { \flag_ensure_raised:c { l_#1_flag } }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\flag_show:n, \flag_log:n, \@@_show:Nn}
+% To avoid changing the output here we mostly keep the old code.
+% \begin{macrocode}
+\cs_new_protected:Npn \flag_show:n { \@@_show:Nn \tl_show:n }
+\cs_new_protected:Npn \flag_log:n { \@@_show:Nn \tl_log:n }
+\cs_new_protected:Npn \@@_show:Nn #1#2
{
- \if_cs_exist:w flag~#1~0 \cs_end:
- \else:
- \cs:w flag~#1 \cs_end: 0 ;
- \fi:
+ \exp_args:Nc \__kernel_chk_defined:NT { l_#2_flag }
+ {
+ \exp_args:Ne #1
+ { \tl_to_str:n { flag~#2~height } = \flag_height:n {#2} }
+ }
}
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx
index 57845378898..e2e9937c2c3 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
% \maketitle
%
% \begin{documentation}
@@ -82,9 +82,9 @@
% assignments.
% \begin{macrocode}
\cs_new_protected:Npn \fp_set:Nn #1#2
- { \__kernel_tl_set:Ne #1 { \exp_not:f { \@@_parse:n {#2} } } }
+ { \__kernel_tl_set:Nx #1 { \exp_not:f { \@@_parse:n {#2} } } }
\cs_new_protected:Npn \fp_gset:Nn #1#2
- { \__kernel_tl_gset:Ne #1 { \exp_not:f { \@@_parse:n {#2} } } }
+ { \__kernel_tl_gset:Nx #1 { \exp_not:f { \@@_parse:n {#2} } } }
\cs_new_protected:Npn \fp_const:Nn #1#2
{ \tl_const:Ne #1 { \exp_not:f { \@@_parse:n {#2} } } }
\cs_generate_variant:Nn \fp_set:Nn {c}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
index 1efa9da7cb6..cc54b7e02bd 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
index f50bded4d40..ed13beb5fd0 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
index 30cff3bb388..d5b73e7d97b 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
index 3a7616d3b94..2c862931019 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
index d65b1a1160b..0e4e48a0a9b 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-functions.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-functions.dtx
index d140af67582..3e423c0908d 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-functions.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-functions.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
index 31cd180c395..13eeed88888 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
index a4d2979c1ef..ef6c2ad392c 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx
index 95671bce219..8c68289d608 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
index 8061147f0a1..a01b9505dae 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-symbolic.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-symbolic.dtx
index 22b9585e5d0..01e883f1364 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-symbolic.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-symbolic.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -599,7 +599,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{variable}{@@_symbolic}
+% \begin{variable}{\l_@@_symbolic_flag}
% \begin{macro}{\fp_set_variable:nn, \@@_set_variable:nn}
% Refuse invalid identifiers. If the variable does not exist yet,
% define it just as in \cs{fp_new_variable:n} (but without unnecessary
@@ -615,7 +615,7 @@
% raised, |#1|~was present in \cs{l_@@_symbolic_fp}. In all cases,
% the |#1|-free result ends up in |\l__fp_variable_#1_fp|.
% \begin{macrocode}
-\flag_new:n { @@_symbolic }
+\flag_new:N \l_@@_symbolic_flag
\cs_new_protected:Npn \fp_set_variable:nn #1
{
\exp_args:No \@@_set_variable:nn { \tl_to_str:n {#1} }
@@ -628,10 +628,10 @@
\@@_variable_set_parsing:Nn \cs_set_eq:NN {#1}
\fp_set:Nn \l_@@_symbolic_fp {#2}
\cs_set_nopar:cpn { l_@@_variable_#1_fp }
- { \flag_ensure_raised:n { @@_symbolic } \c_nan_fp }
- \flag_clear:n { @@_symbolic }
+ { \flag_ensure_raised:N \l_@@_symbolic_flag \c_nan_fp }
+ \flag_clear:N \l_@@_symbolic_flag
\fp_set:cn { l_@@_variable_#1_fp } { \l_@@_symbolic_fp }
- \flag_if_raised:nT { @@_symbolic }
+ \flag_if_raised:NT \l_@@_symbolic_flag
{
\msg_error:nneee { fp } { id-loop }
{ #1 }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
index 983fb911710..6212ff731c0 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
% \maketitle
%
% \begin{documentation}
@@ -74,17 +74,17 @@
%
% \begin{variable}[module = fp]
% {
-% fp_invalid_operation,
-% fp_division_by_zero,
-% fp_overflow,
-% fp_underflow
+% \l_fp_invalid_operation_flag,
+% \l_fp_division_by_zero_flag,
+% \l_fp_overflow_flag,
+% \l_fp_underflow_flag
% }
% Flags to denote exceptions.
% \begin{macrocode}
-\flag_new:n { fp_invalid_operation }
-\flag_new:n { fp_division_by_zero }
-\flag_new:n { fp_overflow }
-\flag_new:n { fp_underflow }
+\flag_new:N \l_fp_invalid_operation_flag
+\flag_new:N \l_fp_division_by_zero_flag
+\flag_new:N \l_fp_overflow_flag
+\flag_new:N \l_fp_underflow_flag
% \end{macrocode}
% \end{variable}
%
@@ -167,7 +167,7 @@
{
#1
\@@_error:nnfn { invalid } {##2} { \fp_to_tl:n { ##3; } } { }
- \flag_ensure_raised:n { fp_invalid_operation }
+ \flag_ensure_raised:N \l_fp_invalid_operation_flag
##1
}
\exp_args:Nno \use:n
@@ -176,7 +176,7 @@
#1
\@@_error:nffn { invalid-ii }
{ \fp_to_tl:n { ##2; } } { \fp_to_tl:n { ##3; } } {##1}
- \flag_ensure_raised:n { fp_invalid_operation }
+ \flag_ensure_raised:N \l_fp_invalid_operation_flag
\exp_after:wN \c_nan_fp
}
\exp_args:Nno \use:n
@@ -184,7 +184,7 @@
{
#1
\@@_error:nffn { invalid } {##1} {##2} { }
- \flag_ensure_raised:n { fp_invalid_operation }
+ \flag_ensure_raised:N \l_fp_invalid_operation_flag
\exp_after:wN \c_nan_fp
}
}
@@ -217,7 +217,7 @@
{
#1
\@@_error:nnfn { zero-div } {##2} { \fp_to_tl:n { ##3; } } { }
- \flag_ensure_raised:n { fp_division_by_zero }
+ \flag_ensure_raised:N \l_fp_division_by_zero_flag
\exp_after:wN ##1
}
\exp_args:Nno \use:n
@@ -226,7 +226,7 @@
#1
\@@_error:nffn { zero-div-ii }
{ \fp_to_tl:n { ##3; } } { \fp_to_tl:n { ##4; } } {##2}
- \flag_ensure_raised:n { fp_division_by_zero }
+ \flag_ensure_raised:N \l_fp_division_by_zero_flag
\exp_after:wN ##1
}
}
@@ -289,7 +289,7 @@
{ \fp_to_tl:n { \s_@@ \@@_chk:w ##1##2##3; } }
{ \token_if_eq_meaning:NNF 0 ##2 { - } #4 }
{#2}
- \flag_ensure_raised:n { fp_#2 }
+ \flag_ensure_raised:c { l_fp_#2_flag }
#3 ##2
}
}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
index 78e1403da0d..5cf22fd7e90 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-types.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-types.dtx
index cf76b2747be..fc6a34f6a1f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-types.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-types.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
index 4f4fee8af60..bdc1d3fae34 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -874,9 +874,9 @@
% a computation is not exact, in other words, almost always. At the
% moment, this exception is entirely ignored in \LaTeX3.
% \end{itemize}
-% To each exception we associate a \enquote{flag}: \texttt{fp_overflow},
-% \texttt{fp_underflow}, \texttt{fp_invalid_operation} and
-% \texttt{fp_division_by_zero}. The state of these flags can be tested
+% To each exception we associate a \enquote{flag}: \cs{l_fp_overflow_flag},
+% \cs{l_fp_underflow_flag}, \cs{l_fp_invalid_operation_flag} and
+% \cs{l_fp_division_by_zero_flag}. The state of these flags can be tested
% and modified with commands from \pkg{l3flag}
%
% By default, the \enquote{invalid operation} exception triggers an
@@ -907,12 +907,12 @@
% \emph{This function is experimental, and may be altered or removed.}
% \end{function}
%
-% \begin{variable}[module = fp]
+% \begin{variable}
% {
-% fp_overflow,
-% fp_underflow,
-% fp_invalid_operation,
-% fp_division_by_zero
+% \l_fp_overflow_flag,
+% \l_fp_underflow_flag,
+% \l_fp_invalid_operation_flag,
+% \l_fp_division_by_zero_flag
% }
% Flags denoting the occurrence of various floating-point exceptions.
% \end{variable}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx
index 6f8e1c4c0e1..2d8cd62f14a 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
index e0be12a51e0..4d5f91cf53f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx b/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx
index c29930bd797..118e44ff3bc 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -770,7 +770,7 @@ luacmd('@@_gset_range:w', function()
% \end{macro}
%
% \begin{macro}[EXP]{\intarray_item:Nn, \intarray_item:cn, \__kernel_intarray_item:Nn}
-% \begin{macro}{\@@_item:Nn}
+% \begin{macro}{\@@_item:Nw}
% Get the appropriate \tn{fontdimen} and perform bound checks. The
% \cs{__kernel_intarray_item:Nn} function omits bound checks and omits
% \cs{int_eval:n}, namely its argument must be a \TeX{} integer
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx b/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx
index 509abeedd64..6b3db5fd7de 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -498,9 +498,9 @@
% only a single expansion.
% \end{function}
%
-% \begin{function}{\__kernel_tl_set:Ne, \__kernel_tl_gset:Ne}
+% \begin{function}{\__kernel_tl_set:Nx, \__kernel_tl_gset:Nx}
% \begin{syntax}
-% \cs{__kernel_tl_set:Ne} \meta{tl~var} \Arg{tokens}
+% \cs{__kernel_tl_set:Nx} \meta{tl~var} \Arg{tokens}
% \end{syntax}
% Fully expands \meta{tokens} and assigns the result to \meta{tl~var}.
% \meta{tokens} must be given in braces and there must be no token between
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
index 9919abfd869..54155d6d4e4 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -109,8 +109,8 @@
% Key names may contain any tokens, as they are handled internally
% using \cs{tl_to_str:n}. As discussed in
% section~\ref{sec:l3keys:subdivision}, it is suggested that the character
-% |/| is reserved for sub-division of keys into logical
-% groups. Functions and variables are \emph{not} expanded when creating
+% |/| is reserved for sub-division of keys into different subsets.
+% Functions and variables are \emph{not} expanded when creating
% key names, and so
% \begin{verbatim}
% \tl_set:Nn \l_mymodule_tmp_tl { key }
@@ -323,9 +323,15 @@
% \begin{syntax}
% \meta{key} .groups:n = \Arg{groups}
% \end{syntax}
-% Defines \meta{key} as belonging to the \meta{groups} declared. Groups
+% Defines \meta{key} as belonging to the \meta{groups} (a
+% comma-separated list). Groups
% provide a \enquote{secondary axis} for selectively setting keys, and are
% described in Section~\ref{sec:l3keys:selective}.
+% \begin{texnote}
+% The \meta{groups} argument is turned into a string then
+% interpreted as a comma-separated list, so group names cannot
+% contain commas nor start or end with a space character.
+% \end{texnote}
% \end{function}
%
% \begin{function}[added = 2016-11-22]{.inherit:n}
@@ -334,7 +340,7 @@
% \end{syntax}
% Specifies that the \meta{key} path should inherit the keys listed
% as any of the \meta{parents} (a comma list), which can be a module
-% or a subgroup. For example, after setting
+% or a sub-division thereof. For example, after setting
% \begin{verbatim}
% \keys_define:nn { foo } { test .code:n = \tl_show:n {#1} }
% \keys_define:nn { } { bar .inherit:n = foo }
@@ -541,21 +547,21 @@
% \label{sec:l3keys:subdivision}
%
% When creating large numbers of keys, it may be desirable to divide
-% them into several sub-groups for a given module. This can be achieved
+% them into several subsets for a given module. This can be achieved
% either by adding a sub-division to the module name:
% \begin{verbatim}
-% \keys_define:nn { mymodule / subgroup }
+% \keys_define:nn { mymodule / subset }
% { key .code:n = code }
% \end{verbatim}
% or to the key name:
% \begin{verbatim}
% \keys_define:nn { mymodule }
-% { subgroup / key .code:n = code }
+% { subset / key .code:n = code }
% \end{verbatim}
% As illustrated, the best choice of token for sub-dividing keys in
% this way is |/|. This is because of the method that is
% used to represent keys internally. Both of the above code fragments
-% set the same key, which has full name \texttt{mymodule/subgroup/key}.
+% set the same key, which has full name \texttt{mymodule/subset/key}.
%
% As illustrated in the next section, this subdivision is
% particularly relevant to making multiple choices.
@@ -856,29 +862,29 @@
% groups to be made \enquote{active}, or by marking one or more groups to
% be ignored in key setting.
%
-% \begin{function}[added = 2013-07-14, updated = 2019-01-29]
+% \begin{function}[added = 2024-01-10]
% {
-% \keys_set_filter:nnn, \keys_set_filter:nnV,
-% \keys_set_filter:nnv, \keys_set_filter:nno,
-% \keys_set_filter:nnnN, \keys_set_filter:nnVN,
-% \keys_set_filter:nnvN, \keys_set_filter:nnoN,
-% \keys_set_filter:nnnnN, \keys_set_filter:nnVnN,
-% \keys_set_filter:nnvnN, \keys_set_filter:nnonN,
+% \keys_set_exclude_groups:nnn, \keys_set_exclude_groups:nnV,
+% \keys_set_exclude_groups:nnv, \keys_set_exclude_groups:nno,
+% \keys_set_exclude_groups:nnnN, \keys_set_exclude_groups:nnVN,
+% \keys_set_exclude_groups:nnvN, \keys_set_exclude_groups:nnoN,
+% \keys_set_exclude_groups:nnnnN, \keys_set_exclude_groups:nnVnN,
+% \keys_set_exclude_groups:nnvnN, \keys_set_exclude_groups:nnonN,
% }
% \begin{syntax}
-% \cs{keys_set_filter:nnn} \Arg{module} \Arg{groups} \Arg{keyval list}
-% \cs{keys_set_filter:nnnN} \Arg{module} \Arg{groups} \Arg{keyval list} \meta{tl}
-% \cs{keys_set_filter:nnnnN} \Arg{module} \Arg{groups} \Arg{keyval list} \meta{root} \meta{tl}
+% \cs{keys_set_exclude_groups:nnn} \Arg{module} \Arg{groups} \Arg{keyval list}
+% \cs{keys_set_exclude_groups:nnnN} \Arg{module} \Arg{groups} \Arg{keyval list} \meta{tl}
+% \cs{keys_set_exclude_groups:nnnnN} \Arg{module} \Arg{groups} \Arg{keyval list} \meta{root} \meta{tl}
% \end{syntax}
-% Activates key filtering in an \enquote{opt-out} sense: keys assigned to any
-% of the \meta{groups} specified are ignored. The \meta{groups} are
+% Sets keys by excluding those in the specificied \meta{groups}.
+% The \meta{groups} are
% given as a comma-separated list. Unknown keys are not assigned to any
% group and are thus always set. The key--value pairs for each
% key which is filtered out are stored in the \meta{tl} in a
% comma-separated form (\emph{i.e.}~an edited version of the \meta{keyval
-% list}). The \cs{keys_set_filter:nnn} version skips this stage.
+% list}). The \cs{keys_set_exclude_groups:nnn} version skips this stage.
%
-% Use of \cs{keys_set_filter:nnnN} can be nested, with the correct residual
+% Use of \cs{keys_set_exclude_groups:nnnN} can be nested, with the correct residual
% \meta{keyval list} returned at each stage. In the version which takes
% a \meta{root} argument, the key list is returned relative to that point
% in the key tree. In the cases without a \meta{root} argument, only
@@ -1662,7 +1668,7 @@
% \end{variable}
%
% \begin{variable}{\l_@@_selective_bool, \l_@@_filtered_bool}
-% Two flags for using key groups: one to indicate that \enquote{selective}
+% Two booleans for using key groups: one to indicate that \enquote{selective}
% setting is active, a second to specify which type (\enquote{opt-in}
% or \enquote{opt-out}).
% \begin{macrocode}
@@ -1755,6 +1761,21 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@@_cs_undefine:c}
+% Local version of \cs{cs_undefine:c} to avoid sprinkling
+% \cs{tex_undefined:D} everywhere.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_cs_undefine:c #1
+ {
+ \if_cs_exist:w #1 \cs_end:
+ \else:
+ \use_i:nnnn
+ \fi:
+ \cs_set_eq:cN {#1} \tex_undefined:D
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{The key defining mechanism}
%
% \begin{macro}{\keys_define:nn, \keys_define:ne, \keys_define:nx}
@@ -2061,9 +2082,8 @@
{
\tl_if_empty:nTF {#1}
{
- \cs_set_eq:cN
+ \@@_cs_undefine:c
{ \c_@@_default_root_str \l_keys_path_str }
- \tex_undefined:D
}
{
\cs_set_nopar:cpe
@@ -2084,11 +2104,11 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_groups_set:n #1
{
- \clist_set:Nn \l_@@_groups_clist {#1}
+ \clist_set:Ne \l_@@_groups_clist { \tl_to_str:n {#1} }
\clist_if_empty:NTF \l_@@_groups_clist
{
- \cs_set_eq:cN { \c_@@_groups_root_str \l_keys_path_str }
- \tex_undefined:D
+ \@@_cs_undefine:c
+ { \c_@@_groups_root_str \l_keys_path_str }
}
{
\cs_set_eq:cN { \c_@@_groups_root_str \l_keys_path_str }
@@ -2222,9 +2242,8 @@
\clist_map_inline:nn
{ code , default , groups , inherit , type , check }
{
- \cs_set_eq:cN
+ \@@_cs_undefine:c
{ \tl_use:c { c_@@_ ##1 _root_str } \l_keys_path_str }
- \tex_undefined:D
}
}
% \end{macrocode}
@@ -2254,9 +2273,8 @@
{ \c_@@_check_root_str \l_keys_path_str }
{ @@_check_ #1 : }
{
- \cs_set_eq:cN
+ \@@_cs_undefine:c
{ \c_@@_check_root_str \l_keys_path_str }
- \tex_undefined:D
}
}
}
@@ -2831,7 +2849,7 @@
% \keys_set_known:no
% }
% \begin{macro}{\@@_set_known:nnn}
-% Setting known keys simply means setting the appropriate flag, then
+% Setting known keys simply means setting the appropriate boolean, then
% running the standard code. To allow for nested setting, any existing
% value of \cs{l_@@_unused_clist} is saved on the stack and reset
% afterwards. Note that for speed/simplicity reasons we use a \texttt{tl}
@@ -2853,8 +2871,8 @@
{
\clist_clear:N \l_@@_unused_clist
\@@_set_known:nnn {#2} {#3} {#4}
- \__kernel_tl_set:Ne #5 { \exp_not:o \l_@@_unused_clist }
- \__kernel_tl_set:Ne \l_@@_unused_clist { \exp_not:n {#1} }
+ \__kernel_tl_set:Nx #5 { \exp_not:o \l_@@_unused_clist }
+ \__kernel_tl_set:Nx \l_@@_unused_clist { \exp_not:n {#1} }
}
\cs_new_protected:Npn \keys_set_known:nn #1#2
{ \@@_set_known:nnn \q_@@_no_value {#1} {#2} }
@@ -2887,21 +2905,21 @@
%
% \begin{macro}
% {
-% \keys_set_filter:nnnN, \keys_set_filter:nnVN, \keys_set_filter:nnvN,
-% \keys_set_filter:nnoN
+% \keys_set_exclude_groups:nnnN, \keys_set_exclude_groups:nnVN,
+% \keys_set_exclude_groups:nnvN, \keys_set_exclude_groups:nnoN
% }
% \begin{macro}
% {
-% \keys_set_filter:nnnnN, \keys_set_filter:nnVnN,
-% \keys_set_filter:nnvnN, \keys_set_filter:nnonN
+% \keys_set_exclude_groups:nnnnN, \keys_set_exclude_groups:nnVnN,
+% \keys_set_exclude_groups:nnvnN, \keys_set_exclude_groups:nnonN
% }
-% \begin{macro}{\@@_set_filter:nnnnnN}
+% \begin{macro}{\@@_set_exclude_groups:nnnnnN}
% \begin{macro}
% {
-% \keys_set_filter:nnn, \keys_set_filter:nnV, \keys_set_filter:nnv,
-% \keys_set_filter:nno
+% \keys_set_exclude_groups:nnn, \keys_set_exclude_groups:nnV,
+% \keys_set_exclude_groups:nnv, \keys_set_exclude_groups:nno
% }
-% \begin{macro}{\@@_set_filter:nnnn}
+% \begin{macro}{\@@_set_exclude_groups:nnnn}
% \begin{macro}
% {
% \keys_set_groups:nnn, \keys_set_groups:nnV, \keys_set_groups:nnv,
@@ -2909,35 +2927,35 @@
% }
% \begin{macro}{\@@_set_selective:nnn}
% \begin{macro}{\@@_set_selective:nnnn}
-% The idea of setting keys in a selective manner again uses flags
+% The idea of setting keys in a selective manner again uses booleans
% wrapped around the basic code. The comments on \cs{keys_set_known:nnN}
% also apply here. We have a bit more shuffling to do to keep everything
% nestable.
% \begin{macrocode}
-\cs_new_protected:Npn \keys_set_filter:nnnN #1#2#3#4
+\cs_new_protected:Npn \keys_set_exclude_groups:nnnN #1#2#3#4
{
- \exp_args:No \@@_set_filter:nnnnnN
+ \exp_args:No \@@_set_exclude_groups:nnnnnN
\l_@@_unused_clist
\q_@@_no_value {#1} {#2} {#3} #4
}
-\cs_generate_variant:Nn \keys_set_filter:nnnN { nnV , nnv , nno }
-\cs_new_protected:Npn \keys_set_filter:nnnnN #1#2#3#4#5
+\cs_generate_variant:Nn \keys_set_exclude_groups:nnnN { nnV , nnv , nno }
+\cs_new_protected:Npn \keys_set_exclude_groups:nnnnN #1#2#3#4#5
{
- \exp_args:No \@@_set_filter:nnnnnN
+ \exp_args:No \@@_set_exclude_groups:nnnnnN
\l_@@_unused_clist {#4} {#1} {#2} {#3} #5
}
-\cs_generate_variant:Nn \keys_set_filter:nnnnN { nnV , nnv , nno }
-\cs_new_protected:Npn \@@_set_filter:nnnnnN #1#2#3#4#5#6
+\cs_generate_variant:Nn \keys_set_exclude_groups:nnnnN { nnV , nnv , nno }
+\cs_new_protected:Npn \@@_set_exclude_groups:nnnnnN #1#2#3#4#5#6
{
\clist_clear:N \l_@@_unused_clist
- \@@_set_filter:nnnn {#2} {#3} {#4} {#5}
- \__kernel_tl_set:Ne #6 { \exp_not:o \l_@@_unused_clist }
- \__kernel_tl_set:Ne \l_@@_unused_clist { \exp_not:n {#1} }
+ \@@_set_exclude_groups:nnnn {#2} {#3} {#4} {#5}
+ \__kernel_tl_set:Nx #6 { \exp_not:o \l_@@_unused_clist }
+ \__kernel_tl_set:Nx \l_@@_unused_clist { \exp_not:n {#1} }
}
-\cs_new_protected:Npn \keys_set_filter:nnn #1#2#3
- {\@@_set_filter:nnnn \q_@@_no_value {#1} {#2} {#3} }
-\cs_generate_variant:Nn \keys_set_filter:nnn { nnV , nnv , nno }
-\cs_new_protected:Npn \@@_set_filter:nnnn #1#2#3#4
+\cs_new_protected:Npn \keys_set_exclude_groups:nnn #1#2#3
+ {\@@_set_exclude_groups:nnnn \q_@@_no_value {#1} {#2} {#3} }
+\cs_generate_variant:Nn \keys_set_exclude_groups:nnn { nnV , nnv , nno }
+\cs_new_protected:Npn \@@_set_exclude_groups:nnnn #1#2#3#4
{
\use:e
{
@@ -2981,7 +2999,8 @@
{ \exp_args:No \@@_set_selective:nnnn \l_@@_selective_seq }
\cs_new_protected:Npn \@@_set_selective:nnnn #1#2#3#4
{
- \seq_set_from_clist:Nn \l_@@_selective_seq {#3}
+ \exp_args:NNe \seq_set_from_clist:Nn
+ \l_@@_selective_seq { \tl_to_str:n {#3} }
\@@_set:nn {#2} {#4}
\tl_set:Nn \l_@@_selective_seq {#1}
}
@@ -3044,7 +3063,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_set_keyval:nnn #1#2#3
{
- \__kernel_tl_set:Ne \l_keys_path_str
+ \__kernel_tl_set:Nx \l_keys_path_str
{
\tl_if_blank:nF {#1}
{ #1 / }
@@ -3118,23 +3137,21 @@
% of groups which apply to a key with the list of those which have been
% set active. That requires two mappings, and again a different outcome
% depending on whether opt-in or opt-out is set.
-% We cannot replace the clist mapping by \cs{clist_if_in:NnTF} because
-% catcodes may not be the same; they cannot be normalized easily in the
-% clist because of the remote possibility that some items need braces
-% if they involve commas or leading/trailing spaces.
+% It is safe to use \cs{clist_if_in:NnTF} because
+% both \cs{l_@@_selective_seq} and \cs{l_@@_groups_clist} contain the
+% groups as strings, without leading/trailing spaces in any item,
+% since the \pkg{l3clist} functions were applied to the result of
+% applying \cs{tl_to_str:n}.
% \begin{macrocode}
\cs_new_protected:Npn \@@_check_groups:
{
\bool_set_false:N \l_@@_tmp_bool
\seq_map_inline:Nn \l_@@_selective_seq
{
- \clist_map_inline:Nn \l_@@_groups_clist
+ \clist_if_in:NnT \l_@@_groups_clist {##1}
{
- \str_if_eq:nnT {##1} {####1}
- {
- \bool_set_true:N \l_@@_tmp_bool
- \clist_map_break:n \seq_map_break:
- }
+ \bool_set_true:N \l_@@_tmp_bool
+ \seq_map_break:
}
}
\bool_if:NTF \l_@@_tmp_bool
@@ -3325,7 +3342,7 @@
}
\cs_new_protected:Npn \@@_store_unused_aux:
{
- \__kernel_tl_set:Ne \l_@@_relative_tl
+ \__kernel_tl_set:Nx \l_@@_relative_tl
{ \exp_args:No \@@_trim_spaces:n \l_@@_relative_tl }
\use:e
{
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3legacy.dtx b/Master/texmf-dist/source/latex/l3kernel/l3legacy.dtx
index 8f72634dc5b..f8846e7cb88 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3legacy.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3legacy.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
index 59e49857e76..55f33b80a50 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
index b504e402f7e..dced50e37fd 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -634,7 +634,7 @@
% \cs{msg_expandable_error:nnnnnn} \Arg{module} \Arg{message} \Arg{arg one} \Arg{arg two} \Arg{arg three} \Arg{arg four}
% \end{syntax}
% Issues an \enquote{Undefined error} message from \TeX{} itself
-% using the undefined control sequence \cs{::error} then prints
+% using the undefined control sequence \cs{???} then prints
% \enquote{! \meta{module}: }\meta{error message}, which should be
% short. With default settings, anything beyond approximately $60$
% characters long (or bytes in some engines) is cropped. A leading
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
index 58c7828ac9e..66e4056a05e 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3pdf.dtx b/Master/texmf-dist/source/latex/l3kernel/l3pdf.dtx
index 863d3681c35..d1e2a7e1859 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3pdf.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3pdf.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -275,7 +275,7 @@
% \end{variable}
%
% \begin{variable}{\g_@@_init_bool}
-% A flag so we have some chance of avoiding setting things we are not
+% A boolean so we have some chance of avoiding setting things we are not
% allowed to. As we are potentially early in the format, we have to work
% a bit harder than ideal.
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
index 866537f9049..0b134d713f3 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -171,6 +171,10 @@
% state. There must be a return statement for each branch; failing to do
% so will result in erroneous output if that branch is executed.
%
+% The special case where the code of a conditional ends with
+% \cs{prg_return_true:} \cs{else:} \cs{prg_return_false:} \cs{fi:} is
+% optimized.
+%
% \begin{function}[updated = 2023-05-26]
% {
% \prg_new_eq_conditional:NNn,
@@ -1789,9 +1793,10 @@
\tex_catcode:D `\^^@ = 2 \exp_stop_f:
\cs_new:Npn \group_align_safe_begin:
{ \exp:w \if_false: { \fi: `^^@ \exp_stop_f: }
-\group_end:
+\tex_catcode:D `\^^@ = 1 \exp_stop_f:
\cs_new:Npn \group_align_safe_end:
- { \if_int_compare:w `{ = \c_zero_int } \fi: }
+ { \exp:w `^^@ \if_false: } \fi: \exp_stop_f: }
+\group_end:
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
index f8bb23e765c..f6190ebee78 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
@@ -43,16 +43,16 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
% \begin{documentation}
%
-% \pkg{expl3} implements a \meta{property list} data type, which contain
+% \pkg{expl3} implements a property list data type, which contain
% an unordered list of entries each of which consists of a \meta{key} and
% an associated \meta{value}. The \meta{key} and \meta{value} may both
-% be any \meta{balanced text}, the \meta{key} is processed using
+% be any balanced text, and the \meta{key} is processed using
% \cs{tl_to_str:n}, meaning that category codes are ignored. It is possible to
% map functions to property lists such that the function is applied to every
% key--value pair within the list.
@@ -1266,8 +1266,8 @@
% updated entry is placed at the same spot as the original \meta{key}
% in the property list, preserving the order of entries.
% \begin{macrocode}
-\cs_new_protected:Npn \prop_put:Nnn { \@@_put:NNnn \__kernel_tl_set:Ne }
-\cs_new_protected:Npn \prop_gput:Nnn { \@@_put:NNnn \__kernel_tl_gset:Ne }
+\cs_new_protected:Npn \prop_put:Nnn { \@@_put:NNnn \__kernel_tl_set:Nx }
+\cs_new_protected:Npn \prop_gput:Nnn { \@@_put:NNnn \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \@@_put:NNnn #1#2#3#4
{
\tl_set:Nn \l_@@_internal_tl
@@ -1329,9 +1329,9 @@
% convert the key to a string using \cs{tl_to_str:n}.
% \begin{macrocode}
\cs_new_protected:Npn \prop_put_if_new:Nnn
- { \@@_put_if_new:NNnn \__kernel_tl_set:Ne }
+ { \@@_put_if_new:NNnn \__kernel_tl_set:Nx }
\cs_new_protected:Npn \prop_gput_if_new:Nnn
- { \@@_put_if_new:NNnn \__kernel_tl_gset:Ne }
+ { \@@_put_if_new:NNnn \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \@@_put_if_new:NNnn #1#2#3#4
{
\tl_set:Nn \l_@@_internal_tl
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
index 80b953353ff..281b8453ad5 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -970,7 +970,7 @@
% 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}.
% We also add the scan marks declared earlier to the pool here.
-% Since they lives in a different namespace, a little \pkg{l3docstrip}
+% Since they lives in a different namespace, a little \pkg{DocStrip}
% cheating is necessary.
% \begin{macrocode}
\cs_new_eq:NN \s_stop \scan_stop:
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx
index 37245cb0b92..952c115d29a 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -228,7 +228,7 @@
% Matches any of the specified tokens.
% \item[{[\char`\^\ldots{}]}] Negative character class.
% Matches any token other than the specified characters.
-% \item[{x-y}] Within a character class, this denotes a range (can be
+% \item[{[x-y]}] Within a character class, this denotes a range (can be
% used with escaped characters).
% \item[{[:\meta{name}:]}] Within a character class (one more set of
% brackets), this denotes the \textsc{posix} character class
@@ -928,9 +928,6 @@
% \item Does |\K| really need a new state for itself?
% \item When compiling, use a boolean \texttt{in_cs} and less magic
% numbers.
-% \item Instead of checking whether the character is special or
-% alphanumeric using its character code, check if it is special in
-% regexes with \cs[no-index]{cs_if_exist} tests.
% \end{itemize}
%
% The following features are likely to be implemented at some point
@@ -1135,10 +1132,10 @@
% Empty a \tn{toks} or set it to a value, given its number.
% \begin{macrocode}
\cs_new_protected:Npn \@@_toks_clear:N #1
- { \@@_toks_set:Nn #1 { } }
+ { \tex_toks:D #1 = { } }
\cs_new_eq:NN \@@_toks_set:Nn \tex_toks:D
\cs_new_protected:Npn \@@_toks_set:No #1
- { \tex_toks:D #1 \exp_after:wN }
+ { \tex_toks:D #1 = \exp_after:wN }
% \end{macrocode}
% \end{macro}
%
@@ -1167,20 +1164,24 @@
% \cs{@@_toks_put_right:Ne} is provided because it is more
% efficient than \texttt{e}-expanding with \cs{exp_not:n}.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_toks_put_left:Ne #1#2
+\cs_if_exist:NTF \tex_etokspre:D
+ { \cs_new_eq:NN \@@_toks_put_left:Ne \tex_etokspre:D }
{
- \cs_set_nopar:Npe \@@_tmp:w { #2 }
- \tex_toks:D #1 \exp_after:wN \exp_after:wN \exp_after:wN
- { \exp_after:wN \@@_tmp:w \tex_the:D \tex_toks:D #1 }
+ \cs_new_protected:Npn \@@_toks_put_left:Ne #1#2
+ { \tex_toks:D #1 = \tex_expanded:D {{ #2 \tex_the:D \tex_toks:D #1 }} }
}
-\cs_new_protected:Npn \@@_toks_put_right:Ne #1#2
+\cs_if_exist:NTF \tex_etoksapp:D
+ { \cs_new_eq:NN \@@_toks_put_right:Ne \tex_etoksapp:D }
{
- \cs_set_nopar:Npe \@@_tmp:w {#2}
- \tex_toks:D #1 \exp_after:wN
- { \tex_the:D \tex_toks:D \exp_after:wN #1 \@@_tmp:w }
+ \cs_new_protected:Npn \@@_toks_put_right:Ne #1#2
+ { \tex_toks:D #1 = \tex_expanded:D {{ \tex_the:D \tex_toks:D #1 #2 }} }
+ }
+\cs_if_exist:NTF \tex_toksapp:D
+ { \cs_new_eq:NN \@@_toks_put_right:Nn \tex_toksapp:D }
+ {
+ \cs_new_protected:Npn \@@_toks_put_right:Nn #1#2
+ { \tex_toks:D #1 = \exp_after:wN { \tex_the:D \tex_toks:D #1 #2 } }
}
-\cs_new_protected:Npn \@@_toks_put_right:Nn #1#2
- { \tex_toks:D #1 \exp_after:wN { \tex_the:D \tex_toks:D #1 #2 } }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1203,15 +1204,13 @@
% Item of intarray, with a default value.
% \begin{macrocode}
\cs_new:Npn \@@_intarray_item:NnF #1#2
- { \exp_args:Nf \@@_intarray_item_aux:nNF { \int_eval:n {#2} } #1 }
+ { \exp_args:No \@@_intarray_item_aux:nNF { \tex_the:D \@@_int_eval:w #2 } #1 }
\cs_new:Npn \@@_intarray_item_aux:nNF #1#2
{
\if_int_compare:w #1 > \c_zero_int
- \exp_after:wN \use_i:nn
- \else:
- \exp_after:wN \use_ii:nn
+ \exp_after:wN \use_ii:nnn
\fi:
- { \__kernel_intarray_item:Nn #2 {#1} }
+ \use_ii:nn { \__kernel_intarray_item:Nn #2 {#1} }
}
% \end{macrocode}
% \end{macro}
@@ -1465,14 +1464,12 @@
\if_int_compare:w \l_@@_curr_char_int > `Z \exp_stop_f:
\if_int_compare:w \l_@@_curr_char_int > `z \exp_stop_f: \else:
\if_int_compare:w \l_@@_curr_char_int < `a \exp_stop_f: \else:
- \int_sub:Nn \l_@@_case_changed_char_int
- { \c_@@_ascii_lower_int }
+ \int_sub:Nn \l_@@_case_changed_char_int \c_@@_ascii_lower_int
\fi:
\fi:
\else:
\if_int_compare:w \l_@@_curr_char_int < `A \exp_stop_f: \else:
- \int_add:Nn \l_@@_case_changed_char_int
- { \c_@@_ascii_lower_int }
+ \int_add:Nn \l_@@_case_changed_char_int \c_@@_ascii_lower_int
\fi:
\fi:
\cs_set_eq:NN \@@_maybe_compute_ccc: \prg_do_nothing:
@@ -1510,12 +1507,12 @@
\or: 1000000 \or: 4000000 \else: 1*0
\fi:
}
-\cs_new_protected:Npn \@@_item_catcode:nT #1
+\prg_new_protected_conditional:Npnn \@@_item_catcode:n #1 { T }
{
- \if_int_odd:w \int_eval:n { #1 / \@@_item_catcode: } \exp_stop_f:
- \exp_after:wN \use:n
+ \if_int_odd:w \@@_int_eval:w #1 / \@@_item_catcode: \scan_stop:
+ \prg_return_true:
\else:
- \exp_after:wN \use_none:n
+ \prg_return_false:
\fi:
}
\cs_new_protected:Npn \@@_item_catcode_reverse:nT #1#2
@@ -1539,9 +1536,9 @@
}
\cs_new_protected:Npn \@@_item_exact_cs:n #1
{
- \int_compare:nNnTF \l_@@_curr_catcode_int = 0
+ \int_compare:nNnTF \l_@@_curr_catcode_int = \c_zero_int
{
- \__kernel_tl_set:Ne \l_@@_internal_a_tl
+ \__kernel_tl_set:Nx \l_@@_internal_a_tl
{ \scan_stop: \@@_curr_cs_to_str: \scan_stop: }
\tl_if_in:noTF { \scan_stop: #1 \scan_stop: }
\l_@@_internal_a_tl
@@ -1560,7 +1557,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_item_cs:n #1
{
- \int_compare:nNnT \l_@@_curr_catcode_int = 0
+ \int_compare:nNnT \l_@@_curr_catcode_int = \c_zero_int
{
\group_begin:
\@@_single_match:
@@ -1729,7 +1726,7 @@
\cs_set:Npn \@@_escape_escaped:N ##1 { #2 }
\cs_set:Npn \@@_escape_raw:N ##1 { #3 }
\@@_standard_escapechar:
- \__kernel_tl_gset:Ne \g_@@_internal_tl
+ \__kernel_tl_gset:Nx \g_@@_internal_tl
{ \__kernel_str_to_other_fast:n {#4} }
\tl_put_right:Ne \l_@@_internal_a_tl
{
@@ -1936,13 +1933,13 @@
% lowercase letters, which we need to detect and replace by their
% uppercase counterpart.
% \begin{macrocode}
-\prg_new_conditional:Npnn \@@_hexadecimal_use:N #1 { TF }
+\cs_new:Npn \@@_hexadecimal_use:NTF #1
{
- \if_int_compare:w 1 < "1 \token_to_str:N #1 \exp_stop_f:
- #1 \prg_return_true:
+ \if_int_compare:w \c_one_int < "1 \token_to_str:N #1 \exp_stop_f:
+ #1
\else:
\if_case:w
- \int_eval:n { \exp_after:wN ` \token_to_str:N #1 - `a }
+ \@@_int_eval:w \exp_after:wN ` \token_to_str:N #1 - `a \scan_stop:
A
\or: B
\or: C
@@ -1950,11 +1947,10 @@
\or: E
\or: F
\else:
- \prg_return_false:
- \exp_after:wN \use_none:n
+ \exp_after:wN \exp_after:wN \exp_after:wN \use_iii:nnn
\fi:
- \prg_return_true:
\fi:
+ \use_i:nn
}
% \end{macrocode}
% \end{macro}
@@ -1986,43 +1982,57 @@
% \begin{macrocode}
\prg_new_conditional:Npnn \@@_char_if_special:N #1 { TF }
{
- \if_int_compare:w `#1 > `Z \exp_stop_f:
- \if_int_compare:w `#1 > `z \exp_stop_f:
- \if_int_compare:w `#1 < \c_@@_ascii_max_int
- \prg_return_true: \else: \prg_return_false: \fi:
- \else:
- \if_int_compare:w `#1 < `a \exp_stop_f:
- \prg_return_true: \else: \prg_return_false: \fi:
- \fi:
+ \if:w
+ T
+ \if_int_compare:w `#1 > `Z \exp_stop_f:
+ \if_int_compare:w `#1 > `z \exp_stop_f:
+ \if_int_compare:w `#1 < \c_@@_ascii_max_int
+ \else: F \fi:
+ \else:
+ \if_int_compare:w `#1 < `a \exp_stop_f:
+ \else: F \fi:
+ \fi:
+ \else:
+ \if_int_compare:w `#1 > `9 \exp_stop_f:
+ \if_int_compare:w `#1 < `A \exp_stop_f:
+ \else: F \fi:
+ \else:
+ \if_int_compare:w `#1 < `0 \exp_stop_f:
+ \if_int_compare:w `#1 < `\ \exp_stop_f:
+ F \fi:
+ \else: F \fi:
+ \fi:
+ \fi:
+ T
+ \prg_return_true:
\else:
- \if_int_compare:w `#1 > `9 \exp_stop_f:
- \if_int_compare:w `#1 < `A \exp_stop_f:
- \prg_return_true: \else: \prg_return_false: \fi:
- \else:
- \if_int_compare:w `#1 < `0 \exp_stop_f:
- \if_int_compare:w `#1 < `\ \exp_stop_f:
- \prg_return_false: \else: \prg_return_true: \fi:
- \else: \prg_return_false: \fi:
- \fi:
+ \prg_return_false:
\fi:
}
\prg_new_conditional:Npnn \@@_char_if_alphanumeric:N #1 { TF }
{
- \if_int_compare:w `#1 > `Z \exp_stop_f:
- \if_int_compare:w `#1 > `z \exp_stop_f:
- \prg_return_false:
- \else:
- \if_int_compare:w `#1 < `a \exp_stop_f:
- \prg_return_false: \else: \prg_return_true: \fi:
- \fi:
+ \if:w
+ T
+ \if_int_compare:w `#1 > `Z \exp_stop_f:
+ \if_int_compare:w `#1 > `z \exp_stop_f:
+ F
+ \else:
+ \if_int_compare:w `#1 < `a \exp_stop_f:
+ F \fi:
+ \fi:
+ \else:
+ \if_int_compare:w `#1 > `9 \exp_stop_f:
+ \if_int_compare:w `#1 < `A \exp_stop_f:
+ F \fi:
+ \else:
+ \if_int_compare:w `#1 < `0 \exp_stop_f:
+ F \fi:
+ \fi:
+ \fi:
+ T
+ \prg_return_true:
\else:
- \if_int_compare:w `#1 > `9 \exp_stop_f:
- \if_int_compare:w `#1 < `A \exp_stop_f:
- \prg_return_false: \else: \prg_return_true: \fi:
- \else:
- \if_int_compare:w `#1 < `0 \exp_stop_f:
- \prg_return_false: \else: \prg_return_true: \fi:
- \fi:
+ \prg_return_false:
\fi:
}
% \end{macrocode}
@@ -2179,17 +2189,14 @@
% Besides, the expanding behaviour of \cs{if:w} is very useful as that
% means we can use \cs{c_left_brace_str} and the like.
% \begin{macrocode}
-\prg_new_conditional:Npnn \@@_two_if_eq:NNNN #1#2#3#4 { TF }
+\cs_new:Npn \@@_two_if_eq:NNNNTF #1#2#3#4
{
\if_meaning:w #1 #3
\if:w #2 #4
- \prg_return_true:
- \else:
- \prg_return_false:
+ \exp_after:wN \exp_after:wN \exp_after:wN \use_ii:nnn
\fi:
- \else:
- \prg_return_false:
\fi:
+ \use_ii:nn
}
% \end{macrocode}
% \end{macro}
@@ -2220,17 +2227,14 @@
% Test used when grabbing digits for the |{m,n}| quantifier.
% It only accepts non-escaped digits.
% \begin{macrocode}
-\prg_new_conditional:Npnn \@@_if_raw_digit:NN #1#2 { TF }
+\cs_new:Npn \@@_if_raw_digit:NNTF #1#2
{
\if_meaning:w \@@_compile_raw:N #1
- \if_int_compare:w 1 < 1 #2 \exp_stop_f:
- \prg_return_true:
- \else:
- \prg_return_false:
+ \if_int_compare:w \c_one_int < 1 #2 \exp_stop_f:
+ \exp_after:wN \exp_after:wN \exp_after:wN \use_ii:nnn
\fi:
- \else:
- \prg_return_false:
\fi:
+ \use_ii:nn
}
% \end{macrocode}
% \end{macro}
@@ -2284,12 +2288,12 @@
% and special characters are normal. Also, for every raw character, we
% must look ahead for a possible raw dash.
% \begin{macrocode}
-\cs_new:Npn \@@_if_in_class:TF
+\prg_new_conditional:Npnn \@@_if_in_class: { TF }
{
\if_int_odd:w \l_@@_mode_int
- \exp_after:wN \use_i:nn
+ \prg_return_true:
\else:
- \exp_after:wN \use_ii:nn
+ \prg_return_false:
\fi:
}
% \end{macrocode}
@@ -2302,14 +2306,12 @@
\cs_new:Npn \@@_if_in_cs:TF
{
\if_int_odd:w \l_@@_mode_int
- \exp_after:wN \use_ii:nn
\else:
\if_int_compare:w \l_@@_mode_int < \c_@@_outer_mode_int
- \exp_after:wN \exp_after:wN \exp_after:wN \use_i:nn
- \else:
- \exp_after:wN \exp_after:wN \exp_after:wN \use_ii:nn
+ \exp_after:wN \exp_after:wN \exp_after:wN \use_ii:nnn
\fi:
\fi:
+ \use_ii:nn
}
% \end{macrocode}
% \end{macro}
@@ -2321,14 +2323,13 @@
\cs_new:Npn \@@_if_in_class_or_catcode:TF
{
\if_int_odd:w \l_@@_mode_int
- \exp_after:wN \use_i:nn
\else:
\if_int_compare:w \l_@@_mode_int > \c_@@_outer_mode_int
- \exp_after:wN \exp_after:wN \exp_after:wN \use_i:nn
\else:
- \exp_after:wN \exp_after:wN \exp_after:wN \use_ii:nn
+ \exp_after:wN \exp_after:wN \exp_after:wN \use_iii:nnn
\fi:
\fi:
+ \use_i:nn
}
% \end{macrocode}
% \end{macro}
@@ -2339,12 +2340,12 @@
% it applies (modes $23$ and $63$). This is used to tweak how left
% brackets behave in modes $2$ and $6$.
% \begin{macrocode}
-\cs_new:Npn \@@_if_within_catcode:TF
+\prg_new_conditional:Npnn \@@_if_within_catcode: { TF }
{
\if_int_compare:w \l_@@_mode_int > \c_@@_outer_mode_int
- \exp_after:wN \use_i:nn
+ \prg_return_true:
\else:
- \exp_after:wN \use_ii:nn
+ \prg_return_false:
\fi:
}
% \end{macrocode}
@@ -2357,15 +2358,14 @@
\cs_new_protected:Npn \@@_chk_c_allowed:T
{
\if_int_compare:w \l_@@_mode_int = \c_@@_outer_mode_int
- \exp_after:wN \use:n
\else:
\if_int_compare:w \l_@@_mode_int = \c_@@_class_mode_int
- \exp_after:wN \exp_after:wN \exp_after:wN \use:n
\else:
\msg_error:nn { regex } { c-bad-mode }
- \exp_after:wN \exp_after:wN \exp_after:wN \use_none:n
+ \exp_after:wN \use_i:nnn
\fi:
\fi:
+ \use:n
}
% \end{macrocode}
% \end{macro}
@@ -2424,7 +2424,7 @@
\msg_error:nne { regex } { missing-rparen }
{ \int_use:N \l_@@_group_level_int }
\prg_replicate:nn
- { \l_@@_group_level_int }
+ \l_@@_group_level_int
{
\tl_build_put_right:Nn \l_@@_build_tl
{
@@ -2712,7 +2712,7 @@
{ \@@_compile_special:N \c_right_brace_str }
{
\exp_args:No \@@_compile_quantifier_lazyness:nnNN
- { \int_use:N \l_@@_internal_a_int } { 0 }
+ { \int_use:N \l_@@_internal_a_int } 0
}
{ \@@_compile_special:N , }
{
@@ -2818,21 +2818,19 @@
% raw character; any special character, except a right bracket. In
% particular, escaped characters are forbidden.
% \begin{macrocode}
-\prg_new_protected_conditional:Npnn \@@_if_end_range:NN #1#2 { TF }
+\cs_new_protected:Npn \@@_if_end_range:NNTF #1#2
{
\if_meaning:w \@@_compile_raw:N #1
- \prg_return_true:
\else:
\if_meaning:w \@@_compile_special:N #1
\if_charcode:w ] #2
- \prg_return_false:
- \else:
- \prg_return_true:
+ \use_i:nn
\fi:
\else:
- \prg_return_false:
+ \exp_after:wN \exp_after:wN \exp_after:wN \use_iii:nnn
\fi:
\fi:
+ \use_i:nn
}
\cs_new_protected:Npn \@@_compile_range:Nw #1#2#3
{
@@ -3133,12 +3131,12 @@
\@@_two_if_eq:NNNNTF #5 #6 \@@_compile_special:N ^
{
\bool_set_false:N \l_@@_internal_bool
- \__kernel_tl_set:Ne \l_@@_internal_a_tl { \if_false: } \fi:
+ \__kernel_tl_set:Nx \l_@@_internal_a_tl { \if_false: } \fi:
\@@_compile_class_posix_loop:w
}
{
\bool_set_true:N \l_@@_internal_bool
- \__kernel_tl_set:Ne \l_@@_internal_a_tl { \if_false: } \fi:
+ \__kernel_tl_set:Nx \l_@@_internal_a_tl { \if_false: } \fi:
\@@_compile_class_posix_loop:w #5 #6
}
}
@@ -3460,7 +3458,7 @@
}
\cs_new_protected:Npn \@@_compile_c_lbrack_add:N #1
{
- \if_int_odd:w \int_eval:n { \l_@@_catcodes_int / #1 } \exp_stop_f:
+ \if_int_odd:w \@@_int_eval:w \l_@@_catcodes_int / #1 \scan_stop:
\else:
\int_add:Nn \l_@@_catcodes_int {#1}
\fi:
@@ -3510,7 +3508,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{variable}{@@_cs}
+% \begin{variable}{\l_@@_cs_flag}
% \begin{macro}+\@@_compile_}:+
% \begin{macro}{\@@_compile_end_cs:}
% \begin{macro}[EXP]{\@@_compile_cs_aux:Nn, \@@_compile_cs_aux:NNnnnN}
@@ -3524,7 +3522,7 @@
% \cs{@@_item_exact_cs:n} with an argument consisting of all
% possibilities separated by \cs{scan_stop:}.
% \begin{macrocode}
-\flag_new:n { @@_cs }
+\flag_new:N \l_@@_cs_flag
\cs_new_protected:cpn { @@_compile_ \c_right_brace_str : }
{
\@@_if_in_cs:TF
@@ -3534,15 +3532,15 @@
\cs_new_protected:Npn \@@_compile_end_cs:
{
\@@_compile_end:
- \flag_clear:n { @@_cs }
- \__kernel_tl_set:Ne \l_@@_internal_a_tl
+ \flag_clear:N \l_@@_cs_flag
+ \__kernel_tl_set:Nx \l_@@_internal_a_tl
{
\exp_after:wN \@@_compile_cs_aux:Nn \l_@@_internal_regex
\q_@@_nil \q_@@_nil \q_@@_recursion_stop
}
\exp_args:Ne \@@_compile_one:n
{
- \flag_if_raised:nTF { @@_cs }
+ \flag_if_raised:NTF \l_@@_cs_flag
{ \@@_item_cs:n { \exp_not:o \l_@@_internal_regex } }
{
\@@_item_exact_cs:n
@@ -3561,7 +3559,7 @@
\@@_compile_cs_aux:Nn
}
{
- \@@_quark_if_nil:NF #1 { \flag_ensure_raised:n { @@_cs } }
+ \@@_quark_if_nil:NF #1 { \flag_ensure_raised:N \l_@@_cs_flag }
\@@_use_none_delimit_by_q_recursion_stop:w
}
}
@@ -3573,7 +3571,7 @@
{#2}
{ \tl_if_head_eq_meaning_p:nN {#3} \@@_item_caseful_equal:n }
{ \int_compare_p:nNn { \tl_count:n {#3} } = { 2 } }
- { \int_compare_p:nNn {#5} = { 0 } }
+ { \int_compare_p:nNn {#5} = \c_zero_int }
}
{
\prg_replicate:nn {#4}
@@ -3583,7 +3581,7 @@
{
\@@_quark_if_nil:NF #1
{
- \flag_ensure_raised:n { @@_cs }
+ \flag_ensure_raised:N \l_@@_cs_flag
\@@_use_i_delimit_by_q_recursion_stop:nw
}
\@@_use_none_delimit_by_q_recursion_stop:w
@@ -3624,7 +3622,7 @@
\@@_two_if_eq:NNNNTF #2 #3 \@@_compile_special:N \c_left_brace_str
{
\tl_set:Nn \l_@@_internal_b_tl {#1}
- \__kernel_tl_set:Ne \l_@@_internal_a_tl { \if_false: } \fi:
+ \__kernel_tl_set:Nx \l_@@_internal_a_tl { \if_false: } \fi:
\@@_compile_u_loop:NN
}
{
@@ -3758,7 +3756,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_compile_u_in_cs:
{
- \__kernel_tl_gset:Ne \g_@@_internal_tl
+ \__kernel_tl_gset:Nx \g_@@_internal_tl
{
\exp_args:No \__kernel_str_to_other_fast:n
{ \l_@@_internal_a_tl }
@@ -3857,10 +3855,10 @@
}
\cs_new:Npn \@@_clean_int_aux:N #1
{
- \if_int_compare:w 1 < 1 #1 ~
+ \if_int_compare:w \c_one_int < 1 #1 ~
#1
\else:
- \exp_after:wN \str_map_break:
+ \str_map_break:n
\fi:
}
\cs_new:Npn \@@_clean_regex:n #1
@@ -3881,7 +3879,7 @@
}
\cs_new:Npn \@@_clean_branch_loop:n #1
{
- \tl_if_single:nF {#1} { \prg_break: }
+ \tl_if_single:nF {#1} \prg_break:
\token_case_meaning:NnF #1
{
\@@_command_K: { #1 \@@_clean_branch_loop:n }
@@ -3891,7 +3889,7 @@
\@@_group_no_capture:nnnN { #1 \@@_clean_group:nnnN }
\@@_group_resetting:nnnN { #1 \@@_clean_group:nnnN }
}
- { \prg_break: }
+ \prg_break:
}
\cs_new:Npn \@@_clean_assertion:Nn #1#2
{
@@ -3912,16 +3910,16 @@
{
\@@_clean_bool:n {#1}
{ \@@_clean_class:n {#2} }
- { \int_max:nn { 0 } { \@@_clean_int:n {#3} } }
- { \int_max:nn { -1 } { \@@_clean_int:n {#4} } }
+ { \int_max:nn \c_zero_int { \@@_clean_int:n {#3} } }
+ { \int_max:nn { -\c_one_int } { \@@_clean_int:n {#4} } }
\@@_clean_bool:n {#5}
\@@_clean_branch_loop:n
}
\cs_new:Npn \@@_clean_group:nnnN #1#2#3#4
{
{ \@@_clean_regex:n {#1} }
- { \int_max:nn { 0 } { \@@_clean_int:n {#2} } }
- { \int_max:nn { -1 } { \@@_clean_int:n {#3} } }
+ { \int_max:nn \c_zero_int { \@@_clean_int:n {#2} } }
+ { \int_max:nn { -\c_one_int } { \@@_clean_int:n {#3} } }
\@@_clean_bool:n {#4}
\@@_clean_branch_loop:n
}
@@ -3936,7 +3934,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_clean_class_loop:nnn #1#2#3
{
- \tl_if_single:nF {#1} { \prg_break: }
+ \tl_if_single:nF {#1} \prg_break:
\token_case_meaning:NnTF #1
{
\@@_item_cs:n { #1 { \@@_clean_regex:n {#2} } }
@@ -3968,10 +3966,10 @@
\@@_clean_class_loop:nnn
}
{
- \exp_args:Nf \str_case:nnTF
+ \exp_args:Ne \str_case:nnTF
{
- \exp_args:Nf \str_range:nnn
- { \cs_to_str:N #1 } { 1 } { 13 }
+ \exp_args:Ne \str_range:nnn
+ { \cs_to_str:N #1 } \c_one_int { 13 }
}
{
{ @@_prop_ } { }
@@ -3981,7 +3979,7 @@
#1
\@@_clean_class_loop:nnn {#2} {#3}
}
- { \prg_break: }
+ \prg_break:
}
}
}
@@ -4164,14 +4162,14 @@
\int_zero:N \l_@@_show_lines_int
\@@_show_push:n {~}
#2
- \int_compare:nTF { \l_@@_show_lines_int = 0 }
+ \int_compare:nTF { \l_@@_show_lines_int = \c_zero_int }
{
\group_end:
\@@_show_one:n { \bool_if:NTF #1 { Fail } { Pass } }
}
{
\bool_if:nTF
- { #1 && \int_compare_p:n { \l_@@_show_lines_int = 1 } }
+ { #1 && \int_compare_p:n { \l_@@_show_lines_int = \c_one_int } }
{
\group_end:
#2
@@ -4389,7 +4387,7 @@
%
\@@_build_new_state:
\@@_toks_put_left:Ne \l_@@_left_state_int
- { \@@_action_submatch:nN { 0 } < }
+ { \@@_action_submatch:nN \c_zero_int < }
\@@_push_lr_states:
\int_zero:N \l_@@_case_max_group_int
\int_gzero:N \g_@@_case_int
@@ -4403,18 +4401,15 @@
}
\cs_new_protected:Npn \@@_case_build_loop:n #1
{
- \int_set:Nn \l_@@_capturing_group_int { 1 }
+ \int_set_eq:NN \l_@@_capturing_group_int \c_one_int
\@@_compile_use:n {#1}
\int_set:Nn \l_@@_case_max_group_int
- {
- \int_max:nn { \l_@@_case_max_group_int }
- { \l_@@_capturing_group_int }
- }
+ { \int_max:nn \l_@@_case_max_group_int \l_@@_capturing_group_int }
\seq_pop:NN \l_@@_right_state_seq \l_@@_internal_a_tl
\int_set:Nn \l_@@_right_state_int \l_@@_internal_a_tl
\@@_toks_put_left:Ne \l_@@_right_state_int
{
- \@@_action_submatch:nN { 0 } >
+ \@@_action_submatch:nN \c_zero_int >
\int_gset:Nn \g_@@_case_int
{ \int_use:N \g_@@_case_int }
\@@_action_success:
@@ -4500,9 +4495,9 @@
% differing usage later on. Both functions could be optimized.
% \begin{macrocode}
\cs_new_protected:Npn \@@_build_transition_left:NNN #1#2#3
- { \@@_toks_put_left:Ne #2 { #1 { \int_eval:n { #3 - #2 } } } }
+ { \@@_toks_put_left:Ne #2 { #1 { \tex_the:D \@@_int_eval:w #3 - #2 } } }
\cs_new_protected:Npn \@@_build_transition_right:nNn #1#2#3
- { \@@_toks_put_right:Ne #2 { #1 { \int_eval:n { #3 - #2 } } } }
+ { \@@_toks_put_right:Ne #2 { #1 { \tex_the:D \@@_int_eval:w #3 - #2 } } }
% \end{macrocode}
% \end{macro}
%
@@ -4534,11 +4529,11 @@
\@@_toks_put_right:Ne \l_@@_left_state_int
{
\if_meaning:w \c_true_bool #1
- #2 { \int_eval:n { #3 - \l_@@_left_state_int } }
- #4 { \int_eval:n { #5 - \l_@@_left_state_int } }
+ #2 { \tex_the:D \@@_int_eval:w #3 - \l_@@_left_state_int }
+ #4 { \tex_the:D \@@_int_eval:w #5 - \l_@@_left_state_int }
\else:
- #4 { \int_eval:n { #5 - \l_@@_left_state_int } }
- #2 { \int_eval:n { #3 - \l_@@_left_state_int } }
+ #4 { \tex_the:D \@@_int_eval:w #5 - \l_@@_left_state_int }
+ #2 { \tex_the:D \@@_int_eval:w #3 - \l_@@_left_state_int }
\fi:
}
}
@@ -4636,7 +4631,7 @@
{
\@@_class_repeat:n {#1}
\int_set:Nn \l_@@_internal_a_int
- { \l_@@_max_state_int + #2 - 1 }
+ { \l_@@_max_state_int + #2 - \c_one_int }
\prg_replicate:nn { #2 }
{
\@@_build_transitions_lazyness:NNNNN #3
@@ -4730,8 +4725,8 @@
\use_none:nn #3 { \int_set:Nn \l_@@_capturing_group_int {#1} }
\int_set:Nn \l_@@_capturing_group_int {#2}
#3 {#4}
- \exp_args:Nf \@@_group_resetting_loop:nnNn
- { \int_max:nn {#1} { \l_@@_capturing_group_int } }
+ \exp_args:Ne \@@_group_resetting_loop:nnNn
+ { \int_max:nn {#1} \l_@@_capturing_group_int }
{#2}
}
% \end{macrocode}
@@ -4774,7 +4769,7 @@
{
\if_int_compare:w #2 = \c_zero_int
\int_set:Nn \l_@@_max_state_int
- { \l_@@_left_state_int - 1 }
+ { \l_@@_left_state_int - \c_one_int }
\@@_build_new_state:
\else:
\@@_group_repeat_aux:n {#2}
@@ -4816,14 +4811,14 @@
\l_@@_right_state_int \l_@@_max_state_int
\int_set_eq:NN \l_@@_internal_a_int \l_@@_left_state_int
\int_set_eq:NN \l_@@_internal_b_int \l_@@_max_state_int
- \if_int_compare:w \int_eval:n {#1} > \c_one_int
+ \if_int_compare:w \@@_int_eval:w #1 > \c_one_int
\int_set:Nn \l_@@_internal_c_int
{
- ( #1 - 1 )
+ ( #1 - \c_one_int )
* ( \l_@@_internal_b_int - \l_@@_internal_a_int )
}
- \int_add:Nn \l_@@_right_state_int { \l_@@_internal_c_int }
- \int_add:Nn \l_@@_max_state_int { \l_@@_internal_c_int }
+ \int_add:Nn \l_@@_right_state_int \l_@@_internal_c_int
+ \int_add:Nn \l_@@_max_state_int \l_@@_internal_c_int
\@@_toks_memcpy:NNn
\l_@@_internal_b_int
\l_@@_internal_a_int
@@ -4859,7 +4854,7 @@
\@@_group_submatches:nNN {#1}
\l_@@_left_state_int \l_@@_right_state_int
\int_set:Nn \l_@@_internal_a_int
- { \l_@@_left_state_int - 1 }
+ { \l_@@_left_state_int - \c_one_int }
\@@_build_transition_right:nNn \@@_action_free:n
\l_@@_right_state_int \l_@@_internal_a_int
\@@_build_new_state:
@@ -4919,7 +4914,7 @@
\l_@@_left_state_int \l_@@_max_state_int
}
\else:
- \prg_replicate:nn { #3 - 1 }
+ \prg_replicate:nn { #3 - \c_one_int }
{
\int_sub:Nn \l_@@_right_state_int
{ \l_@@_internal_b_int - \l_@@_internal_a_int }
@@ -4928,7 +4923,7 @@
}
\if_int_compare:w #2 = \c_zero_int
\int_set:Nn \l_@@_right_state_int
- { \l_@@_left_state_int - 1 }
+ { \l_@@_left_state_int - \c_one_int }
\else:
\int_sub:Nn \l_@@_right_state_int
{ \l_@@_internal_b_int - \l_@@_internal_a_int }
@@ -4963,8 +4958,8 @@
{
\@@_action_free:n
{
- \int_eval:n
- { \l_@@_right_state_int - \l_@@_left_state_int }
+ \tex_the:D \@@_int_eval:w
+ \l_@@_right_state_int - \l_@@_left_state_int
}
}
\bool_if:NT #1 { { } }
@@ -5009,12 +5004,12 @@
\@@_build_new_state:
\@@_toks_put_right:Ne \l_@@_left_state_int
{
- \@@_action_submatch:nN { 0 } <
+ \@@_action_submatch:nN \c_zero_int <
\bool_set_true:N \l_@@_fresh_thread_bool
\@@_action_free:n
{
- \int_eval:n
- { \l_@@_right_state_int - \l_@@_left_state_int }
+ \tex_the:D \@@_int_eval:w
+ \l_@@_right_state_int - \l_@@_left_state_int
}
\bool_set_false:N \l_@@_fresh_thread_bool
}
@@ -5300,10 +5295,10 @@
{
\bool_gset_false:N \g_@@_success_bool
\int_step_inline:nnn
- \l_@@_min_state_int { \l_@@_max_state_int - 1 }
+ \l_@@_min_state_int { \l_@@_max_state_int - \c_one_int }
{
\__kernel_intarray_gset:Nnn
- \g_@@_state_active_intarray {##1} { 1 }
+ \g_@@_state_active_intarray {##1} \c_one_int
}
\int_zero:N \l_@@_step_int
\int_set:Nn \l_@@_min_pos_int { 2 }
@@ -5311,7 +5306,7 @@
\int_set:Nn \l_@@_last_char_success_int { -2 }
\tl_build_begin:N \l_@@_matched_analysis_tl
\tl_clear:N \l_@@_curr_analysis_tl
- \int_set:Nn \l_@@_min_submatch_int { 1 }
+ \int_set_eq:NN \l_@@_min_submatch_int \c_one_int
\int_set_eq:NN \l_@@_submatch_int \l_@@_min_submatch_int
\bool_set_false:N \l_@@_empty_success_bool
}
@@ -5353,8 +5348,7 @@
{ \prg_replicate:nn { 2 * \l_@@_capturing_group_int } { 0 , } }
\int_set_eq:NN \l_@@_max_thread_int \l_@@_min_thread_int
\@@_store_state:n { \l_@@_min_state_int }
- \int_set:Nn \l_@@_curr_pos_int
- { \l_@@_start_pos_int - 1 }
+ \int_set:Nn \l_@@_curr_pos_int { \l_@@_start_pos_int - \c_one_int }
\int_set_eq:NN \l_@@_curr_char_int \l_@@_last_char_success_int
\tl_build_get_intermediate:NN \l_@@_matched_analysis_tl \l_@@_internal_a_tl
\exp_args:NNf \@@_match_once_init_aux:
@@ -5432,15 +5426,15 @@
{
\int_set_eq:NN \l_@@_max_thread_int \l_@@_min_thread_int
\int_step_function:nnN
- { \l_@@_min_thread_int }
- { \l_@@_max_thread_int - 1 }
+ \l_@@_min_thread_int
+ { \l_@@_max_thread_int - \c_one_int }
\@@_match_one_active:n
}
\prg_break_point:
\bool_set_false:N \l_@@_fresh_thread_bool
\if_int_compare:w \l_@@_max_thread_int > \l_@@_min_thread_int
\if_int_compare:w -2 < \l_@@_curr_char_int
- \exp_after:wN \exp_after:wN \exp_after:wN \use_none:n
+ \exp_after:wN \use_i:nn
\fi:
\fi:
\l_@@_every_match_tl
@@ -5450,8 +5444,8 @@
\@@_use_state_and_submatches:w
\__kernel_intarray_range_to_clist:Nnn
\g_@@_thread_info_intarray
- { 1 + #1 * (\l_@@_capturing_group_int * 2 + 1) }
- { (1 + #1) * (\l_@@_capturing_group_int * 2 + 1) }
+ { \c_one_int + #1 * (\l_@@_capturing_group_int * 2 + \c_one_int) }
+ { (\c_one_int + #1) * (\l_@@_capturing_group_int * 2 + \c_one_int) }
;
}
% \end{macrocode}
@@ -5471,11 +5465,11 @@
\cs_new_protected:Npn \@@_use_state:
{
\__kernel_intarray_gset:Nnn \g_@@_state_active_intarray
- { \l_@@_curr_state_int } { \l_@@_step_int }
+ \l_@@_curr_state_int \l_@@_step_int
\@@_toks_use:w \l_@@_curr_state_int
\__kernel_intarray_gset:Nnn \g_@@_state_active_intarray
- { \l_@@_curr_state_int }
- { \int_eval:n { \l_@@_step_int + 1 } }
+ \l_@@_curr_state_int
+ { \@@_int_eval:w \l_@@_step_int + \c_one_int \scan_stop: }
}
% \end{macrocode}
% \end{macro}
@@ -5491,7 +5485,7 @@
\int_set:Nn \l_@@_curr_state_int {#1}
\if_int_compare:w
\__kernel_intarray_item:Nn \g_@@_state_active_intarray
- { \l_@@_curr_state_int }
+ \l_@@_curr_state_int
< \l_@@_step_int
\tl_set:Nn \l_@@_curr_submatches_tl { #2 , }
\exp_after:wN \@@_use_state:
@@ -5548,7 +5542,7 @@
{
\if_int_compare:w
\__kernel_intarray_item:Nn \g_@@_state_active_intarray
- { \l_@@_curr_state_int }
+ \l_@@_curr_state_int
#1
\exp_after:wN \@@_use_state:
\fi:
@@ -5571,8 +5565,8 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_action_cost:n #1
{
- \exp_args:Ne \@@_store_state:n
- { \int_eval:n { \l_@@_curr_state_int + #1 } }
+ \exp_args:No \@@_store_state:n
+ { \tex_the:D \@@_int_eval:w \l_@@_curr_state_int + #1 }
}
% \end{macrocode}
% \end{macro}
@@ -5595,8 +5589,8 @@
\g_@@_thread_info_intarray
{
\@@_int_eval:w
- 1 + \l_@@_max_thread_int *
- (\l_@@_capturing_group_int * 2 + 1)
+ \c_one_int + \l_@@_max_thread_int *
+ (\l_@@_capturing_group_int * 2 + \c_one_int)
}
{ #2 , #1 }
}
@@ -5792,11 +5786,11 @@
{
\if_int_compare:w #1 < #2 \exp_stop_f:
\else:
- \exp_after:wN \prg_break:
+ \prg_break:n
\fi:
\@@_toks_use:w #1 \exp_stop_f:
\exp_after:wN \@@_query_range_loop:ww
- \int_value:w \@@_int_eval:w #1 + 1 ; #2 ;
+ \int_value:w \@@_int_eval:w #1 + \c_one_int ; #2 ;
}
% \end{macrocode}
% \end{macro}
@@ -5824,22 +5818,21 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_submatch_balance:n #1
{
- \int_eval:n
- {
- \@@_intarray_item:NnF \g_@@_balance_intarray
- {
- \__kernel_intarray_item:Nn
- \g_@@_submatch_end_intarray {#1}
- }
- { 0 }
- -
- \@@_intarray_item:NnF \g_@@_balance_intarray
- {
- \__kernel_intarray_item:Nn
- \g_@@_submatch_begin_intarray {#1}
- }
- { 0 }
- }
+ \tex_the:D \@@_int_eval:w
+ \@@_intarray_item:NnF \g_@@_balance_intarray
+ {
+ \__kernel_intarray_item:Nn
+ \g_@@_submatch_end_intarray {#1}
+ }
+ \c_zero_int
+ -
+ \@@_intarray_item:NnF \g_@@_balance_intarray
+ {
+ \__kernel_intarray_item:Nn
+ \g_@@_submatch_begin_intarray {#1}
+ }
+ \c_zero_int
+ \scan_stop:
}
% \end{macrocode}
% \end{macro}
@@ -5984,7 +5977,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_replacement_normal:n #1
{
- \int_compare:nNnTF { \l_@@_replacement_csnames_int } > 0
+ \int_compare:nNnTF \l_@@_replacement_csnames_int > \c_zero_int
{ \exp_args:No \@@_replacement_put:n { \token_to_str:N #1 } }
{
\tl_if_empty:NTF \l_@@_replacement_category_tl
@@ -6040,7 +6033,7 @@
{
\cs_if_exist_use:cF { @@_replacement_#1:w }
{
- \if_int_compare:w 1 < 1#1 \exp_stop_f:
+ \if_int_compare:w \c_one_int < 1#1 \exp_stop_f:
\@@_replacement_put_submatch:n {#1}
\else:
\@@_replacement_normal:n {#1}
@@ -6066,16 +6059,16 @@
\@@_replacement_put_submatch_aux:n {#1}
\else:
\msg_expandable_error:nnff { regex } { submatch-too-big }
- {#1} { \int_eval:n { \l_@@_capturing_group_int - 1 } }
+ {#1} { \int_eval:n { \l_@@_capturing_group_int - \c_one_int } }
\fi:
}
\cs_new_protected:Npn \@@_replacement_put_submatch_aux:n #1
{
\tl_build_put_right:Nn \l_@@_build_tl
- { \@@_query_submatch:n { \int_eval:n { #1 + ##1 } } }
+ { \@@_query_submatch:n { \@@_int_eval:w #1 + ##1 \scan_stop: } }
\if_int_compare:w \l_@@_replacement_csnames_int = \c_zero_int
\tl_gput_right:Nn \g_@@_balance_tl
- { + \@@_submatch_balance:n { \int_eval:n { #1 + ##1 } } }
+ { + \@@_submatch_balance:n { \@@_int_eval:w #1 + ##1 \scan_stop: } }
\fi:
}
% \end{macrocode}
@@ -6097,7 +6090,7 @@
{
\token_if_eq_meaning:NNTF #1 \@@_replacement_normal:n
{
- \if_int_compare:w 1 < 1#2 \exp_stop_f:
+ \if_int_compare:w \c_one_int < 1#2 \exp_stop_f:
#2
\exp_after:wN \use_i:nnn
\exp_after:wN \@@_replacement_g_digits:NN
@@ -6232,7 +6225,7 @@
\token_if_eq_meaning:NNTF \prg_do_nothing: #3
{ \msg_error:nn { regex } { replacement-catcode-end } }
{
- \int_compare:nNnTF { \l_@@_replacement_csnames_int } > 0
+ \int_compare:nNnTF \l_@@_replacement_csnames_int > \c_zero_int
{
\msg_error:nnnn
{ regex } { replacement-catcode-in-cs } {#1} {#3}
@@ -6284,7 +6277,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_replacement_char:nNN #1#2#3
{
- \tex_lccode:D 0 = `#3 \scan_stop:
+ \tex_lccode:D \c_zero_int = `#3 \scan_stop:
\tex_lowercase:D { \@@_replacement_put:n {#1} }
}
% \end{macrocode}
@@ -6637,7 +6630,6 @@
\prg_generate_conditional_variant:Nnn #2 { nV } { T , F , TF }
\cs_generate_variant:Nn #3 { NV }
\prg_generate_conditional_variant:Nnn #3 { NV } { T , F , TF }
-
}
\@@_tmp:w \@@_extract_once:nnN
\regex_extract_once:nnN \regex_extract_once:NnN
@@ -6728,12 +6720,12 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{@@_begin, @@_end}
+% \begin{variable}{\l_@@_begin_flag, \l_@@_end_flag}
% Those flags are raised to indicate begin-group or end-group tokens
% that had to be added when extracting submatches.
% \begin{macrocode}
-\flag_new:n { @@_begin }
-\flag_new:n { @@_end }
+\flag_new:N \l_@@_begin_flag
+\flag_new:N \l_@@_end_flag
% \end{macrocode}
% \end{variable}
%
@@ -6819,7 +6811,7 @@
\int_incr:N \l_@@_curr_pos_int
\@@_toks_set:Nn \l_@@_curr_pos_int {#1}
\__kernel_intarray_gset:Nnn \g_@@_balance_intarray
- { \l_@@_curr_pos_int } { \l_@@_balance_int }
+ \l_@@_curr_pos_int \l_@@_balance_int
\if_case:w "#2 \exp_stop_f:
\or: \int_incr:N \l_@@_balance_int
\or: \int_decr:N \l_@@_balance_int
@@ -6946,29 +6938,29 @@
\l_@@_start_pos_int < \l_@@_success_pos_int
\@@_extract:
\__kernel_intarray_gset:Nnn \g_@@_submatch_prev_intarray
- { \l_@@_zeroth_submatch_int } { 0 }
+ \l_@@_zeroth_submatch_int \c_zero_int
\__kernel_intarray_gset:Nnn \g_@@_submatch_end_intarray
- { \l_@@_zeroth_submatch_int }
+ \l_@@_zeroth_submatch_int
{
\__kernel_intarray_item:Nn \g_@@_submatch_begin_intarray
- { \l_@@_zeroth_submatch_int }
+ \l_@@_zeroth_submatch_int
}
\__kernel_intarray_gset:Nnn \g_@@_submatch_begin_intarray
- { \l_@@_zeroth_submatch_int }
- { \l_@@_start_pos_int }
+ \l_@@_zeroth_submatch_int
+ \l_@@_start_pos_int
\fi:
}
#1
\@@_match:n {#2}
\@@_query_set:n {#2}
\__kernel_intarray_gset:Nnn \g_@@_submatch_prev_intarray
- { \l_@@_submatch_int } { 0 }
+ \l_@@_submatch_int \c_zero_int
\__kernel_intarray_gset:Nnn \g_@@_submatch_end_intarray
- { \l_@@_submatch_int }
- { \l_@@_max_pos_int }
+ \l_@@_submatch_int
+ \l_@@_max_pos_int
\__kernel_intarray_gset:Nnn \g_@@_submatch_begin_intarray
- { \l_@@_submatch_int }
- { \l_@@_start_pos_int }
+ \l_@@_submatch_int
+ \l_@@_start_pos_int
\int_incr:N \l_@@_submatch_int
\if_meaning:w \c_true_bool \l_@@_empty_success_bool
\if_int_compare:w \l_@@_start_pos_int = \l_@@_max_pos_int
@@ -6998,24 +6990,24 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_group_end_extract_seq:N #1
{
- \flag_clear:n { @@_begin }
- \flag_clear:n { @@_end }
+ \flag_clear:N \l_@@_begin_flag
+ \flag_clear:N \l_@@_end_flag
\cs_set_eq:NN \@@_tmp:w \scan_stop:
- \__kernel_tl_gset:Ne \g_@@_internal_tl
+ \__kernel_tl_gset:Nx \g_@@_internal_tl
{
- \int_step_function:nnN { \l_@@_min_submatch_int }
- { \l_@@_submatch_int - 1 } \@@_extract_seq_aux:n
+ \int_step_function:nnN \l_@@_min_submatch_int
+ { \l_@@_submatch_int - \c_one_int } \@@_extract_seq_aux:n
\@@_tmp:w
}
\int_set:Nn \l_@@_added_begin_int
- { \flag_height:n { @@_begin } }
+ { \flag_height:N \l_@@_begin_flag }
\int_set:Nn \l_@@_added_end_int
- { \flag_height:n { @@_end } }
+ { \flag_height:N \l_@@_end_flag }
\tex_afterassignment:D \@@_extract_check:w
- \__kernel_tl_gset:Ne \g_@@_internal_tl
+ \__kernel_tl_gset:Nx \g_@@_internal_tl
{ \g_@@_internal_tl \if_false: { \fi: } }
\int_compare:nNnT
- { \l_@@_added_begin_int + \l_@@_added_end_int } > 0
+ { \l_@@_added_begin_int + \l_@@_added_end_int } > \c_zero_int
{
\msg_error:nneee { regex } { result-unbalanced }
{ splitting~or~extracting~submatches }
@@ -7063,7 +7055,7 @@
\if_int_compare:w #1 < \c_zero_int
\prg_replicate:nn {-#1}
{
- \flag_raise:n { @@_begin }
+ \flag_raise:N \l_@@_begin_flag
\exp_not:n { { \if_false: } \fi: }
}
\fi:
@@ -7071,7 +7063,7 @@
\if_int_compare:w #1 > \c_zero_int
\prg_replicate:nn {#1}
{
- \flag_raise:n { @@_end }
+ \flag_raise:N \l_@@_end_flag
\exp_not:n { \if_false: { \fi: } }
}
\fi:
@@ -7087,17 +7079,17 @@
% In \cs{@@_group_end_extract_seq:N} we had to expand
% \cs{g_@@_internal_tl} to turn \cs{if_false:} constructions into
% actual begin-group and end-group tokens. This is done with a
-% \cs{__kernel_tl_gset:Ne} assignment, and \cs{@@_extract_check:w} is
+% \cs{__kernel_tl_gset:Nx} assignment, and \cs{@@_extract_check:w} is
% run immediately after this assignment ends, thanks to the
% \tn{afterassignment} primitive. If all of the items were properly
% balanced (enough begin-group tokens before end-group tokens, so |}{|
% is not) then \cs{@@_extract_check:w} is called just before the
-% closing brace of the \cs{__kernel_tl_gset:Ne} (thanks to our sneaky
+% closing brace of the \cs{__kernel_tl_gset:Nx} (thanks to our sneaky
% \cs{if_false:} |{| \cs{fi:} |}| construction), and finds that there
% is nothing left to expand. If any of the items is unbalanced, the
% assignment gets ended early by an extra end-group token, and our
% check finds more tokens needing to be expanded in a new
-% \cs{__kernel_tl_gset:Ne} assignment. We need to add a begin-group
+% \cs{__kernel_tl_gset:Nx} assignment. We need to add a begin-group
% and an end-group tokens to the unbalanced item, namely to the last
% item found so far, which we reach through a loop.
% \begin{macrocode}
@@ -7113,7 +7105,7 @@
\int_incr:N \l_@@_added_begin_int
\int_incr:N \l_@@_added_end_int
\tex_afterassignment:D \@@_extract_check:w
- \__kernel_tl_gset:Ne \g_@@_internal_tl
+ \__kernel_tl_gset:Nx \g_@@_internal_tl
{
\exp_after:wN \@@_extract_check_loop:w
\g_@@_internal_tl
@@ -7169,15 +7161,15 @@
\prg_replicate:nn \l_@@_capturing_group_int
{
\__kernel_intarray_gset:Nnn \g_@@_submatch_prev_intarray
- { \l_@@_submatch_int } { 0 }
+ \l_@@_submatch_int \c_zero_int
\__kernel_intarray_gset:Nnn \g_@@_submatch_case_intarray
- { \l_@@_submatch_int } { 0 }
+ \l_@@_submatch_int \c_zero_int
\int_incr:N \l_@@_submatch_int
}
\__kernel_intarray_gset:Nnn \g_@@_submatch_prev_intarray
- { \l_@@_zeroth_submatch_int } { \l_@@_start_pos_int }
+ \l_@@_zeroth_submatch_int \l_@@_start_pos_int
\__kernel_intarray_gset:Nnn \g_@@_submatch_case_intarray
- { \l_@@_zeroth_submatch_int } { \g_@@_case_int }
+ \l_@@_zeroth_submatch_int \g_@@_case_int
\int_zero:N \l_@@_internal_a_int
\exp_after:wN \@@_extract_aux:w \l_@@_success_submatches_tl
\prg_break_point: \@@_use_none_delimit_by_q_recursion_stop:w ,
@@ -7192,7 +7184,12 @@
{ \@@_int_eval:w \l_@@_zeroth_submatch_int + \l_@@_internal_a_int } {#1}
\else:
\__kernel_intarray_gset:Nnn \g_@@_submatch_end_intarray
- { \@@_int_eval:w \l_@@_zeroth_submatch_int + \l_@@_internal_a_int - \l_@@_capturing_group_int } {#1}
+ {
+ \@@_int_eval:w
+ \l_@@_zeroth_submatch_int + \l_@@_internal_a_int
+ - \l_@@_capturing_group_int
+ }
+ {#1}
\fi:
\int_incr:N \l_@@_internal_a_int
\@@_extract_aux:w
@@ -7230,20 +7227,16 @@
\exp_args:No \@@_query_set:n {#3}
#2
\int_set:Nn \l_@@_balance_int
+ { \@@_replacement_balance_one_match:n \l_@@_zeroth_submatch_int }
+ \__kernel_tl_set:Nx \l_@@_internal_a_tl
{
- \@@_replacement_balance_one_match:n
- { \l_@@_zeroth_submatch_int }
- }
- \__kernel_tl_set:Ne \l_@@_internal_a_tl
- {
- \@@_replacement_do_one_match:n
- { \l_@@_zeroth_submatch_int }
+ \@@_replacement_do_one_match:n \l_@@_zeroth_submatch_int
\@@_query_range:nn
{
\__kernel_intarray_item:Nn \g_@@_submatch_end_intarray
- { \l_@@_zeroth_submatch_int }
+ \l_@@_zeroth_submatch_int
}
- { \l_@@_max_pos_int }
+ \l_@@_max_pos_int
}
\@@_group_end_replace:N #3
}
@@ -7276,19 +7269,19 @@
#2
\int_set:Nn \l_@@_balance_int
{
- 0
+ \c_zero_int
\int_step_function:nnnN
- { \l_@@_min_submatch_int }
+ \l_@@_min_submatch_int
\l_@@_capturing_group_int
- { \l_@@_submatch_int - 1 }
+ { \l_@@_submatch_int - \c_one_int }
\@@_replacement_balance_one_match:n
}
- \__kernel_tl_set:Ne \l_@@_internal_a_tl
+ \__kernel_tl_set:Nx \l_@@_internal_a_tl
{
\int_step_function:nnnN
- { \l_@@_min_submatch_int }
+ \l_@@_min_submatch_int
\l_@@_capturing_group_int
- { \l_@@_submatch_int - 1 }
+ { \l_@@_submatch_int - \c_one_int }
\@@_replacement_do_one_match:n
\@@_query_range:nn
\l_@@_start_pos_int \l_@@_max_pos_int
@@ -7321,11 +7314,12 @@
\cs_new_protected:Npn \@@_group_end_replace:N #1
{
\int_set:Nn \l_@@_added_begin_int
- { \int_max:nn { - \l_@@_balance_int } { 0 } }
+ { \int_max:nn { - \l_@@_balance_int } \c_zero_int }
\int_set:Nn \l_@@_added_end_int
- { \int_max:nn { \l_@@_balance_int } { 0 } }
+ { \int_max:nn \l_@@_balance_int \c_zero_int }
\@@_group_end_replace_try:
- \int_compare:nNnT { \l_@@_added_begin_int + \l_@@_added_end_int } > 0
+ \int_compare:nNnT { \l_@@_added_begin_int + \l_@@_added_end_int }
+ > \c_zero_int
{
\msg_error:nneee { regex } { result-unbalanced }
{ replacing } { \int_use:N \l_@@_added_begin_int }
@@ -7337,11 +7331,11 @@
\cs_new_protected:Npn \@@_group_end_replace_try:
{
\tex_afterassignment:D \@@_group_end_replace_check:w
- \__kernel_tl_gset:Ne \g_@@_internal_tl
+ \__kernel_tl_gset:Nx \g_@@_internal_tl
{
- \prg_replicate:nn { \l_@@_added_begin_int } { { \if_false: } \fi: }
+ \prg_replicate:nn \l_@@_added_begin_int { { \if_false: } \fi: }
\l_@@_internal_a_tl
- \prg_replicate:nn { \l_@@_added_end_int } { \if_false: { \fi: } }
+ \prg_replicate:nn \l_@@_added_end_int { \if_false: { \fi: } }
\if_false: { \fi: }
}
}
@@ -7618,14 +7612,13 @@
\use:e
{
\exp_not:n { \exp_after:wN \l_@@_peek_true_tl \exp:w }
- \@@_replacement_do_one_match:n
- { \l_@@_zeroth_submatch_int }
+ \@@_replacement_do_one_match:n \l_@@_zeroth_submatch_int
\@@_query_range:nn
{
\__kernel_intarray_item:Nn \g_@@_submatch_end_intarray
- { \l_@@_zeroth_submatch_int }
+ \l_@@_zeroth_submatch_int
}
- { \l_@@_max_pos_int }
+ \l_@@_max_pos_int
\exp_end:
}
}
@@ -7708,10 +7701,14 @@
{
\if_case:w \l_@@_replacement_csnames_int
\tl_build_put_right:Nn \l_@@_build_tl
- { \@@_query_submatch:n { \int_eval:n { #1 + ##1 } } }
+ { \@@_query_submatch:n { \@@_int_eval:w #1 + ##1 \scan_stop: } }
\else:
\tl_build_put_right:Nn \l_@@_build_tl
- { \exp:w \@@_query_submatch:n { \int_eval:n { #1 + ##1 } } \exp_end: }
+ {
+ \exp:w
+ \@@_query_submatch:n { \@@_int_eval:w #1 + ##1 \scan_stop: }
+ \exp_end:
+ }
\fi:
}
% \end{macrocode}
@@ -8141,7 +8138,7 @@
{
\int_step_inline:nnn
\l_@@_min_state_int
- { \l_@@_max_state_int - 1 }
+ { \l_@@_max_state_int - \c_one_int }
{
\@@_trace:nne { regex } {#1}
{ \iow_char:N \\toks ##1 = { \@@_toks_use:w ##1 } }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
index debdd813974..45e5028d1b2 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -173,6 +173,22 @@
% See also \cs{seq_set_split:Nnn}, which removes spaces around the delimiters.
% \end{function}
%
+% \begin{function}[added = 2012-06-15]
+% {\seq_set_filter:NNn, \seq_gset_filter:NNn}
+% \begin{syntax}
+% \cs{seq_set_filter:NNn} \meta{seq~var_1} \meta{seq~var_2} \Arg{inline boolexpr}
+% \end{syntax}
+% Evaluates the \meta{inline boolexpr} for every \meta{item} stored
+% within the \meta{seq~var_2}. The \meta{inline boolexpr}
+% receives the \meta{item} as |#1|. The sequence of all \meta{items}
+% for which the \meta{inline boolexpr} evaluated to \texttt{true}
+% is assigned to \meta{seq~var_1}.
+% \begin{texnote}
+% Contrarily to other mapping functions, \cs{seq_map_break:} cannot
+% be used in this function, and would lead to low-level \TeX{} errors.
+% \end{texnote}
+% \end{function}
+%
% \begin{function}
% {\seq_concat:NNN, \seq_concat:ccc, \seq_gconcat:NNN, \seq_gconcat:ccc}
% \begin{syntax}
@@ -635,8 +651,8 @@
% \begin{syntax}
% \cs{seq_map_indexed_function:NN} \meta{seq~var} \meta{function}
% \end{syntax}
-% Applies \meta{function} to every entry in the \meta{sequence
-% variable}. The \meta{function} should have signature |:nn|. It
+% Applies \meta{function} to every entry in the \meta{seq~var}.
+% The \meta{function} should have signature |:nn|. It
% receives two arguments for each iteration: the \meta{index} (namely
% |1| for the first entry, then |2| and so on) and the \meta{item}.
% \end{function}
@@ -645,8 +661,8 @@
% \begin{syntax}
% \cs{seq_map_indexed_inline:Nn} \meta{seq~var} \Arg{inline function}
% \end{syntax}
-% Applies \meta{inline function} to every entry in the \meta{sequence
-% variable}. The \meta{inline function} should consist of code which
+% Applies \meta{inline function} to every entry in the \meta{seq~var}.
+% The \meta{inline function} should consist of code which
% receives the \meta{index} (namely |1| for the first entry, then |2|
% and so on) as~|#1| and the \meta{item} as~|#2|.
% \end{function}
@@ -933,8 +949,8 @@
% items in the sequence representing the set.
%
% Sets should not contain several occurrences of a given item. To make
-% sure that a \meta{sequence variable} only has distinct items, use
-% \cs{seq_remove_duplicates:N} \meta{sequence variable}. This function
+% sure that a \meta{seq~var} only has distinct items, use
+% \cs{seq_remove_duplicates:N} \meta{seq~var}. This function
% is relatively slow, and to avoid performance issues one should only
% use it when necessary.
%
@@ -1238,22 +1254,22 @@
% \begin{macrocode}
\cs_new_protected:Npn \seq_set_from_clist:NN #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \s_@@ \clist_map_function:NN #2 \@@_wrap_item:n }
}
\cs_new_protected:Npn \seq_set_from_clist:Nn #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \s_@@ \clist_map_function:nN {#2} \@@_wrap_item:n }
}
\cs_new_protected:Npn \seq_gset_from_clist:NN #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \s_@@ \clist_map_function:NN #2 \@@_wrap_item:n }
}
\cs_new_protected:Npn \seq_gset_from_clist:Nn #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \s_@@ \clist_map_function:nN {#2} \@@_wrap_item:n }
}
\cs_generate_variant:Nn \seq_set_from_clist:NN { Nc }
@@ -1322,13 +1338,13 @@
% braces which are outermost after space trimming.
% \begin{macrocode}
\cs_new_protected:Npn \seq_set_split:Nnn
- { \@@_set_split:NNNnn \__kernel_tl_set:Ne \tl_trim_spaces:n }
+ { \@@_set_split:NNNnn \__kernel_tl_set:Nx \tl_trim_spaces:n }
\cs_new_protected:Npn \seq_gset_split:Nnn
- { \@@_set_split:NNNnn \__kernel_tl_gset:Ne \tl_trim_spaces:n }
+ { \@@_set_split:NNNnn \__kernel_tl_gset:Nx \tl_trim_spaces:n }
\cs_new_protected:Npn \seq_set_split_keep_spaces:Nnn
- { \@@_set_split:NNNnn \__kernel_tl_set:Ne \exp_not:n }
+ { \@@_set_split:NNNnn \__kernel_tl_set:Nx \exp_not:n }
\cs_new_protected:Npn \seq_gset_split_keep_spaces:Nnn
- { \@@_set_split:NNNnn \__kernel_tl_gset:Ne \exp_not:n }
+ { \@@_set_split:NNNnn \__kernel_tl_gset:Nx \exp_not:n }
\cs_new_protected:Npn \@@_set_split:NNNnn #1#2#3#4#5
{
\tl_if_empty:nTF {#4}
@@ -1348,7 +1364,7 @@
\@@_set_split_end:
\@@_set_split:Nw #2 \prg_do_nothing:
}
- \__kernel_tl_set:Ne \l_@@_internal_a_tl { \l_@@_internal_a_tl }
+ \__kernel_tl_set:Nx \l_@@_internal_a_tl { \l_@@_internal_a_tl }
}
#1 #3 { \s_@@ \l_@@_internal_a_tl }
}
@@ -1372,6 +1388,30 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\seq_set_filter:NNn, \seq_gset_filter:NNn}
+% \begin{macro}{\@@_set_filter:NNNn}
+% Similar to \cs{seq_map_inline:Nn}, without a
+% \cs{prg_break_point:} because the user's code
+% is performed within the evaluation of a boolean expression,
+% and skipping out of that would break horribly.
+% The \cs{@@_wrap_item:n} function inserts the relevant
+% \cs{@@_item:n} without expansion in the input stream,
+% hence in the \texttt{e}-expanding assignment.
+% \begin{macrocode}
+\cs_new_protected:Npn \seq_set_filter:NNn
+ { \@@_set_filter:NNNn \__kernel_tl_set:Nx }
+\cs_new_protected:Npn \seq_gset_filter:NNn
+ { \@@_set_filter:NNNn \__kernel_tl_gset:Nx }
+\cs_new_protected:Npn \@@_set_filter:NNNn #1#2#3#4
+ {
+ \@@_push_item_def:n { \bool_if:nT {#4} { \@@_wrap_item:n {##1} } }
+ #1 #2 { #3 }
+ \@@_pop_item_def:
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{\seq_concat:NNN, \seq_concat:ccc}
% \UnitTested
% \begin{macro}{\seq_gconcat:NNN, \seq_gconcat:ccc}
@@ -1422,7 +1462,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \seq_put_left:Nn #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{
\exp_not:n { \s_@@ \@@_item:n {#2} }
\exp_not:f { \exp_after:wN \@@_put_left_aux:w #1 }
@@ -1430,7 +1470,7 @@
}
\cs_new_protected:Npn \seq_gput_left:Nn #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{
\exp_not:n { \s_@@ \@@_item:n {#2} }
\exp_not:f { \exp_after:wN \@@_put_left_aux:w #1 }
@@ -1553,9 +1593,9 @@
% \texttt{e}-type expansion (|#1 #2 {#2}|) ensures that nothing is lost.
% \begin{macrocode}
\cs_new_protected:Npn \seq_remove_all:Nn
- { \@@_remove_all_aux:NNn \__kernel_tl_set:Ne }
+ { \@@_remove_all_aux:NNn \__kernel_tl_set:Nx }
\cs_new_protected:Npn \seq_gremove_all:Nn
- { \@@_remove_all_aux:NNn \__kernel_tl_gset:Ne }
+ { \@@_remove_all_aux:NNn \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \@@_remove_all_aux:NNn #1#2#3
{
\@@_push_item_def:n
@@ -1599,15 +1639,15 @@
% last argument \cs{use_ii:nn} vs \cs{use_i:nn}.
% \begin{macrocode}
\cs_new_protected:Npn \seq_set_item:Nnn #1#2#3
- { \@@_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_set:Ne \use_i:nn }
+ { \@@_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_set:Nx \use_i:nn }
\cs_new_protected:Npn \seq_gset_item:Nnn #1#2#3
- { \@@_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_gset:Ne \use_i:nn }
+ { \@@_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_gset:Nx \use_i:nn }
\cs_generate_variant:Nn \seq_set_item:Nnn { c }
\cs_generate_variant:Nn \seq_gset_item:Nnn { c }
\prg_new_protected_conditional:Npnn \seq_set_item:Nnn #1#2#3 { TF , T , F }
- { \@@_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_set:Ne \use_ii:nn }
+ { \@@_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_set:Nx \use_ii:nn }
\prg_new_protected_conditional:Npnn \seq_gset_item:Nnn #1#2#3 { TF , T , F }
- { \@@_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_gset:Ne \use_ii:nn }
+ { \@@_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_gset:Nx \use_ii:nn }
\prg_generate_conditional_variant:Nnn \seq_set_item:Nnn { c } { TF , T , F }
\prg_generate_conditional_variant:Nnn \seq_gset_item:Nnn { c } { TF , T , F }
% \end{macrocode}
@@ -1729,9 +1769,9 @@
% from the stack, and the memory consumption becomes linear.
% \begin{macrocode}
\cs_new_protected:Npn \seq_reverse:N
- { \@@_reverse:NN \__kernel_tl_set:Ne }
+ { \@@_reverse:NN \__kernel_tl_set:Nx }
\cs_new_protected:Npn \seq_greverse:N
- { \@@_reverse:NN \__kernel_tl_gset:Ne }
+ { \@@_reverse:NN \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \@@_reverse:NN #1 #2
{
\cs_set_eq:NN \@@_tmp:w \@@_item:n
@@ -1912,7 +1952,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \seq_get_left:NN #1#2
{
- \__kernel_tl_set:Ne #2
+ \__kernel_tl_set:Nx #2
{
\exp_after:wN \@@_get_left:wnw
#1 \@@_item:n { \q_no_value } \s_@@_stop
@@ -1964,7 +2004,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \seq_get_right:NN #1#2
{
- \__kernel_tl_set:Ne #2
+ \__kernel_tl_set:Nx #2
{
\exp_after:wN \use_i_ii:nnn
\exp_after:wN \@@_get_right_loop:nw
@@ -2005,9 +2045,9 @@
% finally stops the loop.
% \begin{macrocode}
\cs_new_protected:Npn \seq_pop_right:NN
- { \@@_pop:NNNN \@@_pop_right:NNN \__kernel_tl_set:Ne }
+ { \@@_pop:NNNN \@@_pop_right:NNN \__kernel_tl_set:Nx }
\cs_new_protected:Npn \seq_gpop_right:NN
- { \@@_pop:NNNN \@@_pop_right:NNN \__kernel_tl_gset:Ne }
+ { \@@_pop:NNNN \@@_pop_right:NNN \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \@@_pop_right:NNN #1#2#3
{
\cs_set_eq:NN \@@_tmp:w \@@_item:n
@@ -2019,7 +2059,7 @@
#2
{
\if_false: { \fi: }
- \__kernel_tl_set:Ne #3
+ \__kernel_tl_set:Nx #3
}
{ } \use_none:nn
\cs_set_eq:NN \@@_item:n \@@_tmp:w
@@ -2067,10 +2107,10 @@
{ \@@_pop_TF:NNNN \@@_pop_left:NNN \tl_gset:Nn #1 #2 }
\prg_new_protected_conditional:Npnn \seq_pop_right:NN #1#2
{ T , F , TF }
- { \@@_pop_TF:NNNN \@@_pop_right:NNN \__kernel_tl_set:Ne #1 #2 }
+ { \@@_pop_TF:NNNN \@@_pop_right:NNN \__kernel_tl_set:Nx #1 #2 }
\prg_new_protected_conditional:Npnn \seq_gpop_right:NN #1#2
{ T , F , TF }
- { \@@_pop_TF:NNNN \@@_pop_right:NNN \__kernel_tl_gset:Ne #1 #2 }
+ { \@@_pop_TF:NNNN \@@_pop_right:NNN \__kernel_tl_gset:Nx #1 #2 }
\prg_generate_conditional_variant:Nnn \seq_pop_left:NN { c }
{ T , F , TF }
\prg_generate_conditional_variant:Nnn \seq_gpop_left:NN { c }
@@ -2396,9 +2436,9 @@
% semantics.
% \begin{macrocode}
\cs_new_protected:Npn \seq_set_map_e:NNn
- { \@@_set_map_e:NNNn \__kernel_tl_set:Ne }
+ { \@@_set_map_e:NNNn \__kernel_tl_set:Nx }
\cs_new_protected:Npn \seq_gset_map_e:NNn
- { \@@_set_map_e:NNNn \__kernel_tl_gset:Ne }
+ { \@@_set_map_e:NNNn \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \@@_set_map_e:NNNn #1#2#3#4
{
\@@_push_item_def:n { \exp_not:N \@@_item:n {#4} }
@@ -2415,9 +2455,9 @@
% <inline function>.
% \begin{macrocode}
\cs_new_protected:Npn \seq_set_map:NNn
- { \@@_set_map:NNNn \__kernel_tl_set:Ne }
+ { \@@_set_map:NNNn \__kernel_tl_set:Nx }
\cs_new_protected:Npn \seq_gset_map:NNn
- { \@@_set_map:NNNn \__kernel_tl_gset:Ne }
+ { \@@_set_map:NNNn \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \@@_set_map:NNNn #1#2#3#4
{
\@@_push_item_def:n { \exp_not:n { \@@_item:n {#4} } }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
index 226debac9d7..319cf75b6e4 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx b/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx
index 71d28c44332..a85bb213b2e 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -376,7 +376,7 @@
{
\group_begin:
\@@_main:NNNn \tl_map_inline:Nn \tl_map_break:n #2 {#3}
- \__kernel_tl_gset:Ne \g_@@_internal_tl
+ \__kernel_tl_gset:Nx \g_@@_internal_tl
{ \@@_tl_toks:w \l_@@_min_int ; }
\group_end:
#1 #2 \g_@@_internal_tl
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3str-convert.dtx b/Master/texmf-dist/source/latex/l3kernel/l3str-convert.dtx
index 90eb26afbbc..39b6a43d283 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3str-convert.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3str-convert.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -343,13 +343,13 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{@@_byte, @@_error}
+% \begin{variable}{\l_@@_byte_flag, \l_@@_error_flag}
% Conversions from one \meta{encoding}/\meta{escaping} pair to another
% are done within \texttt{e}-expanding assignments. Errors are
% signalled by raising the relevant flag.
% \begin{macrocode}
-\flag_new:n { @@_byte }
-\flag_new:n { @@_error }
+\flag_new:N \l_@@_byte_flag
+\flag_new:N \l_@@_error_flag
% \end{macrocode}
% \end{variable}
%
@@ -468,7 +468,7 @@
% an empty result for the input $-1$.
% \begin{macrocode}
\group_begin:
- \__kernel_tl_set:Ne \l_@@_internal_tl { \tl_to_str:n { 0123456789ABCDEF } }
+ \__kernel_tl_set:Nx \l_@@_internal_tl { \tl_to_str:n { 0123456789ABCDEF } }
\tl_map_inline:Nn \l_@@_internal_tl
{
\tl_map_inline:Nn \l_@@_internal_tl
@@ -554,7 +554,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_convert_gmap:N #1
{
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{
\exp_after:wN \@@_convert_gmap_loop:NN
\exp_after:wN #1
@@ -579,7 +579,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_convert_gmap_internal:N #1
{
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{
\exp_after:wN \@@_convert_gmap_internal_loop:Nww
\exp_after:wN #1
@@ -599,8 +599,8 @@
%
% \subsubsection{Error-reporting during conversion}
%
-% \begin{macro}{\@@_if_flag_error:nne}
-% \begin{macro}{\@@_if_flag_no_error:nne}
+% \begin{macro}{\@@_if_flag_error:Nne}
+% \begin{macro}{\@@_if_flag_no_error:Nne}
% When converting using the function \cs{str_set_convert:Nnnn}, errors
% should be reported to the user after each step in the
% conversion. Errors are signalled by raising some flag (typically
@@ -608,30 +608,30 @@
% give the user an error, otherwise remove the arguments. On the other
% hand, in the conditional functions \cs{str_set_convert:NnnnTF},
% errors should be suppressed. This is done by changing
-% \cs{@@_if_flag_error:nne} into \cs{@@_if_flag_no_error:nne}
+% \cs{@@_if_flag_error:Nne} into \cs{@@_if_flag_no_error:Nne}
% locally.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_if_flag_error:nne #1
+\cs_new_protected:Npn \@@_if_flag_error:Nne #1
{
- \flag_if_raised:nTF {#1}
+ \flag_if_raised:NTF #1
{ \msg_error:nne { str } }
{ \use_none:nn }
}
-\cs_new_protected:Npn \@@_if_flag_no_error:nne #1#2#3
- { \flag_if_raised:nT {#1} { \bool_gset_true:N \g_@@_error_bool } }
+\cs_new_protected:Npn \@@_if_flag_no_error:Nne #1#2#3
+ { \flag_if_raised:NT #1 { \bool_gset_true:N \g_@@_error_bool } }
% \end{macrocode}
% \end{macro}
% \end{macro}
%
-% \begin{macro}[rEXP]{\@@_if_flag_times:nT}
+% \begin{macro}[rEXP]{\@@_if_flag_times:NT}
% At the end of each conversion step, we raise all relevant errors as
% one error message, built on the fly. The height of each flag
% indicates how many times a given error was encountered. This
% function prints |#2| followed by the number of occurrences of an
% error if it occurred, nothing otherwise.
% \begin{macrocode}
-\cs_new:Npn \@@_if_flag_times:nT #1#2
- { \flag_if_raised:nT {#1} { #2~(x \flag_height:n {#1} ) } }
+\cs_new:Npn \@@_if_flag_times:NT #1#2
+ { \flag_if_raised:NT #1 { #2~(x \flag_height:N #1 ) } }
% \end{macrocode}
% \end{macro}
%
@@ -675,7 +675,7 @@
% unescape and decode; encode and escape; exit the group and store the
% result in the user's variable. The various conversion functions all
% act on \cs{g_@@_result_tl}. Errors are silenced for the conditional
-% functions by redefining \cs{@@_if_flag_error:nne} locally.
+% functions by redefining \cs{@@_if_flag_error:Nne} locally.
% \begin{macrocode}
\cs_new_protected:Npn \str_set_convert:Nnnn
{ \@@_convert:nNNnnn { } \tl_set_eq:NN }
@@ -686,7 +686,7 @@
{
\bool_gset_false:N \g_@@_error_bool
\@@_convert:nNNnnn
- { \cs_set_eq:NN \@@_if_flag_error:nne \@@_if_flag_no_error:nne }
+ { \cs_set_eq:NN \@@_if_flag_error:Nne \@@_if_flag_no_error:Nne }
\tl_set_eq:NN #1 {#2} {#3} {#4}
\bool_if:NTF \g_@@_error_bool \prg_return_false: \prg_return_true:
}
@@ -695,7 +695,7 @@
{
\bool_gset_false:N \g_@@_error_bool
\@@_convert:nNNnnn
- { \cs_set_eq:NN \@@_if_flag_error:nne \@@_if_flag_no_error:nne }
+ { \cs_set_eq:NN \@@_if_flag_error:Nne \@@_if_flag_no_error:Nne }
\tl_gset_eq:NN #1 {#2} {#3} {#4}
\bool_if:NTF \g_@@_error_bool \prg_return_false: \prg_return_true:
}
@@ -703,7 +703,7 @@
{
\group_begin:
#1
- \__kernel_tl_gset:Ne \g_@@_result_tl { \__kernel_str_to_other_fast:n {#4} }
+ \__kernel_tl_gset:Nx \g_@@_result_tl { \__kernel_str_to_other_fast:n {#4} }
\exp_after:wN \@@_convert:wwwnn
\tl_to_str:n {#5} /// \s_@@_stop
{ decode } { unescape }
@@ -714,7 +714,7 @@
{ encode } { escape }
\use_ii_i:nn
\@@_convert_encode_:
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{ \tl_to_str:V \g_@@_result_tl }
\group_end:
#2 #3 \g_@@_result_tl
@@ -893,7 +893,7 @@
% \begin{macro}[rEXP]{\@@_filter_bytes_aux:N}
% In the case of 8-bit engines, every character is a byte. For
% Unicode-aware engines, test the character code; non-bytes cause us
-% to raise the flag \texttt{@@_byte}. Spaces have already been given
+% to raise the flag \cs{l_@@_byte_flag}. Spaces have already been given
% the correct category code when this function is called.
% \begin{macrocode}
\bool_lazy_any:nTF
@@ -914,7 +914,7 @@
\if_int_compare:w `#1 < 256 \exp_stop_f:
#1
\else:
- \flag_raise:n { @@_byte }
+ \flag_raise:N \l_@@_byte_flag
\fi:
\@@_filter_bytes_aux:N
}
@@ -937,10 +937,10 @@
{
\cs_new_protected:Npn \@@_convert_unescape_:
{
- \flag_clear:n { @@_byte }
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \flag_clear:N \l_@@_byte_flag
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{ \exp_args:No \@@_filter_bytes:n \g_@@_result_tl }
- \@@_if_flag_error:nne { @@_byte } { non-byte } { bytes }
+ \@@_if_flag_error:Nne \l_@@_byte_flag { non-byte } { bytes }
}
}
{ \cs_new_protected:Npn \@@_convert_unescape_: { } }
@@ -997,15 +997,15 @@
{
\cs_new_protected:Npn \@@_convert_encode_:
{
- \flag_clear:n { @@_error }
+ \flag_clear:N \l_@@_error_flag
\@@_convert_gmap_internal:N \@@_encode_native_char:n
- \@@_if_flag_error:nne { @@_error }
+ \@@_if_flag_error:Nne \l_@@_error_flag
{ native-overflow } { }
}
\cs_new:Npn \@@_encode_native_char:n #1
{
\if_int_compare:w #1 > \c_@@_max_byte_int
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_error_flag
?
\else:
\char_generate:nn {#1} {12}
@@ -1034,7 +1034,7 @@
\cs_new_protected:Npn \@@_convert_decode_clist:
{
\clist_gset:No \g_@@_result_tl \g_@@_result_tl
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{
\exp_args:No \clist_map_function:nN
\g_@@_result_tl \@@_decode_clist_char:n
@@ -1057,7 +1057,7 @@
\cs_new_protected:Npn \@@_convert_encode_clist:
{
\@@_convert_gmap_internal:N \@@_encode_clist_char:n
- \__kernel_tl_gset:Ne \g_@@_result_tl { \tl_tail:N \g_@@_result_tl }
+ \__kernel_tl_gset:Nx \g_@@_result_tl { \tl_tail:N \g_@@_result_tl }
}
\cs_new:Npn \@@_encode_clist_char:n #1 { , #1 }
% \end{macrocode}
@@ -1186,9 +1186,9 @@
\exp_not:N \@@_decode_eight_bit_aux:Nn
\exp_not:c { g_@@_decode_#1_intarray }
}
- \flag_clear:n { @@_error }
+ \flag_clear:N \l_@@_error_flag
\@@_convert_gmap:N \@@_tmp:w
- \@@_if_flag_error:nne { @@_error } { decode-8-bit } {#1}
+ \@@_if_flag_error:Nne \l_@@_error_flag { decode-8-bit } {#1}
}
\cs_new:Npn \@@_decode_eight_bit_aux:Nn #1#2
{
@@ -1200,7 +1200,7 @@
\cs_new:Npn \@@_decode_eight_bit_aux:n #1
{
\if_int_compare:w #1 < \c_zero_int
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_error_flag
\int_value:w \c_@@_replacement_char_int
\else:
#1
@@ -1230,9 +1230,9 @@
\exp_not:c { g_@@_encode_#1_intarray }
\exp_not:c { g_@@_decode_#1_intarray }
}
- \flag_clear:n { @@_error }
+ \flag_clear:N \l_@@_error_flag
\@@_convert_gmap_internal:N \@@_tmp:w
- \@@_if_flag_error:nne { @@_error } { encode-8-bit } {#1}
+ \@@_if_flag_error:Nne \l_@@_error_flag { encode-8-bit } {#1}
}
\cs_new:Npn \@@_encode_eight_bit_aux:NNn #1#2#3
{
@@ -1248,7 +1248,7 @@
{
\int_compare:nNnTF { \intarray_item:Nn #3 { 1 + #1 } } = {#2}
{ \@@_output_byte:n {#1} }
- { \flag_raise:n { @@_error } }
+ { \flag_raise:N \l_@@_error_flag }
}
% \end{macrocode}
% \end{macro}
@@ -1349,9 +1349,9 @@
\cs_new_protected:Npn \@@_convert_unescape_hex:
{
\group_begin:
- \flag_clear:n { @@_error }
+ \flag_clear:N \l_@@_error_flag
\int_set:Nn \tex_escapechar:D { 92 }
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{
\@@_output_byte:w "
\exp_last_unbraced:Nf \@@_unescape_hex_auxi:N
@@ -1360,7 +1360,7 @@
\prg_break_point:
\@@_output_end:
}
- \@@_if_flag_error:nne { @@_error } { unescape-hex } { }
+ \@@_if_flag_error:Nne \l_@@_error_flag { unescape-hex } { }
\group_end:
}
\cs_new:Npn \@@_unescape_hex_auxi:N #1
@@ -1369,7 +1369,7 @@
\@@_hexadecimal_use:NTF #1
{ \@@_unescape_hex_auxii:N }
{
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_error_flag
\@@_unescape_hex_auxi:N
}
}
@@ -1382,7 +1382,7 @@
\@@_output_byte:w " \@@_unescape_hex_auxi:N
}
{
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_error_flag
\@@_unescape_hex_auxii:N
}
}
@@ -1427,17 +1427,17 @@
\cs_new_protected:cpn { @@_convert_unescape_#2: }
{
\group_begin:
- \flag_clear:n { @@_byte }
- \flag_clear:n { @@_error }
+ \flag_clear:N \l_@@_byte_flag
+ \flag_clear:N \l_@@_error_flag
\int_set:Nn \tex_escapechar:D { 92 }
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{
\exp_after:wN #3 \g_@@_result_tl
#1 ? { ? \prg_break: }
\prg_break_point:
}
- \@@_if_flag_error:nne { @@_byte } { non-byte } { #2 }
- \@@_if_flag_error:nne { @@_error } { unescape-#2 } { }
+ \@@_if_flag_error:Nne \l_@@_byte_flag { non-byte } { #2 }
+ \@@_if_flag_error:Nne \l_@@_error_flag { unescape-#2 } { }
\group_end:
}
\cs_new:Npn #3 ##1#1##2##3
@@ -1450,12 +1450,12 @@
\@@_hexadecimal_use:NTF ##3
{ }
{
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_error_flag
* 0 + `#1 \use_i:nn
}
}
{
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_error_flag
0 + `#1 \use_i:nn
}
\@@_output_end:
@@ -1513,23 +1513,23 @@
\cs_new_protected:Npn \@@_convert_unescape_string:
{
\group_begin:
- \flag_clear:n { @@_byte }
- \flag_clear:n { @@_error }
+ \flag_clear:N \l_@@_byte_flag
+ \flag_clear:N \l_@@_error_flag
\int_set:Nn \tex_escapechar:D { 92 }
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{
\exp_after:wN \@@_unescape_string_newlines:wN
\g_@@_result_tl \prg_break: ^^M ?
\prg_break_point:
}
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{
\exp_after:wN \@@_unescape_string_loop:wNNN
\g_@@_result_tl #1 ?? { ? \prg_break: }
\prg_break_point:
}
- \@@_if_flag_error:nne { @@_byte } { non-byte } { string }
- \@@_if_flag_error:nne { @@_error } { unescape-string } { }
+ \@@_if_flag_error:Nne \l_@@_byte_flag { non-byte } { string }
+ \@@_if_flag_error:Nne \l_@@_error_flag { unescape-string } { }
\group_end:
}
}
@@ -1569,7 +1569,7 @@
{ ^^J } { 0 - 1 }
}
{
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_error_flag
0 - 1 \use_i:nn
}
}
@@ -1825,8 +1825,8 @@
% }
% When decoding a string that is purportedly in the \textsc{utf-8}
% encoding, four different errors can occur, signalled by a specific
-% flag for each (we define those flags using \cs{flag_clear_new:n}
-% rather than \cs{flag_new:n}, because they are shared with other
+% flag for each (we define those flags using \cs{flag_clear_new:N}
+% rather than \cs{flag_new:N}, because they are shared with other
% encoding definition files).
% \begin{itemize}
% \item \enquote{Missing continuation byte}: a leading byte is not
@@ -1846,19 +1846,19 @@
% first remind the user what a correct \textsc{utf-8} string should
% look like, then add error-specific information.
% \begin{macrocode}
-\flag_clear_new:n { @@_missing }
-\flag_clear_new:n { @@_extra }
-\flag_clear_new:n { @@_overlong }
-\flag_clear_new:n { @@_overflow }
+\flag_clear_new:N \l_@@_missing_flag
+\flag_clear_new:N \l_@@_extra_flag
+\flag_clear_new:N \l_@@_overlong_flag
+\flag_clear_new:N \l_@@_overflow_flag
\msg_new:nnnn { str } { utf8-decode }
{
Invalid~UTF-8~string:
\exp_last_unbraced:Nf \use_none:n
{
- \@@_if_flag_times:nT { @@_missing } { ,~missing~continuation~byte }
- \@@_if_flag_times:nT { @@_extra } { ,~extra~continuation~byte }
- \@@_if_flag_times:nT { @@_overlong } { ,~overlong~form }
- \@@_if_flag_times:nT { @@_overflow } { ,~code~point~too~large }
+ \@@_if_flag_times:NT \l_@@_missing_flag { ,~missing~continuation~byte }
+ \@@_if_flag_times:NT \l_@@_extra_flag { ,~extra~continuation~byte }
+ \@@_if_flag_times:NT \l_@@_overlong_flag { ,~overlong~form }
+ \@@_if_flag_times:NT \l_@@_overflow_flag { ,~code~point~too~large }
}
.
}
@@ -1873,25 +1873,25 @@
Code~point~ <~1114112:~11110xxx~10xxxxxx~10xxxxxx~10xxxxxx \\
}
Bytes~of~the~form~10xxxxxx~are~called~continuation~bytes.
- \flag_if_raised:nT { @@_missing }
+ \flag_if_raised:NT \l_@@_missing_flag
{
\\\\
A~leading~byte~(in~the~range~[192,255])~was~not~followed~by~
the~appropriate~number~of~continuation~bytes.
}
- \flag_if_raised:nT { @@_extra }
+ \flag_if_raised:NT \l_@@_extra_flag
{
\\\\
LaTeX~came~across~a~continuation~byte~when~it~was~not~expected.
}
- \flag_if_raised:nT { @@_overlong }
+ \flag_if_raised:NT \l_@@_overlong_flag
{
\\\\
Every~Unicode~code~point~must~be~expressed~in~the~shortest~
possible~form.~For~instance,~'0xC0'~'0x83'~is~not~a~valid~
representation~for~the~code~point~3.
}
- \flag_if_raised:nT { @@_overflow }
+ \flag_if_raised:NT \l_@@_overflow_flag
{
\\\\
Unicode~limits~code~points~to~the~range~[0,1114111].
@@ -1970,18 +1970,18 @@
% \begin{macrocode}
\cs_new_protected:cpn { @@_convert_decode_utf8: }
{
- \flag_clear:n { @@_error }
- \flag_clear:n { @@_missing }
- \flag_clear:n { @@_extra }
- \flag_clear:n { @@_overlong }
- \flag_clear:n { @@_overflow }
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \flag_clear:N \l_@@_error_flag
+ \flag_clear:N \l_@@_missing_flag
+ \flag_clear:N \l_@@_extra_flag
+ \flag_clear:N \l_@@_overlong_flag
+ \flag_clear:N \l_@@_overflow_flag
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{
\exp_after:wN \@@_decode_utf_viii_start:N \g_@@_result_tl
{ \prg_break: \@@_decode_utf_viii_end: }
\prg_break_point:
}
- \@@_if_flag_error:nne { @@_error } { utf8-decode } { }
+ \@@_if_flag_error:Nne \l_@@_error_flag { utf8-decode } { }
}
\cs_new:Npn \@@_decode_utf_viii_start:N #1
{
@@ -1991,8 +1991,8 @@
\if_int_compare:w `#1 < "80 \exp_stop_f:
\int_value:w `#1
\else:
- \flag_raise:n { @@_extra }
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_extra_flag
+ \flag_raise:N \l_@@_error_flag
\int_use:N \c_@@_replacement_char_int
\fi:
\else:
@@ -2015,8 +2015,8 @@
\int_value:w \int_eval:n { #1 * "40 + `#3 - "80 } \exp_after:wN
\else:
\s_@@
- \flag_raise:n { @@_missing }
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_missing_flag
+ \flag_raise:N \l_@@_error_flag
\int_use:N \c_@@_replacement_char_int
\fi:
\s_@@
@@ -2029,8 +2029,8 @@
\if_int_compare:w #1 < #4 \exp_stop_f:
\s_@@
\if_int_compare:w #1 < #3 \exp_stop_f:
- \flag_raise:n { @@_overlong }
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_overlong_flag
+ \flag_raise:N \l_@@_error_flag
\int_use:N \c_@@_replacement_char_int
\else:
#1
@@ -2049,15 +2049,15 @@
\cs_new:Npn \@@_decode_utf_viii_overflow:w #1 \fi: #2 \fi:
{
\fi: \fi:
- \flag_raise:n { @@_overflow }
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_overflow_flag
+ \flag_raise:N \l_@@_error_flag
\int_use:N \c_@@_replacement_char_int
}
\cs_new:Npn \@@_decode_utf_viii_end:
{
\s_@@
- \flag_raise:n { @@_missing }
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_missing_flag
+ \flag_raise:N \l_@@_error_flag
\int_use:N \c_@@_replacement_char_int \s_@@
\prg_break:
}
@@ -2119,10 +2119,10 @@
{ \@@_encode_utf_xvi_aux:N \@@_output_byte_pair_le:n }
\cs_new_protected:Npn \@@_encode_utf_xvi_aux:N #1
{
- \flag_clear:n { @@_error }
+ \flag_clear:N \l_@@_error_flag
\cs_set_eq:NN \@@_tmp:w #1
\@@_convert_gmap_internal:N \@@_encode_utf_xvi_char:n
- \@@_if_flag_error:nne { @@_error } { utf16-encode } { }
+ \@@_if_flag_error:Nne \l_@@_error_flag { utf16-encode } { }
}
\cs_new:Npn \@@_encode_utf_xvi_char:n #1
{
@@ -2131,7 +2131,7 @@
\else:
\if_int_compare:w #1 < "10000 \exp_stop_f:
\if_int_compare:w #1 < "E000 \exp_stop_f:
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_error_flag
\@@_tmp:w { \c_@@_replacement_char_int }
\else:
\@@_tmp:w {#1}
@@ -2162,9 +2162,9 @@
% an unexpected trail surrogate, and a string containing an odd number
% of bytes.
% \begin{macrocode}
- \flag_clear_new:n { @@_missing }
- \flag_clear_new:n { @@_extra }
- \flag_clear_new:n { @@_end }
+ \flag_clear_new:N \l_@@_missing_flag
+ \flag_clear_new:N \l_@@_extra_flag
+ \flag_clear_new:N \l_@@_end_flag
\msg_new:nnnn { str } { utf16-encode }
{ Unicode~string~cannot~be~expressed~in~UTF-16:~surrogate. }
{
@@ -2177,9 +2177,9 @@
Invalid~UTF-16~string:
\exp_last_unbraced:Nf \use_none:n
{
- \@@_if_flag_times:nT { @@_missing } { ,~missing~trail~surrogate }
- \@@_if_flag_times:nT { @@_extra } { ,~extra~trail~surrogate }
- \@@_if_flag_times:nT { @@_end } { ,~odd~number~of~bytes }
+ \@@_if_flag_times:NT \l_@@_missing_flag { ,~missing~trail~surrogate }
+ \@@_if_flag_times:NT \l_@@_extra_flag { ,~extra~trail~surrogate }
+ \@@_if_flag_times:NT \l_@@_end_flag { ,~odd~number~of~bytes }
}
.
}
@@ -2196,17 +2196,17 @@
}
Lead~surrogates~are~pairs~of~bytes~in~the~range~[0xD800,~0xDBFF],~
and~trail~surrogates~are~in~the~range~[0xDC00,~0xDFFF].
- \flag_if_raised:nT { @@_missing }
+ \flag_if_raised:NT \l_@@_missing_flag
{
\\\\
A~lead~surrogate~was~not~followed~by~a~trail~surrogate.
}
- \flag_if_raised:nT { @@_extra }
+ \flag_if_raised:NT \l_@@_extra_flag
{
\\\\
LaTeX~came~across~a~trail~surrogate~when~it~was~not~expected.
}
- \flag_if_raised:nT { @@_end }
+ \flag_if_raised:NT \l_@@_end_flag
{
\\\\
The~string~contained~an~odd~number~of~bytes.~This~is~invalid:~
@@ -2260,18 +2260,18 @@
}
\cs_new_protected:Npn \@@_decode_utf_xvi:Nw #1#2 \s_@@_stop
{
- \flag_clear:n { @@_error }
- \flag_clear:n { @@_missing }
- \flag_clear:n { @@_extra }
- \flag_clear:n { @@_end }
+ \flag_clear:N \l_@@_error_flag
+ \flag_clear:N \l_@@_missing_flag
+ \flag_clear:N \l_@@_extra_flag
+ \flag_clear:N \l_@@_end_flag
\cs_set:Npn \@@_tmp:w ##1 ##2 { ` ## #1 }
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{
\exp_after:wN \@@_decode_utf_xvi_pair:NN
#2 \q_@@_nil \q_@@_nil
\prg_break_point:
}
- \@@_if_flag_error:nne { @@_error } { utf16-decode } { }
+ \@@_if_flag_error:Nne \l_@@_error_flag { utf16-decode } { }
}
% \end{macrocode}
% \end{macro}
@@ -2377,8 +2377,8 @@
{ \@@_decode_utf_xvi_error:nNN { extra } #1#2 }
\cs_new:Npn \@@_decode_utf_xvi_error:nNN #1#2#3
{
- \flag_raise:n { @@_error }
- \flag_raise:n { str_#1 }
+ \flag_raise:N \l_@@_error_flag
+ \flag_raise:c { l_@@_#1_flag }
#2 #3 \s_@@
\int_use:N \c_@@_replacement_char_int \s_@@
}
@@ -2463,29 +2463,29 @@
% happens if the encoding was in fact not \textsc{utf-32}, because
% most arbitrary strings are not valid in \textsc{utf-32}.
% \begin{macrocode}
- \flag_clear_new:n { @@_overflow }
- \flag_clear_new:n { @@_end }
+ \flag_clear_new:N \l_@@_overflow_flag
+ \flag_clear_new:N \l_@@_end_flag
\msg_new:nnnn { str } { utf32-decode }
{
Invalid~UTF-32~string:
\exp_last_unbraced:Nf \use_none:n
{
- \@@_if_flag_times:nT { @@_overflow } { ,~code~point~too~large }
- \@@_if_flag_times:nT { @@_end } { ,~truncated~string }
+ \@@_if_flag_times:NT \l_@@_overflow_flag { ,~code~point~too~large }
+ \@@_if_flag_times:NT \l_@@_end_flag { ,~truncated~string }
}
.
}
{
In~the~UTF-32~encoding,~every~Unicode~character~
(in~the~range~[U+0000,~U+10FFFF])~is~encoded~as~4~bytes.
- \flag_if_raised:nT { @@_overflow }
+ \flag_if_raised:NT \l_@@_overflow_flag
{
\\\\
LaTeX~came~across~a~code~point~larger~than~1114111,~
the~maximum~code~point~defined~by~Unicode.~
Perhaps~the~string~was~not~encoded~in~the~UTF-32~encoding?
}
- \flag_if_raised:nT { @@_end }
+ \flag_if_raised:NT \l_@@_end_flag
{
\\\\
The~length~of~the~string~is~not~a~multiple~of~4.~
@@ -2549,17 +2549,17 @@
}
\cs_new_protected:Npn \@@_decode_utf_xxxii:Nw #1#2 \s_@@_stop
{
- \flag_clear:n { @@_overflow }
- \flag_clear:n { @@_end }
- \flag_clear:n { @@_error }
+ \flag_clear:N \l_@@_overflow_flag
+ \flag_clear:N \l_@@_end_flag
+ \flag_clear:N \l_@@_error_flag
\cs_set:Npn \@@_tmp:w ##1 ##2 { ` ## #1 }
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{
\exp_after:wN \@@_decode_utf_xxxii_loop:NNNN
#2 \s_@@_stop \s_@@_stop \s_@@_stop \s_@@_stop
\prg_break_point:
}
- \@@_if_flag_error:nne { @@_error } { utf32-decode } { }
+ \@@_if_flag_error:Nne \l_@@_error_flag { utf32-decode } { }
}
\cs_new:Npn \@@_decode_utf_xxxii_loop:NNNN #1#2#3#4
{
@@ -2568,13 +2568,13 @@
\fi:
#1#2#3#4 \s_@@
\if_int_compare:w \@@_tmp:w #1#4 > \c_zero_int
- \flag_raise:n { @@_overflow }
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_overflow_flag
+ \flag_raise:N \l_@@_error_flag
\int_use:N \c_@@_replacement_char_int
\else:
\if_int_compare:w \@@_tmp:w #2#3 > 16 \exp_stop_f:
- \flag_raise:n { @@_overflow }
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_overflow_flag
+ \flag_raise:N \l_@@_error_flag
\int_use:N \c_@@_replacement_char_int
\else:
\int_eval:n
@@ -2588,8 +2588,8 @@
{
\tl_if_empty:nF {#1}
{
- \flag_raise:n { @@_end }
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_end_flag
+ \flag_raise:N \l_@@_error_flag
#1 \s_@@
\int_use:N \c_@@_replacement_char_int \s_@@
}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
index dbb21805167..80b26ea9bcf 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -990,7 +990,7 @@
% Similar to corresponding \pkg{l3tl} base functions, except that
% \cs{__kernel_exp_not:w} is replaced with \cs{__kernel_tl_to_str:w}.
% Just like token list, string constants use \cs{cs_gset_nopar:Npe}
-% instead of \cs{__kernel_tl_gset:Ne} so that the scope checking for
+% instead of \cs{__kernel_tl_gset:Nx} so that the scope checking for
% |c| is applied when \pkg{l3debug} is used.
% To maintain backward compatibility, in
% \cs[index=str_put_left:Nn]{str_(g)put_left:Nn} and
@@ -999,9 +999,9 @@
% to prevent further expansion.
% \begin{macrocode}
\cs_new_protected:Npn \str_set:Nn #1#2
- { \__kernel_tl_set:Ne #1 { \__kernel_tl_to_str:w {#2} } }
+ { \__kernel_tl_set:Nx #1 { \__kernel_tl_to_str:w {#2} } }
\cs_gset_protected:Npn \str_gset:Nn #1#2
- { \__kernel_tl_gset:Ne #1 { \__kernel_tl_to_str:w {#2} } }
+ { \__kernel_tl_gset:Nx #1 { \__kernel_tl_to_str:w {#2} } }
\cs_new_protected:Npn \str_const:Nn #1#2
{
\__kernel_chk_if_free_cs:N #1
@@ -1009,22 +1009,22 @@
}
\cs_new_protected:Npn \str_put_left:Nn #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \__kernel_tl_to_str:w {#2} \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \str_gput_left:Nn #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \__kernel_tl_to_str:w {#2} \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \str_put_right:Nn #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \__kernel_exp_not:w \exp_after:wN {#1} \__kernel_tl_to_str:w {#2} }
}
\cs_new_protected:Npn \str_gput_right:Nn #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \__kernel_exp_not:w \exp_after:wN {#1} \__kernel_tl_to_str:w {#2} }
}
\cs_generate_variant:Nn \str_set:Nn { NV , Ne , Nx , c , cV , ce , cx }
@@ -1061,13 +1061,13 @@
% hide in braces.
% \begin{macrocode}
\cs_new_protected:Npn \str_replace_once:Nnn
- { \@@_replace:NNNnn \prg_do_nothing: \__kernel_tl_set:Ne }
+ { \@@_replace:NNNnn \prg_do_nothing: \__kernel_tl_set:Nx }
\cs_new_protected:Npn \str_greplace_once:Nnn
- { \@@_replace:NNNnn \prg_do_nothing: \__kernel_tl_gset:Ne }
+ { \@@_replace:NNNnn \prg_do_nothing: \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \str_replace_all:Nnn
- { \@@_replace:NNNnn \@@_replace_next:w \__kernel_tl_set:Ne }
+ { \@@_replace:NNNnn \@@_replace_next:w \__kernel_tl_set:Nx }
\cs_new_protected:Npn \str_greplace_all:Nnn
- { \@@_replace:NNNnn \@@_replace_next:w \__kernel_tl_gset:Ne }
+ { \@@_replace:NNNnn \@@_replace_next:w \__kernel_tl_gset:Nx }
\cs_generate_variant:Nn \str_replace_once:Nnn { c }
\cs_generate_variant:Nn \str_greplace_once:Nnn { c }
\cs_generate_variant:Nn \str_replace_all:Nnn { c }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx
index 0195a6e781c..1d628ed6a8b 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -1142,7 +1142,7 @@ end
\tl_new:N \g_@@_backend_tl
\@@_finalise:n
{
- \__kernel_tl_gset:Ne \g_@@_backend_tl
+ \__kernel_tl_gset:Nx \g_@@_backend_tl
{
\sys_if_engine_xetex:TF
{ xetex }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3text-case.dtx b/Master/texmf-dist/source/latex/l3kernel/l3text-case.dtx
index e5d854ff18c..10e68fe763e 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3text-case.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3text-case.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3text-map.dtx b/Master/texmf-dist/source/latex/l3kernel/l3text-map.dtx
index bec0df29432..b1787a2f731 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3text-map.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3text-map.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3text-purify.dtx b/Master/texmf-dist/source/latex/l3kernel/l3text-purify.dtx
index 6f8be11b3ac..2e57a3c3d31 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3text-purify.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3text-purify.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3text.dtx b/Master/texmf-dist/source/latex/l3kernel/l3text.dtx
index 61de77d6ab7..0631cc46954 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3text.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3text.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx
index 99469d92c40..4c85ed51d93 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -806,7 +806,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_analysis_b:n #1
{
- \__kernel_tl_gset:Ne \g_@@_analysis_result_tl
+ \__kernel_tl_gset:Nx \g_@@_analysis_result_tl
{
\@@_analysis_b_loop:w 0; #1
\prg_break_point:
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl-build.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl-build.dtx
index 645f052d15e..66b5a2d03ef 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl-build.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl-build.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -59,6 +59,14 @@
% constructed token list cannot be accessed during construction other than
% by methods provided in this section.
%
+% Whilst the exact performance difference is dependent on the size of each
+% added block of tokens and the total number of blocks, in general, the
+% \cs[no-index]{tl_build_(g)put...} functions will out-perform the basic
+% \cs[no-index]{tl_(g)put...} equivalent if more than 100 non-empty addition
+% operations occur. See
+% \url{https://github.com/latex3/latex3/issues/1393#issuecomment-1880164756}
+% for a more detailed analysis.
+%
% \begin{function}[added = 2018-04-01]{\tl_build_begin:N, \tl_build_gbegin:N}
% \begin{syntax}
% \cs{tl_build_begin:N} \meta{tl~var}
@@ -285,12 +293,12 @@
% \begin{macrocode}
\cs_new_protected:Npn \tl_build_end:N #1
{
- \@@_build_get:NNN \__kernel_tl_set:Ne #1 #1
+ \@@_build_get:NNN \__kernel_tl_set:Nx #1 #1
\exp_args:Nc \@@_build_end_loop:NN { \cs_to_str:N #1 ' } \tl_clear:N
}
\cs_new_protected:Npn \tl_build_gend:N #1
{
- \@@_build_get:NNN \__kernel_tl_gset:Ne #1 #1
+ \@@_build_get:NNN \__kernel_tl_gset:Nx #1 #1
\exp_args:Nc \@@_build_end_loop:NN { \cs_to_str:N #1 ' } \tl_gclear:N
}
\cs_new_protected:Npn \@@_build_end_loop:NN #1#2
@@ -308,7 +316,7 @@
% \begin{macro}{\tl_build_get_intermediate:NN}
% \begin{macrocode}
\cs_new_protected:Npn \tl_build_get_intermediate:NN
- { \@@_build_get:NNN \__kernel_tl_set:Ne }
+ { \@@_build_get:NNN \__kernel_tl_set:Nx }
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
index 0249c36aefe..5429f19c549 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -103,11 +103,11 @@
% \tl_const:cn, \tl_const:ce
% }
% \begin{syntax}
-% \cs{tl_const:Nn} \meta{tl~var} \Arg{token list}
+% \cs{tl_const:Nn} \meta{tl~var} \Arg{tokens}
% \end{syntax}
% Creates a new constant \meta{tl~var} or raises an error
% if the name is already taken. The value of the
-% \meta{tl~var} is set globally to the \meta{token list}.
+% \meta{tl~var} is set globally to the \meta{tokens}.
% \end{function}
%
% \begin{function}{\tl_clear:N, \tl_clear:c, \tl_gclear:N, \tl_gclear:c}
@@ -235,7 +235,7 @@
% \cs{tl_if_empty_p:N} \meta{tl~var}
% \cs{tl_if_empty:NTF} \meta{tl~var} \Arg{true code} \Arg{false code}
% \end{syntax}
-% Tests if the \meta{token list variable} is entirely empty
+% Tests if the \meta{tl~var} is entirely empty
% (\emph{i.e.}~contains no tokens at all).
% \end{function}
%
@@ -255,7 +255,7 @@
% \cs{tl_if_eq_p:NN} \meta{tl~var_1} \meta{tl~var_2}
% \cs{tl_if_eq:NNTF} \meta{tl~var_1} \meta{tl~var_2} \Arg{true code} \Arg{false code}
% \end{syntax}
-% Compares the content of two \meta{token list variables} and
+% Compares the content of \meta{tl~var_1} and \meta{tl~var_2} and
% is logically \texttt{true} if the two contain the same list of
% tokens (\emph{i.e.}~identical in both the list of characters they
% contain and the category codes of those characters). Thus for example
@@ -272,7 +272,7 @@
% \begin{syntax}
% \cs{tl_if_eq:NnTF} \meta{tl~var_1} \Arg{token list_2} \Arg{true code} \Arg{false code}
% \end{syntax}
-% Tests if the \meta{token list variable_1} and the \meta{token
+% Tests if the \meta{tl~var_1} and the \meta{token
% list_2} contain the same list of tokens, both in respect of
% character codes and category codes. This conditional is not
% expandable: see \cs{tl_if_eq:NNTF} for an expandable version when
@@ -540,12 +540,12 @@
% \begin{function}[added = 2012-05-13, EXP]
% {\tl_count:n, \tl_count:V, \tl_count:v, \tl_count:e, \tl_count:o}
% \begin{syntax}
-% \cs{tl_count:n} \Arg{tokens}
+% \cs{tl_count:n} \Arg{token list}
% \end{syntax}
-% Counts the number of \meta{items} in \meta{tokens} and leaves this
+% Counts the number of \meta{items} in the \meta{token list} and leaves this
% information in the input stream. Unbraced tokens count as one
% element as do each token group (|{|\ldots|}|). This process
-% ignores any unprotected spaces within \meta{tokens}. See also
+% ignores any unprotected spaces within the \meta{token list}. See also
% \cs{tl_count:N}. This function requires three expansions,
% giving an \meta{integer denotation}.
% \end{function}
@@ -564,9 +564,9 @@
%
% \begin{function}[EXP, added = 2019-02-25]{\tl_count_tokens:n}
% \begin{syntax}
-% \cs{tl_count_tokens:n} \Arg{tokens}
+% \cs{tl_count_tokens:n} \Arg{token list}
% \end{syntax}
-% Counts the number of \TeX{} tokens in the \meta{tokens} and leaves
+% Counts the number of \TeX{} tokens in the \meta{token list} and leaves
% this information in the input stream. Every token, including spaces and
% braces, contributes one to the total; thus for instance, the token count of
% |a~{bc}| is $6$.
@@ -603,7 +603,7 @@
% that \meta{item_1}\meta{item_2}\meta{item_3} \ldots \meta{item_n}
% becomes \meta{item_n}\ldots \meta{item_3}\meta{item_2}\meta{item_1}.
% This process preserves unprotected spaces within the
-% \meta{token list variable}. Braced token groups are copied without
+% \meta{tl~var}. Braced token groups are copied without
% reversing the order of tokens, but keep the outer set of braces.
% This is equivalent to a combination of an assignment and
% \cs{tl_reverse:V}. See also \cs{tl_reverse_items:n} for improved
@@ -769,11 +769,11 @@
% {\tl_map_tokens:Nn, \tl_map_tokens:cn, \tl_map_tokens:nn}
% \begin{syntax}
% \cs{tl_map_tokens:Nn} \meta{tl~var} \Arg{code}
-% \cs{tl_map_tokens:nn} \Arg{tokens} \Arg{code}
+% \cs{tl_map_tokens:nn} \Arg{token list} \Arg{code}
% \end{syntax}
% Analogue of \cs{tl_map_function:NN} which maps several tokens
% instead of a single function. The \meta{code} receives each \meta{item} in
-% the \meta{tl~var} or in \meta{tokens} as a trailing brace group. For
+% the \meta{tl~var} or in the \meta{token list} as a trailing brace group. For
% instance,
% \begin{verbatim}
% \tl_map_tokens:Nn \l_my_tl { \prg_replicate:nn { 2 } }
@@ -816,7 +816,7 @@
% \cs{tl_map_break:}
% \end{syntax}
% Used to terminate a \cs[no-index]{tl_map_\ldots} function before all
-% entries in the \meta{token list variable} have been processed. This
+% entries in the \meta{token list} have been processed. This
% normally takes place within a conditional statement, for example
% \begin{verbatim}
% \tl_map_inline:Nn \l_my_tl
@@ -830,9 +830,9 @@
% level \TeX{} errors.
% \begin{texnote}
% When the mapping is broken, additional tokens may be inserted
-% before the \meta{tokens} are
-% inserted into the input stream.
-% This depends on the design of the mapping function.
+% before further items are taken
+% from the input stream. This depends on the design of the mapping
+% function.
% \end{texnote}
% \end{function}
%
@@ -841,7 +841,7 @@
% \cs{tl_map_break:n} \Arg{code}
% \end{syntax}
% Used to terminate a \cs[no-index]{tl_map_\ldots} function before all
-% entries in the \meta{token list variable} have been processed, inserting
+% entries in the \meta{token list} have been processed, inserting
% the \meta{code} after the mapping has ended. This
% normally takes place within a conditional statement, for example
% \begin{verbatim}
@@ -1170,7 +1170,7 @@
% \cs{tl_remove_once:Nn} \meta{tl~var} \Arg{tokens}
% \end{syntax}
% Removes the first (leftmost) occurrence of \meta{tokens} from the
-% \meta{tl~var}. \meta{Tokens} cannot contain |{|, |}| or |#|
+% \meta{tl~var}. The \meta{tokens} cannot contain |{|, |}| or |#|
% (more precisely, explicit character tokens with category code $1$
% (begin-group) or $2$ (end-group), and tokens with category code $6$).
% \end{function}
@@ -1186,7 +1186,7 @@
% \cs{tl_remove_all:Nn} \meta{tl~var} \Arg{tokens}
% \end{syntax}
% Removes all occurrences of \meta{tokens} from the
-% \meta{tl~var}. \meta{Tokens} cannot contain |{|, |}| or |#|
+% \meta{tl~var}. The \meta{tokens} cannot contain |{|, |}| or |#|
% (more precisely, explicit character tokens with category code $1$
% (begin-group) or $2$ (end-group), and tokens with category code $6$).
% As this function
@@ -1346,12 +1346,12 @@
%
% \subsection{Functions}
%
-% \begin{macro}{\__kernel_tl_set:Ne,\__kernel_tl_gset:Ne}
+% \begin{macro}{\__kernel_tl_set:Nx,\__kernel_tl_gset:Nx}
% These two are supplied to get better performance for macros which would
% otherwise use \cs{tl_set:Ne} or \cs{tl_gset:Ne} internally.
% \begin{macrocode}
-\cs_new_eq:NN \__kernel_tl_set:Ne \cs_set_nopar:Npe
-\cs_new_eq:NN \__kernel_tl_gset:Ne \cs_gset_nopar:Npe
+\cs_new_eq:NN \__kernel_tl_set:Nx \cs_set_nopar:Npe
+\cs_new_eq:NN \__kernel_tl_gset:Nx \cs_gset_nopar:Npe
% \end{macrocode}
% \end{macro}
%
@@ -1374,7 +1374,7 @@
% \tl_const:cn, \tl_const:ce, \tl_const:cx
% }
% Constants are also easy to generate. They use \cs{cs_gset_nopar:Npe} instead
-% of \cs{__kernel_tl_gset:Ne} so that the correct scope checking for |c|,
+% of \cs{__kernel_tl_gset:Nx} so that the correct scope checking for |c|,
% instead of for |g|, is applied when
% \cs{debug_on:n} |{ check-declarations }| is used.
% Constant assignment functions are patched specially in \pkg{l3debug} to
@@ -1444,7 +1444,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \tl_concat:NNN #1#2#3
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#2}
\__kernel_exp_not:w \exp_after:wN {#3}
@@ -1452,7 +1452,7 @@
}
\cs_new_protected:Npn \tl_gconcat:NNN #1#2#3
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#2}
\__kernel_exp_not:w \exp_after:wN {#3}
@@ -1519,13 +1519,13 @@
% by hand as it is used quite a lot.
% \begin{macrocode}
\cs_new_protected:Npn \tl_set:Nn #1#2
- { \__kernel_tl_set:Ne #1 { \__kernel_exp_not:w {#2} } }
+ { \__kernel_tl_set:Nx #1 { \__kernel_exp_not:w {#2} } }
\cs_new_protected:Npn \tl_set:No #1#2
- { \__kernel_tl_set:Ne #1 { \__kernel_exp_not:w \exp_after:wN {#2} } }
+ { \__kernel_tl_set:Nx #1 { \__kernel_exp_not:w \exp_after:wN {#2} } }
\cs_new_protected:Npn \tl_gset:Nn #1#2
- { \__kernel_tl_gset:Ne #1 { \__kernel_exp_not:w {#2} } }
+ { \__kernel_tl_gset:Nx #1 { \__kernel_exp_not:w {#2} } }
\cs_new_protected:Npn \tl_gset:No #1#2
- { \__kernel_tl_gset:Ne #1 { \__kernel_exp_not:w \exp_after:wN {#2} } }
+ { \__kernel_tl_gset:Nx #1 { \__kernel_exp_not:w \exp_after:wN {#2} } }
\cs_generate_variant:Nn \tl_set:Nn { NV , Nv , Ne , Nf }
\cs_generate_variant:Nn \tl_set:Nn { c, cV , cv , ce , cf }
\cs_generate_variant:Nn \tl_set:No { c }
@@ -1556,22 +1556,22 @@
% \begin{macrocode}
\cs_new_protected:Npn \tl_put_left:Nn #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \__kernel_exp_not:w {#2} \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \tl_put_left:NV #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \exp_not:V #2 \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \tl_put_left:Nv #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \exp_not:v {#2} \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \tl_put_left:Ne #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{
\__kernel_exp_not:w \tex_expanded:D { {#2} }
\__kernel_exp_not:w \exp_after:wN {#1}
@@ -1579,7 +1579,7 @@
}
\cs_new_protected:Npn \tl_put_left:No #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#2}
\__kernel_exp_not:w \exp_after:wN {#1}
@@ -1587,22 +1587,22 @@
}
\cs_new_protected:Npn \tl_gput_left:Nn #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \__kernel_exp_not:w {#2} \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \tl_gput_left:NV #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \exp_not:V #2 \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \tl_gput_left:Nv #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \exp_not:v {#2} \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \tl_gput_left:Ne #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{
\__kernel_exp_not:w \tex_expanded:D { {#2} }
\__kernel_exp_not:w \exp_after:wN {#1}
@@ -1610,7 +1610,7 @@
}
\cs_new_protected:Npn \tl_gput_left:No #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#2}
\__kernel_exp_not:w \exp_after:wN {#1}
@@ -1649,20 +1649,20 @@
% The same on the right.
% \begin{macrocode}
\cs_new_protected:Npn \tl_put_right:Nn #1#2
- { \__kernel_tl_set:Ne #1 { \__kernel_exp_not:w \exp_after:wN { #1 #2 } } }
+ { \__kernel_tl_set:Nx #1 { \__kernel_exp_not:w \exp_after:wN { #1 #2 } } }
\cs_new_protected:Npn \tl_put_right:NV #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \__kernel_exp_not:w \exp_after:wN {#1} \exp_not:V #2 }
}
\cs_new_protected:Npn \tl_put_right:Nv #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \__kernel_exp_not:w \exp_after:wN {#1} \exp_not:v {#2} }
}
\cs_new_protected:Npn \tl_put_right:Ne #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#1}
\__kernel_exp_not:w \tex_expanded:D { {#2} }
@@ -1670,27 +1670,27 @@
}
\cs_new_protected:Npn \tl_put_right:No #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#1}
\__kernel_exp_not:w \exp_after:wN {#2}
}
}
\cs_new_protected:Npn \tl_gput_right:Nn #1#2
- { \__kernel_tl_gset:Ne #1 { \__kernel_exp_not:w \exp_after:wN { #1 #2 } } }
+ { \__kernel_tl_gset:Nx #1 { \__kernel_exp_not:w \exp_after:wN { #1 #2 } } }
\cs_new_protected:Npn \tl_gput_right:NV #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \__kernel_exp_not:w \exp_after:wN {#1} \exp_not:V #2 }
}
\cs_new_protected:Npn \tl_gput_right:Nv #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \__kernel_exp_not:w \exp_after:wN {#1} \exp_not:v {#2} }
}
\cs_new_protected:Npn \tl_gput_right:Ne #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#1}
\__kernel_exp_not:w \tex_expanded:D { {#2} }
@@ -1698,7 +1698,7 @@
}
\cs_new_protected:Npn \tl_gput_right:No #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#1}
\__kernel_exp_not:w \exp_after:wN {#2}
@@ -2041,13 +2041,13 @@
% the \meta{tl~var} by \meta{token list}.
% \begin{macrocode}
\cs_new_protected:Npn \tl_replace_once:Nnn
- { \@@_replace:NnNNNnn \q_@@_mark ? \@@_replace_wrap:w \__kernel_tl_set:Ne }
+ { \@@_replace:NnNNNnn \q_@@_mark ? \@@_replace_wrap:w \__kernel_tl_set:Nx }
\cs_new_protected:Npn \tl_greplace_once:Nnn
- { \@@_replace:NnNNNnn \q_@@_mark ? \@@_replace_wrap:w \__kernel_tl_gset:Ne }
+ { \@@_replace:NnNNNnn \q_@@_mark ? \@@_replace_wrap:w \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \tl_replace_all:Nnn
- { \@@_replace:NnNNNnn \q_@@_mark ? \@@_replace_next:w \__kernel_tl_set:Ne }
+ { \@@_replace:NnNNNnn \q_@@_mark ? \@@_replace_next:w \__kernel_tl_set:Nx }
\cs_new_protected:Npn \tl_greplace_all:Nnn
- { \@@_replace:NnNNNnn \q_@@_mark ? \@@_replace_next:w \__kernel_tl_gset:Ne }
+ { \@@_replace:NnNNNnn \q_@@_mark ? \@@_replace_next:w \__kernel_tl_gset:Nx }
\cs_generate_variant:Nn \tl_replace_once:Nnn
{ NnV , Nne , NV , Ne , Nee , c , cnV , cne , cV , ce , cee }
\cs_generate_variant:Nn \tl_replace_once:Nnn
@@ -2904,9 +2904,9 @@
{ \@@_trim_spaces:nn { \@@_trim_mark: #1 } { \exp_args:No #2 } }
\cs_generate_variant:Nn \tl_trim_spaces_apply:nN { o }
\cs_new_protected:Npn \tl_trim_spaces:N #1
- { \__kernel_tl_set:Ne #1 { \exp_args:No \tl_trim_spaces:n {#1} } }
+ { \__kernel_tl_set:Nx #1 { \exp_args:No \tl_trim_spaces:n {#1} } }
\cs_new_protected:Npn \tl_gtrim_spaces:N #1
- { \__kernel_tl_gset:Ne #1 { \exp_args:No \tl_trim_spaces:n {#1} } }
+ { \__kernel_tl_gset:Nx #1 { \exp_args:No \tl_trim_spaces:n {#1} } }
\cs_generate_variant:Nn \tl_trim_spaces:N { c }
\cs_generate_variant:Nn \tl_gtrim_spaces:N { c }
% \end{macrocode}
@@ -3208,17 +3208,22 @@
% \begin{macro}[EXP]
% {
% \@@_if_head_is_N_type_auxi:w ,
-% \@@_if_head_is_N_type_auxii:nn ,
-% \@@_if_head_is_N_type_auxiii:n
+% \@@_if_head_is_N_type_auxii:n ,
% }
% A token list can be empty, can start with an explicit space
% character (catcode 10 and charcode 32), can start with a begin-group
% token (catcode 1), or start with an \texttt{N}-type argument. In
-% the first two cases, the line involving \cs{@@_if_head_is_N_type_auxi:w}
-% produces~|f| (and otherwise nothing). In the third case
-% (begin-group token), the lines involving \cs{token_to_str:N} produce a
-% single closing brace. The category code test is thus true exactly
-% in the fourth case, which is what we want. One cannot optimize by
+% the first two cases, and when |#1~| starts with |{}~|,
+% \cs{@@_if_head_is_N_type_auxi:w} receives an empty argument hence
+% produces |f| and removes everything before the first
+% \cs{scan_stop:}. In the third case (except when |#1~| starts with
+% |{}~|), the second auxiliary removes the first copy of~|#1| that was
+% used for the space test, then expands \cs{token_to_str:N} which hits
+% the leading begin-group token, leaving a single closing brace to be
+% compared with \cs{scan_stop:}. In the last case,
+% \cs{token_to_str:N} does not change the brace balance so that only
+% \cs{scan_stop:} \cs{scan_stop:} remain, making the character code
+% test true. One cannot optimize by
% moving one of the \cs{scan_stop:} to the beginning: if |#1| contains
% primitive conditionals, all of its occurrences must be dealt with before
% the \cs{if:w} tries to skip the \texttt{true} branch of the
@@ -3227,7 +3232,7 @@
\prg_new_conditional:Npnn \tl_if_head_is_N_type:n #1 { p , T , F , TF }
{
\if:w
- \if_false: { \fi: \@@_if_head_is_N_type_auxi:w \prg_do_nothing: #1 ~ }
+ \if_false: { \fi: \@@_if_head_is_N_type_auxi:w #1 ~ }
{ \exp_after:wN { \token_to_str:N #1 } }
\scan_stop: \scan_stop:
\prg_return_true:
@@ -3237,7 +3242,7 @@
}
\exp_args:Nno \use:n { \cs_new:Npn \@@_if_head_is_N_type_auxi:w #1 ~ }
{
- \tl_if_empty:oTF { #1 }
+ \tl_if_empty:nTF {#1}
{ f \exp_after:wN \use_none:nn }
{ \exp_after:wN \@@_if_head_is_N_type_auxii:n }
\exp_after:wN { \if_false: } \fi:
@@ -3481,9 +3486,9 @@
% which stops the \texttt{f}-expansion.
% \begin{macrocode}
\cs_new_protected:Npn \tl_reverse:N #1
- { \__kernel_tl_set:Ne #1 { \exp_args:No \tl_reverse:n { #1 } } }
+ { \__kernel_tl_set:Nx #1 { \exp_args:No \tl_reverse:n { #1 } } }
\cs_new_protected:Npn \tl_greverse:N #1
- { \__kernel_tl_gset:Ne #1 { \exp_args:No \tl_reverse:n { #1 } } }
+ { \__kernel_tl_gset:Nx #1 { \exp_args:No \tl_reverse:n { #1 } } }
\cs_generate_variant:Nn \tl_reverse:N { c }
\cs_generate_variant:Nn \tl_greverse:N { c }
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
index 1f3113a659a..add3e80eff0 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -1522,7 +1522,7 @@
% Before doing any actual conversion, first some special case filtering.
% Spaces are out here as \LuaTeX{} emulation only makes normal (charcode
% $32$ spaces). However, |^^@| is filtered out separately as that can't be
-% done with macro emulation either, so is flagged up separately. That
+% done with macro emulation either, so is treated separately. That
% done, hand off to the engine-dependent part.
% \begin{macrocode}
\cs_new:Npn \@@_generate_aux:w #1 ; #2 ;
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx b/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx
index df2a5189dbc..ce11f62ae2b 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex
index d94bece9e6c..2265d35488d 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex
+++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex
@@ -59,7 +59,6 @@
%% l3text-case.dtx (with options: `package')
%% l3text-map.dtx (with options: `package')
%% l3text-purify.dtx (with options: `package')
-%% l3candidates.dtx (with options: `package')
%% l3legacy.dtx (with options: `package')
%% l3deprecation.dtx (with options: `package')
%%
@@ -76,7 +75,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: expl3.dtx
-\def\ExplFileDate{2024-01-04}%
+\def\ExplFileDate{2024-01-22}%
\begingroup
\def\next{\endgroup}%
\expandafter\ifx\csname PackageError\endcsname\relax
@@ -2060,11 +2059,10 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_new_protected:Npn \cs_undefine:c #1
{
\if_cs_exist:w #1 \cs_end:
- \exp_after:wN \use:n
\else:
- \exp_after:wN \use_none:n
+ \use_i:nnnn
\fi:
- { \cs_gset_eq:cN {#1} \tex_undefined:D }
+ \exp_args:Nc \cs_undefine:N {#1}
}
\cs_set_protected:Npn \__kernel_cs_parm_from_arg_count:nnF #1#2
{
@@ -3390,8 +3388,8 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new:Npn \use_none_delimit_by_s_stop:w #1 \s_stop { }
%% File: l3tl.dtx
-\cs_new_eq:NN \__kernel_tl_set:Ne \cs_set_nopar:Npe
-\cs_new_eq:NN \__kernel_tl_gset:Ne \cs_gset_nopar:Npe
+\cs_new_eq:NN \__kernel_tl_set:Nx \cs_set_nopar:Npe
+\cs_new_eq:NN \__kernel_tl_gset:Nx \cs_gset_nopar:Npe
\cs_new_protected:Npn \tl_new:N #1
{
\__kernel_chk_if_free_cs:N #1
@@ -3425,7 +3423,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_generate_variant:Nn \tl_gset_eq:NN { cN, Nc, cc }
\cs_new_protected:Npn \tl_concat:NNN #1#2#3
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#2}
\__kernel_exp_not:w \exp_after:wN {#3}
@@ -3433,7 +3431,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \tl_gconcat:NNN #1#2#3
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#2}
\__kernel_exp_not:w \exp_after:wN {#3}
@@ -3450,13 +3448,13 @@ Type H <return> for immediate help}\def~{\errmessage{%
\group_end:
\tl_const:Nn \c_space_tl { ~ }
\cs_new_protected:Npn \tl_set:Nn #1#2
- { \__kernel_tl_set:Ne #1 { \__kernel_exp_not:w {#2} } }
+ { \__kernel_tl_set:Nx #1 { \__kernel_exp_not:w {#2} } }
\cs_new_protected:Npn \tl_set:No #1#2
- { \__kernel_tl_set:Ne #1 { \__kernel_exp_not:w \exp_after:wN {#2} } }
+ { \__kernel_tl_set:Nx #1 { \__kernel_exp_not:w \exp_after:wN {#2} } }
\cs_new_protected:Npn \tl_gset:Nn #1#2
- { \__kernel_tl_gset:Ne #1 { \__kernel_exp_not:w {#2} } }
+ { \__kernel_tl_gset:Nx #1 { \__kernel_exp_not:w {#2} } }
\cs_new_protected:Npn \tl_gset:No #1#2
- { \__kernel_tl_gset:Ne #1 { \__kernel_exp_not:w \exp_after:wN {#2} } }
+ { \__kernel_tl_gset:Nx #1 { \__kernel_exp_not:w \exp_after:wN {#2} } }
\cs_generate_variant:Nn \tl_set:Nn { NV , Nv , Ne , Nf }
\cs_generate_variant:Nn \tl_set:Nn { c, cV , cv , ce , cf }
\cs_generate_variant:Nn \tl_set:No { c }
@@ -3467,22 +3465,22 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_generate_variant:Nn \tl_gset:Nn { Nx , cx }
\cs_new_protected:Npn \tl_put_left:Nn #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \__kernel_exp_not:w {#2} \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \tl_put_left:NV #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \exp_not:V #2 \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \tl_put_left:Nv #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \exp_not:v {#2} \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \tl_put_left:Ne #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{
\__kernel_exp_not:w \tex_expanded:D { {#2} }
\__kernel_exp_not:w \exp_after:wN {#1}
@@ -3490,7 +3488,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \tl_put_left:No #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#2}
\__kernel_exp_not:w \exp_after:wN {#1}
@@ -3498,22 +3496,22 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \tl_gput_left:Nn #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \__kernel_exp_not:w {#2} \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \tl_gput_left:NV #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \exp_not:V #2 \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \tl_gput_left:Nv #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \exp_not:v {#2} \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \tl_gput_left:Ne #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{
\__kernel_exp_not:w \tex_expanded:D { {#2} }
\__kernel_exp_not:w \exp_after:wN {#1}
@@ -3521,7 +3519,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \tl_gput_left:No #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#2}
\__kernel_exp_not:w \exp_after:wN {#1}
@@ -3540,20 +3538,20 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_generate_variant:Nn \tl_gput_left:No { c }
\cs_generate_variant:Nn \tl_gput_left:Nn { Nx , cx }
\cs_new_protected:Npn \tl_put_right:Nn #1#2
- { \__kernel_tl_set:Ne #1 { \__kernel_exp_not:w \exp_after:wN { #1 #2 } } }
+ { \__kernel_tl_set:Nx #1 { \__kernel_exp_not:w \exp_after:wN { #1 #2 } } }
\cs_new_protected:Npn \tl_put_right:NV #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \__kernel_exp_not:w \exp_after:wN {#1} \exp_not:V #2 }
}
\cs_new_protected:Npn \tl_put_right:Nv #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \__kernel_exp_not:w \exp_after:wN {#1} \exp_not:v {#2} }
}
\cs_new_protected:Npn \tl_put_right:Ne #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#1}
\__kernel_exp_not:w \tex_expanded:D { {#2} }
@@ -3561,27 +3559,27 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \tl_put_right:No #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#1}
\__kernel_exp_not:w \exp_after:wN {#2}
}
}
\cs_new_protected:Npn \tl_gput_right:Nn #1#2
- { \__kernel_tl_gset:Ne #1 { \__kernel_exp_not:w \exp_after:wN { #1 #2 } } }
+ { \__kernel_tl_gset:Nx #1 { \__kernel_exp_not:w \exp_after:wN { #1 #2 } } }
\cs_new_protected:Npn \tl_gput_right:NV #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \__kernel_exp_not:w \exp_after:wN {#1} \exp_not:V #2 }
}
\cs_new_protected:Npn \tl_gput_right:Nv #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \__kernel_exp_not:w \exp_after:wN {#1} \exp_not:v {#2} }
}
\cs_new_protected:Npn \tl_gput_right:Ne #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#1}
\__kernel_exp_not:w \tex_expanded:D { {#2} }
@@ -3589,7 +3587,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \tl_gput_right:No #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#1}
\__kernel_exp_not:w \exp_after:wN {#2}
@@ -3715,13 +3713,13 @@ Type H <return> for immediate help}\def~{\errmessage{%
\c__tl_rescan_marker_tl #2
{ \use_i:nn \exp_end: #1 }
\cs_new_protected:Npn \tl_replace_once:Nnn
- { \__tl_replace:NnNNNnn \q__tl_mark ? \__tl_replace_wrap:w \__kernel_tl_set:Ne }
+ { \__tl_replace:NnNNNnn \q__tl_mark ? \__tl_replace_wrap:w \__kernel_tl_set:Nx }
\cs_new_protected:Npn \tl_greplace_once:Nnn
- { \__tl_replace:NnNNNnn \q__tl_mark ? \__tl_replace_wrap:w \__kernel_tl_gset:Ne }
+ { \__tl_replace:NnNNNnn \q__tl_mark ? \__tl_replace_wrap:w \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \tl_replace_all:Nnn
- { \__tl_replace:NnNNNnn \q__tl_mark ? \__tl_replace_next:w \__kernel_tl_set:Ne }
+ { \__tl_replace:NnNNNnn \q__tl_mark ? \__tl_replace_next:w \__kernel_tl_set:Nx }
\cs_new_protected:Npn \tl_greplace_all:Nnn
- { \__tl_replace:NnNNNnn \q__tl_mark ? \__tl_replace_next:w \__kernel_tl_gset:Ne }
+ { \__tl_replace:NnNNNnn \q__tl_mark ? \__tl_replace_next:w \__kernel_tl_gset:Nx }
\cs_generate_variant:Nn \tl_replace_once:Nnn
{ NnV , Nne , NV , Ne , Nee , c , cnV , cne , cV , ce , cee }
\cs_generate_variant:Nn \tl_replace_once:Nnn
@@ -4087,9 +4085,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ \__tl_trim_spaces:nn { \__tl_trim_mark: #1 } { \exp_args:No #2 } }
\cs_generate_variant:Nn \tl_trim_spaces_apply:nN { o }
\cs_new_protected:Npn \tl_trim_spaces:N #1
- { \__kernel_tl_set:Ne #1 { \exp_args:No \tl_trim_spaces:n {#1} } }
+ { \__kernel_tl_set:Nx #1 { \exp_args:No \tl_trim_spaces:n {#1} } }
\cs_new_protected:Npn \tl_gtrim_spaces:N #1
- { \__kernel_tl_gset:Ne #1 { \exp_args:No \tl_trim_spaces:n {#1} } }
+ { \__kernel_tl_gset:Nx #1 { \exp_args:No \tl_trim_spaces:n {#1} } }
\cs_generate_variant:Nn \tl_trim_spaces:N { c }
\cs_generate_variant:Nn \tl_gtrim_spaces:N { c }
\cs_set_protected:Npn \__tl_tmp:w #1
@@ -4231,7 +4229,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\prg_new_conditional:Npnn \tl_if_head_is_N_type:n #1 { p , T , F , TF }
{
\if:w
- \if_false: { \fi: \__tl_if_head_is_N_type_auxi:w \prg_do_nothing: #1 ~ }
+ \if_false: { \fi: \__tl_if_head_is_N_type_auxi:w #1 ~ }
{ \exp_after:wN { \token_to_str:N #1 } }
\scan_stop: \scan_stop:
\prg_return_true:
@@ -4241,7 +4239,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\exp_args:Nno \use:n { \cs_new:Npn \__tl_if_head_is_N_type_auxi:w #1 ~ }
{
- \tl_if_empty:oTF { #1 }
+ \tl_if_empty:nTF {#1}
{ f \exp_after:wN \use_none:nn }
{ \exp_after:wN \__tl_if_head_is_N_type_auxii:n }
\exp_after:wN { \if_false: } \fi:
@@ -4361,9 +4359,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_new:Npn \__tl_reverse_space:
{ \__tl_act_reverse_output:n { ~ } }
\cs_new_protected:Npn \tl_reverse:N #1
- { \__kernel_tl_set:Ne #1 { \exp_args:No \tl_reverse:n { #1 } } }
+ { \__kernel_tl_set:Nx #1 { \exp_args:No \tl_reverse:n { #1 } } }
\cs_new_protected:Npn \tl_greverse:N #1
- { \__kernel_tl_gset:Ne #1 { \exp_args:No \tl_reverse:n { #1 } } }
+ { \__kernel_tl_gset:Nx #1 { \exp_args:No \tl_reverse:n { #1 } } }
\cs_generate_variant:Nn \tl_reverse:N { c }
\cs_generate_variant:Nn \tl_greverse:N { c }
\cs_new:Npn \tl_item:nn #1#2
@@ -4630,12 +4628,12 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \tl_build_end:N #1
{
- \__tl_build_get:NNN \__kernel_tl_set:Ne #1 #1
+ \__tl_build_get:NNN \__kernel_tl_set:Nx #1 #1
\exp_args:Nc \__tl_build_end_loop:NN { \cs_to_str:N #1 ' } \tl_clear:N
}
\cs_new_protected:Npn \tl_build_gend:N #1
{
- \__tl_build_get:NNN \__kernel_tl_gset:Ne #1 #1
+ \__tl_build_get:NNN \__kernel_tl_gset:Nx #1 #1
\exp_args:Nc \__tl_build_end_loop:NN { \cs_to_str:N #1 ' } \tl_gclear:N
}
\cs_new_protected:Npn \__tl_build_end_loop:NN #1#2
@@ -4647,7 +4645,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\exp_args:Nc \__tl_build_end_loop:NN { \cs_to_str:N #1 ' } #2
}
\cs_new_protected:Npn \tl_build_get_intermediate:NN
- { \__tl_build_get:NNN \__kernel_tl_set:Ne }
+ { \__tl_build_get:NNN \__kernel_tl_set:Nx }
\cs_new_protected:Npn \__tl_build_get:NNN #1#2#3
{ #1 #3 { \if_false: { \fi: \exp_after:wN \__tl_build_get:w #2 } } }
\cs_new:Npn \__tl_build_get:w #1 \__tl_build_last:NNn #2#3#4
@@ -4697,9 +4695,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_generate_variant:Nn \str_concat:NNN { ccc }
\cs_generate_variant:Nn \str_gconcat:NNN { ccc }
\cs_new_protected:Npn \str_set:Nn #1#2
- { \__kernel_tl_set:Ne #1 { \__kernel_tl_to_str:w {#2} } }
+ { \__kernel_tl_set:Nx #1 { \__kernel_tl_to_str:w {#2} } }
\cs_gset_protected:Npn \str_gset:Nn #1#2
- { \__kernel_tl_gset:Ne #1 { \__kernel_tl_to_str:w {#2} } }
+ { \__kernel_tl_gset:Nx #1 { \__kernel_tl_to_str:w {#2} } }
\cs_new_protected:Npn \str_const:Nn #1#2
{
\__kernel_chk_if_free_cs:N #1
@@ -4707,22 +4705,22 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \str_put_left:Nn #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \__kernel_tl_to_str:w {#2} \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \str_gput_left:Nn #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \__kernel_tl_to_str:w {#2} \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \str_put_right:Nn #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \__kernel_exp_not:w \exp_after:wN {#1} \__kernel_tl_to_str:w {#2} }
}
\cs_new_protected:Npn \str_gput_right:Nn #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \__kernel_exp_not:w \exp_after:wN {#1} \__kernel_tl_to_str:w {#2} }
}
\cs_generate_variant:Nn \str_set:Nn { NV , Ne , Nx , c , cV , ce , cx }
@@ -4733,13 +4731,13 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_generate_variant:Nn \str_put_right:Nn { NV , Ne , Nx , c , cV , ce , cx }
\cs_generate_variant:Nn \str_gput_right:Nn { NV , Ne , Nx , c , cV , ce , cx }
\cs_new_protected:Npn \str_replace_once:Nnn
- { \__str_replace:NNNnn \prg_do_nothing: \__kernel_tl_set:Ne }
+ { \__str_replace:NNNnn \prg_do_nothing: \__kernel_tl_set:Nx }
\cs_new_protected:Npn \str_greplace_once:Nnn
- { \__str_replace:NNNnn \prg_do_nothing: \__kernel_tl_gset:Ne }
+ { \__str_replace:NNNnn \prg_do_nothing: \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \str_replace_all:Nnn
- { \__str_replace:NNNnn \__str_replace_next:w \__kernel_tl_set:Ne }
+ { \__str_replace:NNNnn \__str_replace_next:w \__kernel_tl_set:Nx }
\cs_new_protected:Npn \str_greplace_all:Nnn
- { \__str_replace:NNNnn \__str_replace_next:w \__kernel_tl_gset:Ne }
+ { \__str_replace:NNNnn \__str_replace_next:w \__kernel_tl_gset:Nx }
\cs_generate_variant:Nn \str_replace_once:Nnn { c }
\cs_generate_variant:Nn \str_greplace_once:Nnn { c }
\cs_generate_variant:Nn \str_replace_all:Nnn { c }
@@ -5464,22 +5462,22 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_new_eq:NN \seq_gset_eq:cc \tl_gset_eq:cc
\cs_new_protected:Npn \seq_set_from_clist:NN #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \s__seq \clist_map_function:NN #2 \__seq_wrap_item:n }
}
\cs_new_protected:Npn \seq_set_from_clist:Nn #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \s__seq \clist_map_function:nN {#2} \__seq_wrap_item:n }
}
\cs_new_protected:Npn \seq_gset_from_clist:NN #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \s__seq \clist_map_function:NN #2 \__seq_wrap_item:n }
}
\cs_new_protected:Npn \seq_gset_from_clist:Nn #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \s__seq \clist_map_function:nN {#2} \__seq_wrap_item:n }
}
\cs_generate_variant:Nn \seq_set_from_clist:NN { Nc }
@@ -5495,13 +5493,13 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_generate_variant:Nn \seq_const_from_clist:Nn { c }
\cs_new_protected:Npn \seq_set_split:Nnn
- { \__seq_set_split:NNNnn \__kernel_tl_set:Ne \tl_trim_spaces:n }
+ { \__seq_set_split:NNNnn \__kernel_tl_set:Nx \tl_trim_spaces:n }
\cs_new_protected:Npn \seq_gset_split:Nnn
- { \__seq_set_split:NNNnn \__kernel_tl_gset:Ne \tl_trim_spaces:n }
+ { \__seq_set_split:NNNnn \__kernel_tl_gset:Nx \tl_trim_spaces:n }
\cs_new_protected:Npn \seq_set_split_keep_spaces:Nnn
- { \__seq_set_split:NNNnn \__kernel_tl_set:Ne \exp_not:n }
+ { \__seq_set_split:NNNnn \__kernel_tl_set:Nx \exp_not:n }
\cs_new_protected:Npn \seq_gset_split_keep_spaces:Nnn
- { \__seq_set_split:NNNnn \__kernel_tl_gset:Ne \exp_not:n }
+ { \__seq_set_split:NNNnn \__kernel_tl_gset:Nx \exp_not:n }
\cs_new_protected:Npn \__seq_set_split:NNNnn #1#2#3#4#5
{
\tl_if_empty:nTF {#4}
@@ -5521,7 +5519,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\__seq_set_split_end:
\__seq_set_split:Nw #2 \prg_do_nothing:
}
- \__kernel_tl_set:Ne \l__seq_internal_a_tl { \l__seq_internal_a_tl }
+ \__kernel_tl_set:Nx \l__seq_internal_a_tl { \l__seq_internal_a_tl }
}
#1 #3 { \s__seq \l__seq_internal_a_tl }
}
@@ -5539,6 +5537,16 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_generate_variant:Nn \seq_gset_split:Nnn { Nnx , Nxx }
\cs_generate_variant:Nn \seq_set_split_keep_spaces:Nnn { NnV }
\cs_generate_variant:Nn \seq_gset_split_keep_spaces:Nnn { NnV }
+\cs_new_protected:Npn \seq_set_filter:NNn
+ { \__seq_set_filter:NNNn \__kernel_tl_set:Nx }
+\cs_new_protected:Npn \seq_gset_filter:NNn
+ { \__seq_set_filter:NNNn \__kernel_tl_gset:Nx }
+\cs_new_protected:Npn \__seq_set_filter:NNNn #1#2#3#4
+ {
+ \__seq_push_item_def:n { \bool_if:nT {#4} { \__seq_wrap_item:n {##1} } }
+ #1 #2 { #3 }
+ \__seq_pop_item_def:
+ }
\cs_new_protected:Npn \seq_concat:NNN #1#2#3
{ \tl_set:Nf #1 { \exp_after:wN \use_i:nn \exp_after:wN #2 #3 } }
\cs_new_protected:Npn \seq_gconcat:NNN #1#2#3
@@ -5551,7 +5559,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ TF , T , F , p }
\cs_new_protected:Npn \seq_put_left:Nn #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{
\exp_not:n { \s__seq \__seq_item:n {#2} }
\exp_not:f { \exp_after:wN \__seq_put_left_aux:w #1 }
@@ -5559,7 +5567,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \seq_gput_left:Nn #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{
\exp_not:n { \s__seq \__seq_item:n {#2} }
\exp_not:f { \exp_after:wN \__seq_put_left_aux:w #1 }
@@ -5597,9 +5605,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_generate_variant:Nn \seq_remove_duplicates:N { c }
\cs_generate_variant:Nn \seq_gremove_duplicates:N { c }
\cs_new_protected:Npn \seq_remove_all:Nn
- { \__seq_remove_all_aux:NNn \__kernel_tl_set:Ne }
+ { \__seq_remove_all_aux:NNn \__kernel_tl_set:Nx }
\cs_new_protected:Npn \seq_gremove_all:Nn
- { \__seq_remove_all_aux:NNn \__kernel_tl_gset:Ne }
+ { \__seq_remove_all_aux:NNn \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \__seq_remove_all_aux:NNn #1#2#3
{
\__seq_push_item_def:n
@@ -5626,15 +5634,15 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_generate_variant:Nn \seq_gremove_all:Nn { Nx , cx }
\cs_new_eq:NN \__seq_int_eval:w \tex_numexpr:D
\cs_new_protected:Npn \seq_set_item:Nnn #1#2#3
- { \__seq_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_set:Ne \use_i:nn }
+ { \__seq_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_set:Nx \use_i:nn }
\cs_new_protected:Npn \seq_gset_item:Nnn #1#2#3
- { \__seq_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_gset:Ne \use_i:nn }
+ { \__seq_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_gset:Nx \use_i:nn }
\cs_generate_variant:Nn \seq_set_item:Nnn { c }
\cs_generate_variant:Nn \seq_gset_item:Nnn { c }
\prg_new_protected_conditional:Npnn \seq_set_item:Nnn #1#2#3 { TF , T , F }
- { \__seq_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_set:Ne \use_ii:nn }
+ { \__seq_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_set:Nx \use_ii:nn }
\prg_new_protected_conditional:Npnn \seq_gset_item:Nnn #1#2#3 { TF , T , F }
- { \__seq_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_gset:Ne \use_ii:nn }
+ { \__seq_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_gset:Nx \use_ii:nn }
\prg_generate_conditional_variant:Nnn \seq_set_item:Nnn { c } { TF , T , F }
\prg_generate_conditional_variant:Nnn \seq_gset_item:Nnn { c } { TF , T , F }
\cs_new_protected:Npn \__seq_set_item:NnnNN #1#2#3
@@ -5691,9 +5699,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
#5 #2
}
\cs_new_protected:Npn \seq_reverse:N
- { \__seq_reverse:NN \__kernel_tl_set:Ne }
+ { \__seq_reverse:NN \__kernel_tl_set:Nx }
\cs_new_protected:Npn \seq_greverse:N
- { \__seq_reverse:NN \__kernel_tl_gset:Ne }
+ { \__seq_reverse:NN \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \__seq_reverse:NN #1 #2
{
\cs_set_eq:NN \__seq_tmp:w \__seq_item:n
@@ -5798,7 +5806,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \seq_get_left:NN #1#2
{
- \__kernel_tl_set:Ne #2
+ \__kernel_tl_set:Nx #2
{
\exp_after:wN \__seq_get_left:wnw
#1 \__seq_item:n { \q_no_value } \s__seq_stop
@@ -5823,7 +5831,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_generate_variant:Nn \seq_gpop_left:NN { c }
\cs_new_protected:Npn \seq_get_right:NN #1#2
{
- \__kernel_tl_set:Ne #2
+ \__kernel_tl_set:Nx #2
{
\exp_after:wN \use_i_ii:nnn
\exp_after:wN \__seq_get_right_loop:nw
@@ -5840,9 +5848,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_new:Npn \__seq_get_right_end:NnN #1#2#3 { \exp_not:n {#2} }
\cs_generate_variant:Nn \seq_get_right:NN { c }
\cs_new_protected:Npn \seq_pop_right:NN
- { \__seq_pop:NNNN \__seq_pop_right:NNN \__kernel_tl_set:Ne }
+ { \__seq_pop:NNNN \__seq_pop_right:NNN \__kernel_tl_set:Nx }
\cs_new_protected:Npn \seq_gpop_right:NN
- { \__seq_pop:NNNN \__seq_pop_right:NNN \__kernel_tl_gset:Ne }
+ { \__seq_pop:NNNN \__seq_pop_right:NNN \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \__seq_pop_right:NNN #1#2#3
{
\cs_set_eq:NN \__seq_tmp:w \__seq_item:n
@@ -5854,7 +5862,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
#2
{
\if_false: { \fi: }
- \__kernel_tl_set:Ne #3
+ \__kernel_tl_set:Nx #3
}
{ } \use_none:nn
\cs_set_eq:NN \__seq_item:n \__seq_tmp:w
@@ -5882,10 +5890,10 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ \__seq_pop_TF:NNNN \__seq_pop_left:NNN \tl_gset:Nn #1 #2 }
\prg_new_protected_conditional:Npnn \seq_pop_right:NN #1#2
{ T , F , TF }
- { \__seq_pop_TF:NNNN \__seq_pop_right:NNN \__kernel_tl_set:Ne #1 #2 }
+ { \__seq_pop_TF:NNNN \__seq_pop_right:NNN \__kernel_tl_set:Nx #1 #2 }
\prg_new_protected_conditional:Npnn \seq_gpop_right:NN #1#2
{ T , F , TF }
- { \__seq_pop_TF:NNNN \__seq_pop_right:NNN \__kernel_tl_gset:Ne #1 #2 }
+ { \__seq_pop_TF:NNNN \__seq_pop_right:NNN \__kernel_tl_gset:Nx #1 #2 }
\prg_generate_conditional_variant:Nnn \seq_pop_left:NN { c }
{ T , F , TF }
\prg_generate_conditional_variant:Nnn \seq_gpop_left:NN { c }
@@ -6071,9 +6079,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_generate_variant:Nn \seq_map_pairwise_function:NNN { Nc , c , cc }
\cs_new_protected:Npn \seq_set_map_e:NNn
- { \__seq_set_map_e:NNNn \__kernel_tl_set:Ne }
+ { \__seq_set_map_e:NNNn \__kernel_tl_set:Nx }
\cs_new_protected:Npn \seq_gset_map_e:NNn
- { \__seq_set_map_e:NNNn \__kernel_tl_gset:Ne }
+ { \__seq_set_map_e:NNNn \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \__seq_set_map_e:NNNn #1#2#3#4
{
\__seq_push_item_def:n { \exp_not:N \__seq_item:n {#4} }
@@ -6081,9 +6089,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
\__seq_pop_item_def:
}
\cs_new_protected:Npn \seq_set_map:NNn
- { \__seq_set_map:NNNn \__kernel_tl_set:Ne }
+ { \__seq_set_map:NNNn \__kernel_tl_set:Nx }
\cs_new_protected:Npn \seq_gset_map:NNn
- { \__seq_set_map:NNNn \__kernel_tl_gset:Ne }
+ { \__seq_set_map:NNNn \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \__seq_set_map:NNNn #1#2#3#4
{
\__seq_push_item_def:n { \exp_not:n { \__seq_item:n {#4} } }
@@ -7032,71 +7040,93 @@ Type H <return> for immediate help}\def~{\errmessage{%
\int_new:N \l__seq_internal_a_int
\int_new:N \l__seq_internal_b_int
%% File: l3flag.dtx
-\cs_new_protected:Npn \flag_new:n #1
+\cs_new_protected:Npn \flag_new:N #1
+ { \cs_new_protected:Npe #1 { \cs_to_str:N #1 } }
+\cs_generate_variant:Nn \flag_new:N { c }
+\flag_new:N \l_tmpa_flag
+\flag_new:N \l_tmpb_flag
+\cs_new_protected:Npn \flag_clear:N #1
+ {
+ \__flag_clear:wN 0 ; #1
+ \prg_break_point:
+ }
+\cs_generate_variant:Nn \flag_clear:N { c }
+\cs_new_protected:Npn \__flag_clear:wN #1 ; #2
{
- \cs_new:cpn { flag~#1 } ##1 ;
- { \exp_after:wN \use_none:n \cs:w flag~#1~##1 \cs_end: }
+ \if_cs_exist:w #2 #1 \cs_end: \else:
+ \prg_break:n
+ \fi:
+ \cs_set_eq:cN { #2 #1 } \tex_undefined:D
+ \exp_after:wN \__flag_clear:wN
+ \int_value:w \int_eval:w \c_one_int + #1 ; #2
}
-\cs_new_protected:Npn \flag_clear:n #1 { \__flag_clear:wn 0 ; {#1} }
-\cs_new_protected:Npn \__flag_clear:wn #1 ; #2
+\cs_new_protected:Npn \flag_clear_new:N #1
+ { \flag_if_exist:NTF #1 { \flag_clear:N } { \flag_new:N } #1 }
+\cs_generate_variant:Nn \flag_clear_new:N { c }
+\cs_new_protected:Npn \flag_show:N { \__flag_show:NN \tl_show:n }
+\cs_generate_variant:Nn \flag_show:N { c }
+\cs_new_protected:Npn \flag_log:N { \__flag_show:NN \tl_log:n }
+\cs_generate_variant:Nn \flag_log:N { c }
+\cs_new_protected:Npn \__flag_show:NN #1#2
{
- \if_cs_exist:w flag~#2~#1 \cs_end:
- \cs_set_eq:cN { flag~#2~#1 } \tex_undefined:D
- \exp_after:wN \__flag_clear:wn
- \int_value:w \int_eval:w 1 + #1
+ \__kernel_chk_defined:NT #2
+ { \exp_args:Ne #1 { \tl_to_str:n { #2 height } = \flag_height:N #2 } }
+ }
+\prg_new_eq_conditional:NNn \flag_if_exist:N \cs_if_exist:N
+ { TF , T , F , p }
+\prg_new_eq_conditional:NNn \flag_if_exist:c \cs_if_exist:c
+ { TF , T , F , p }
+\prg_new_conditional:Npnn \flag_if_raised:N #1 { p , T , F , TF }
+ {
+ \if_cs_exist:w #1 0 \cs_end:
+ \prg_return_true:
\else:
- \use_i:nnn
+ \prg_return_false:
\fi:
- ; {#2}
}
-\cs_new_protected:Npn \flag_clear_new:n #1
- { \flag_if_exist:nTF {#1} { \flag_clear:n } { \flag_new:n } {#1} }
+\prg_generate_conditional_variant:Nnn \flag_if_raised:N
+ { c } { p , T , F , TF }
+\cs_new:Npn \flag_height:N #1 { \__flag_height_loop:wN 0; #1 }
+\cs_new:Npn \__flag_height_loop:wN #1 ; #2
+ {
+ \if_cs_exist:w #2 #1 \cs_end: \else:
+ \exp_after:wN \__flag_height_end:wN
+ \fi:
+ \exp_after:wN \__flag_height_loop:wN
+ \int_value:w \int_eval:w \c_one_int + #1 ; #2
+ }
+\cs_new:Npn \__flag_height_end:wN #1 + #2 ; #3 {#2}
+\cs_generate_variant:Nn \flag_height:N { c }
+\cs_new:Npn \flag_raise:N #1
+ { \exp_after:wN \use_none:n \cs:w #1 \flag_height:N #1 \cs_end: }
+\cs_generate_variant:Nn \flag_raise:N { c }
+\cs_new:Npn \flag_ensure_raised:N #1
+ { \exp_after:wN \use_none:n \cs:w #1 0 \cs_end: }
+\cs_generate_variant:Nn \flag_ensure_raised:N { c }
+\cs_new_protected:Npn \flag_new:n #1 { \flag_new:c { l_#1_flag } }
+\cs_new_protected:Npn \flag_clear:n #1 { \flag_clear:c { l_#1_flag } }
+\cs_new_protected:Npn \flag_clear_new:n #1 { \flag_clear_new:c { l_#1_flag } }
+\cs_new:Npn \flag_if_exist_p:n #1 { \flag_if_exist_p:c { l_#1_flag } }
+\cs_new:Npn \flag_if_exist:nT #1 { \flag_if_exist:cT { l_#1_flag } }
+\cs_new:Npn \flag_if_exist:nF #1 { \flag_if_exist:cF { l_#1_flag } }
+\cs_new:Npn \flag_if_exist:nTF #1 { \flag_if_exist:cTF { l_#1_flag } }
+\cs_new:Npn \flag_if_raised_p:n #1 { \flag_if_raised_p:c { l_#1_flag } }
+\cs_new:Npn \flag_if_raised:nT #1 { \flag_if_raised:cT { l_#1_flag } }
+\cs_new:Npn \flag_if_raised:nF #1 { \flag_if_raised:cF { l_#1_flag } }
+\cs_new:Npn \flag_if_raised:nTF #1 { \flag_if_raised:cTF { l_#1_flag } }
+\cs_new:Npn \flag_height:n #1 { \flag_height:c { l_#1_flag } }
+\cs_new:Npn \flag_raise:n #1 { \flag_raise:c { l_#1_flag } }
+\cs_new:Npn \flag_ensure_raised:n #1 { \flag_ensure_raised:c { l_#1_flag } }
\cs_new_protected:Npn \flag_show:n { \__flag_show:Nn \tl_show:n }
\cs_new_protected:Npn \flag_log:n { \__flag_show:Nn \tl_log:n }
\cs_new_protected:Npn \__flag_show:Nn #1#2
{
- \exp_args:Nc \__kernel_chk_defined:NT { flag~#2 }
+ \exp_args:Nc \__kernel_chk_defined:NT { l_#2_flag }
{
\exp_args:Ne #1
{ \tl_to_str:n { flag~#2~height } = \flag_height:n {#2} }
}
}
-\prg_new_conditional:Npnn \flag_if_exist:n #1 { p , T , F , TF }
- {
- \cs_if_exist:cTF { flag~#1 }
- { \prg_return_true: } { \prg_return_false: }
- }
-\prg_new_conditional:Npnn \flag_if_raised:n #1 { p , T , F , TF }
- {
- \if_cs_exist:w flag~#1~0 \cs_end:
- \prg_return_true:
- \else:
- \prg_return_false:
- \fi:
- }
-\cs_new:Npn \flag_height:n #1 { \__flag_height_loop:wn 0; {#1} }
-\cs_new:Npn \__flag_height_loop:wn #1 ; #2
- {
- \if_cs_exist:w flag~#2~#1 \cs_end:
- \exp_after:wN \__flag_height_loop:wn \int_value:w \int_eval:w 1 +
- \else:
- \exp_after:wN \__flag_height_end:wn
- \fi:
- #1 ; {#2}
- }
-\cs_new:Npn \__flag_height_end:wn #1 ; #2 {#1}
-\cs_new:Npn \flag_raise:n #1
- {
- \cs:w flag~#1 \exp_after:wN \cs_end:
- \int_value:w \flag_height:n {#1} ;
- }
-\cs_new:Npn \flag_ensure_raised:n #1
- {
- \if_cs_exist:w flag~#1~0 \cs_end:
- \else:
- \cs:w flag~#1 \cs_end: 0 ;
- \fi:
- }
%% File: l3prg.dtx
\cs_new_eq:NN \if_predicate:w \tex_ifodd:D
\cs_new_protected:Npn \bool_new:N #1 { \cs_new_eq:NN #1 \c_false_bool }
@@ -7439,9 +7469,10 @@ Type H <return> for immediate help}\def~{\errmessage{%
\tex_catcode:D `\^^@ = 2 \exp_stop_f:
\cs_new:Npn \group_align_safe_begin:
{ \exp:w \if_false: { \fi: `^^@ \exp_stop_f: }
-\group_end:
+\tex_catcode:D `\^^@ = 1 \exp_stop_f:
\cs_new:Npn \group_align_safe_end:
- { \if_int_compare:w `{ = \c_zero_int } \fi: }
+ { \exp:w `^^@ \if_false: } \fi: \exp_stop_f: }
+\group_end:
\int_new:N \g__kernel_prg_map_int
%% File: l3sys.dtx
\cs_new_protected:Npn \__sys_const:nn #1#2
@@ -7864,7 +7895,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\tl_new:N \g__sys_backend_tl
\__sys_finalise:n
{
- \__kernel_tl_gset:Ne \g__sys_backend_tl
+ \__kernel_tl_gset:Nx \g__sys_backend_tl
{
\sys_if_engine_xetex:TF
{ xetex }
@@ -7982,9 +8013,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_new_eq:NN \clist_gset_eq:cN \tl_gset_eq:cN
\cs_new_eq:NN \clist_gset_eq:cc \tl_gset_eq:cc
\cs_new_protected:Npn \clist_set_from_seq:NN
- { \__clist_set_from_seq:NNNN \clist_clear:N \__kernel_tl_set:Ne }
+ { \__clist_set_from_seq:NNNN \clist_clear:N \__kernel_tl_set:Nx }
\cs_new_protected:Npn \clist_gset_from_seq:NN
- { \__clist_set_from_seq:NNNN \clist_gclear:N \__kernel_tl_gset:Ne }
+ { \__clist_set_from_seq:NNNN \clist_gclear:N \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \__clist_set_from_seq:NNNN #1#2#3#4
{
\seq_if_empty:NTF #4
@@ -8009,9 +8040,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_generate_variant:Nn \clist_gset_from_seq:NN { Nc }
\cs_generate_variant:Nn \clist_gset_from_seq:NN { c , cc }
\cs_new_protected:Npn \clist_concat:NNN
- { \__clist_concat:NNNN \__kernel_tl_set:Ne }
+ { \__clist_concat:NNNN \__kernel_tl_set:Nx }
\cs_new_protected:Npn \clist_gconcat:NNN
- { \__clist_concat:NNNN \__kernel_tl_gset:Ne }
+ { \__clist_concat:NNNN \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \__clist_concat:NNNN #1#2#3#4
{
#1 #2
@@ -8028,9 +8059,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
\prg_new_eq_conditional:NNn \clist_if_exist:c \cs_if_exist:c
{ TF , T , F , p }
\cs_new_protected:Npn \clist_set:Nn #1#2
- { \__kernel_tl_set:Ne #1 { \__clist_sanitize:n {#2} } }
+ { \__kernel_tl_set:Nx #1 { \__clist_sanitize:n {#2} } }
\cs_new_protected:Npn \clist_gset:Nn #1#2
- { \__kernel_tl_gset:Ne #1 { \__clist_sanitize:n {#2} } }
+ { \__kernel_tl_gset:Nx #1 { \__clist_sanitize:n {#2} } }
\cs_generate_variant:Nn \clist_set:Nn { NV , Ne , c , cV , ce }
\cs_generate_variant:Nn \clist_set:Nn { No , Nx , co , cx }
\cs_generate_variant:Nn \clist_gset:Nn { NV , Ne , c , cV , ce }
@@ -8077,9 +8108,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ \tl_set:Nn #3 {#1} }
\cs_generate_variant:Nn \clist_get:NN { c }
\cs_new_protected:Npn \clist_pop:NN
- { \__clist_pop:NNN \__kernel_tl_set:Ne }
+ { \__clist_pop:NNN \__kernel_tl_set:Nx }
\cs_new_protected:Npn \clist_gpop:NN
- { \__clist_pop:NNN \__kernel_tl_gset:Ne }
+ { \__clist_pop:NNN \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \__clist_pop:NNN #1#2#3
{
\if_meaning:w #2 \c_empty_clist
@@ -8113,9 +8144,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\prg_generate_conditional_variant:Nnn \clist_get:NN { c } { T , F , TF }
\prg_new_protected_conditional:Npnn \clist_pop:NN #1#2 { T , F , TF }
- { \__clist_pop_TF:NNN \__kernel_tl_set:Ne #1 #2 }
+ { \__clist_pop_TF:NNN \__kernel_tl_set:Nx #1 #2 }
\prg_new_protected_conditional:Npnn \clist_gpop:NN #1#2 { T , F , TF }
- { \__clist_pop_TF:NNN \__kernel_tl_gset:Ne #1 #2 }
+ { \__clist_pop_TF:NNN \__kernel_tl_gset:Nx #1 #2 }
\cs_new_protected:Npn \__clist_pop_TF:NNN #1#2#3
{
\if_meaning:w #2 \c_empty_clist
@@ -8156,9 +8187,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_generate_variant:Nn \clist_remove_duplicates:N { c }
\cs_generate_variant:Nn \clist_gremove_duplicates:N { c }
\cs_new_protected:Npn \clist_remove_all:Nn
- { \__clist_remove_all:NNNn \clist_set_from_seq:NN \__kernel_tl_set:Ne }
+ { \__clist_remove_all:NNNn \clist_set_from_seq:NN \__kernel_tl_set:Nx }
\cs_new_protected:Npn \clist_gremove_all:Nn
- { \__clist_remove_all:NNNn \clist_gset_from_seq:NN \__kernel_tl_gset:Ne }
+ { \__clist_remove_all:NNNn \clist_gset_from_seq:NN \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \__clist_remove_all:NNNn #1#2#3#4
{
\__clist_if_wrap:nTF {#4}
@@ -8195,9 +8226,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_generate_variant:Nn \clist_remove_all:Nn { c , NV , cV }
\cs_generate_variant:Nn \clist_gremove_all:Nn { c , NV , cV }
\cs_new_protected:Npn \clist_reverse:N #1
- { \__kernel_tl_set:Ne #1 { \exp_args:No \clist_reverse:n {#1} } }
+ { \__kernel_tl_set:Nx #1 { \exp_args:No \clist_reverse:n {#1} } }
\cs_new_protected:Npn \clist_greverse:N #1
- { \__kernel_tl_gset:Ne #1 { \exp_args:No \clist_reverse:n {#1} } }
+ { \__kernel_tl_gset:Nx #1 { \exp_args:No \clist_reverse:n {#1} } }
\cs_generate_variant:Nn \clist_reverse:N { c }
\cs_generate_variant:Nn \clist_greverse:N { c }
\cs_new:Npn \clist_reverse:n #1
@@ -9580,8 +9611,8 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\prg_generate_conditional_variant:Nnn \prop_pop:NnN { NV , c , cV } { T , F , TF }
\prg_generate_conditional_variant:Nnn \prop_gpop:NnN { NV , c , cV } { T , F , TF }
-\cs_new_protected:Npn \prop_put:Nnn { \__prop_put:NNnn \__kernel_tl_set:Ne }
-\cs_new_protected:Npn \prop_gput:Nnn { \__prop_put:NNnn \__kernel_tl_gset:Ne }
+\cs_new_protected:Npn \prop_put:Nnn { \__prop_put:NNnn \__kernel_tl_set:Nx }
+\cs_new_protected:Npn \prop_gput:Nnn { \__prop_put:NNnn \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \__prop_put:NNnn #1#2#3#4
{
\tl_set:Nn \l__prop_internal_tl
@@ -9622,9 +9653,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_generate_variant:Nn \prop_gput:Nnn
{ cno , co , coo , cnx , cVx , cxV , cxx }
\cs_new_protected:Npn \prop_put_if_new:Nnn
- { \__prop_put_if_new:NNnn \__kernel_tl_set:Ne }
+ { \__prop_put_if_new:NNnn \__kernel_tl_set:Nx }
\cs_new_protected:Npn \prop_gput_if_new:Nnn
- { \__prop_put_if_new:NNnn \__kernel_tl_gset:Ne }
+ { \__prop_put_if_new:NNnn \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \__prop_put_if_new:NNnn #1#2#3#4
{
\tl_set:Nn \l__prop_internal_tl
@@ -10755,7 +10786,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ \__ior_open_stream:Nn #1 {#2} }
{
\__ior_new:N #1
- \__kernel_tl_set:Ne \l__ior_stream_tl { \int_eval:n {#1} }
+ \__kernel_tl_set:Nx \l__ior_stream_tl { \int_eval:n {#1} }
\__ior_open_stream:Nn #1 {#2}
}
}
@@ -10993,14 +11024,14 @@ Type H <return> for immediate help}\def~{\errmessage{%
\tl_new:N \l__iow_file_name_tl
\cs_new_protected:Npn \iow_open:Nn #1#2
{
- \__kernel_tl_set:Ne \l__iow_file_name_tl
+ \__kernel_tl_set:Nx \l__iow_file_name_tl
{ \__kernel_file_name_sanitize:n {#2} }
\iow_close:N #1
\seq_gpop:NNTF \g__iow_streams_seq \l__iow_stream_tl
{ \__iow_open_stream:NV #1 \l__iow_file_name_tl }
{
\__iow_new:N #1
- \__kernel_tl_set:Ne \l__iow_stream_tl { \int_eval:n {#1} }
+ \__kernel_tl_set:Nx \l__iow_stream_tl { \int_eval:n {#1} }
\__iow_open_stream:NV #1 \l__iow_file_name_tl
}
}
@@ -11113,7 +11144,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_new:Npn \__iow_unindent:w { }
\cs_new_protected:Npn \__iow_set_indent:n #1
{
- \__kernel_tl_set:Ne \l__iow_one_indent_tl
+ \__kernel_tl_set:Nx \l__iow_one_indent_tl
{ \exp_args:No \__kernel_str_to_other_fast:n { \tl_to_str:n {#1} } }
\int_set:Nn \l__iow_one_indent_int
{ \str_count:N \l__iow_one_indent_tl }
@@ -11188,11 +11219,11 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_set_eq:NN \iow_indent:n \__iow_indent:n
#3
\cs_set_eq:NN \protect \token_to_str:N
- \__kernel_tl_set:Ne \l__iow_wrap_tl {#1}
+ \__kernel_tl_set:Nx \l__iow_wrap_tl {#1}
\cs_set_eq:NN \iow_wrap_allow_break: \__iow_wrap_allow_break_error:
\cs_set_eq:NN \iow_indent:n \__iow_indent_error:n
- \__kernel_tl_set:Ne \l__iow_newline_tl { \iow_newline: #2 }
- \__kernel_tl_set:Ne \l__iow_newline_tl { \tl_to_str:N \l__iow_newline_tl }
+ \__kernel_tl_set:Nx \l__iow_newline_tl { \iow_newline: #2 }
+ \__kernel_tl_set:Nx \l__iow_newline_tl { \tl_to_str:N \l__iow_newline_tl }
\int_set:Nn \l__iow_line_target_int
{ \l_iow_line_count_int - \str_count:N \l__iow_newline_tl + 1 }
\int_compare:nNnT { \l__iow_line_target_int } < 0
@@ -11208,12 +11239,12 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_generate_variant:Nn \iow_wrap:nnnN { ne }
\cs_new_protected:Npn \__iow_wrap_do:
{
- \__kernel_tl_set:Ne \l__iow_wrap_tl
+ \__kernel_tl_set:Nx \l__iow_wrap_tl
{
\exp_args:No \__kernel_str_to_other_fast:n \l__iow_wrap_tl
\c__iow_wrap_end_marker_tl
}
- \__kernel_tl_set:Ne \l__iow_wrap_tl
+ \__kernel_tl_set:Nx \l__iow_wrap_tl
{
\exp_after:wN \__iow_wrap_fix_newline:w \l__iow_wrap_tl
^^J \q__iow_nil ^^J \s__iow_stop
@@ -11371,7 +11402,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \__iow_wrap_allow_break:n #1
{
- \__kernel_tl_set:Ne \l__iow_line_tl
+ \__kernel_tl_set:Nx \l__iow_line_tl
{ \l__iow_line_tl \__iow_wrap_trim:N \l__iow_line_part_tl }
\bool_set_false:N \l__iow_line_break_bool
\tl_if_empty:NTF \l__iow_line_part_tl
@@ -11391,7 +11422,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\tl_put_right:Ne \l__iow_line_tl { \l__iow_line_part_tl }
\bool_set_false:N \l__iow_line_break_bool
\int_sub:Nn \l__iow_indent_int { \l__iow_one_indent_int }
- \__kernel_tl_set:Ne \l__iow_indent_tl
+ \__kernel_tl_set:Nx \l__iow_indent_tl
{ \exp_after:wN \__iow_unindent:w \l__iow_indent_tl }
\__iow_wrap_chunk:nw {#1}
}
@@ -11410,9 +11441,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \__iow_wrap_store_do:n #1
{
- \__kernel_tl_set:Ne \l__iow_line_tl
+ \__kernel_tl_set:Nx \l__iow_line_tl
{ \l__iow_line_tl \l__iow_line_part_tl }
- \__kernel_tl_set:Ne \l__iow_wrap_tl
+ \__kernel_tl_set:Nx \l__iow_wrap_tl
{
\l__iow_wrap_tl
\l__iow_newline_tl
@@ -11715,7 +11746,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_generate_variant:Nn \file_get_full_name:nN { V }
\prg_new_protected_conditional:Npnn \file_get_full_name:nN #1#2 { T , F , TF }
{
- \__kernel_tl_set:Ne #2
+ \__kernel_tl_set:Nx #2
{ \file_full_name:n {#1} }
\tl_if_empty:NTF #2
{ \prg_return_false: }
@@ -11842,7 +11873,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ V } { T , F , TF }
\cs_new_protected:Npn \__file_get_details:nnN #1#2#3
{
- \__kernel_tl_set:Ne #3
+ \__kernel_tl_set:Nx #3
{ \use:c { file_ #2 :n } {#1} }
\tl_if_empty:NTF #3
{ \prg_return_false: }
@@ -11857,7 +11888,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\prg_new_protected_conditional:Npnn \file_get_hex_dump:nnnN #1#2#3#4
{ T , F , TF }
{
- \__kernel_tl_set:Ne #4
+ \__kernel_tl_set:Nx #4
{ \file_hex_dump:nnn {#1} {#2} {#3} }
\tl_if_empty:NTF #4
{ \prg_return_false: }
@@ -13116,6 +13147,14 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ \use:n }
{#1}
}
+\cs_new_protected:Npn \__keys_cs_undefine:c #1
+ {
+ \if_cs_exist:w #1 \cs_end:
+ \else:
+ \use_i:nnnn
+ \fi:
+ \cs_set_eq:cN {#1} \tex_undefined:D
+ }
\cs_new_protected:Npn \keys_define:nn
{ \__keys_define:onn \l__keys_module_str }
\cs_generate_variant:Nn \keys_define:nn { ne , nx }
@@ -13300,9 +13339,8 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\tl_if_empty:nTF {#1}
{
- \cs_set_eq:cN
+ \__keys_cs_undefine:c
{ \c__keys_default_root_str \l_keys_path_str }
- \tex_undefined:D
}
{
\cs_set_nopar:cpe
@@ -13313,11 +13351,11 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \__keys_groups_set:n #1
{
- \clist_set:Nn \l__keys_groups_clist {#1}
+ \clist_set:Ne \l__keys_groups_clist { \tl_to_str:n {#1} }
\clist_if_empty:NTF \l__keys_groups_clist
{
- \cs_set_eq:cN { \c__keys_groups_root_str \l_keys_path_str }
- \tex_undefined:D
+ \__keys_cs_undefine:c
+ { \c__keys_groups_root_str \l_keys_path_str }
}
{
\cs_set_eq:cN { \c__keys_groups_root_str \l_keys_path_str }
@@ -13404,9 +13442,8 @@ Type H <return> for immediate help}\def~{\errmessage{%
\clist_map_inline:nn
{ code , default , groups , inherit , type , check }
{
- \cs_set_eq:cN
+ \__keys_cs_undefine:c
{ \tl_use:c { c__keys_ ##1 _root_str } \l_keys_path_str }
- \tex_undefined:D
}
}
\cs_new_protected:Npn \__keys_value_requirement:nn #1#2
@@ -13425,9 +13462,8 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ \c__keys_check_root_str \l_keys_path_str }
{ __keys_check_ #1 : }
{
- \cs_set_eq:cN
+ \__keys_cs_undefine:c
{ \c__keys_check_root_str \l_keys_path_str }
- \tex_undefined:D
}
}
}
@@ -13753,8 +13789,8 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\clist_clear:N \l__keys_unused_clist
\__keys_set_known:nnn {#2} {#3} {#4}
- \__kernel_tl_set:Ne #5 { \exp_not:o \l__keys_unused_clist }
- \__kernel_tl_set:Ne \l__keys_unused_clist { \exp_not:n {#1} }
+ \__kernel_tl_set:Nx #5 { \exp_not:o \l__keys_unused_clist }
+ \__kernel_tl_set:Nx \l__keys_unused_clist { \exp_not:n {#1} }
}
\cs_new_protected:Npn \keys_set_known:nn #1#2
{ \__keys_set_known:nnn \q__keys_no_value {#1} {#2} }
@@ -13778,30 +13814,30 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ \exp_not:o \l__keys_relative_tl }
}
}
-\cs_new_protected:Npn \keys_set_filter:nnnN #1#2#3#4
+\cs_new_protected:Npn \keys_set_exclude_groups:nnnN #1#2#3#4
{
- \exp_args:No \__keys_set_filter:nnnnnN
+ \exp_args:No \__keys_set_exclude_groups:nnnnnN
\l__keys_unused_clist
\q__keys_no_value {#1} {#2} {#3} #4
}
-\cs_generate_variant:Nn \keys_set_filter:nnnN { nnV , nnv , nno }
-\cs_new_protected:Npn \keys_set_filter:nnnnN #1#2#3#4#5
+\cs_generate_variant:Nn \keys_set_exclude_groups:nnnN { nnV , nnv , nno }
+\cs_new_protected:Npn \keys_set_exclude_groups:nnnnN #1#2#3#4#5
{
- \exp_args:No \__keys_set_filter:nnnnnN
+ \exp_args:No \__keys_set_exclude_groups:nnnnnN
\l__keys_unused_clist {#4} {#1} {#2} {#3} #5
}
-\cs_generate_variant:Nn \keys_set_filter:nnnnN { nnV , nnv , nno }
-\cs_new_protected:Npn \__keys_set_filter:nnnnnN #1#2#3#4#5#6
+\cs_generate_variant:Nn \keys_set_exclude_groups:nnnnN { nnV , nnv , nno }
+\cs_new_protected:Npn \__keys_set_exclude_groups:nnnnnN #1#2#3#4#5#6
{
\clist_clear:N \l__keys_unused_clist
- \__keys_set_filter:nnnn {#2} {#3} {#4} {#5}
- \__kernel_tl_set:Ne #6 { \exp_not:o \l__keys_unused_clist }
- \__kernel_tl_set:Ne \l__keys_unused_clist { \exp_not:n {#1} }
+ \__keys_set_exclude_groups:nnnn {#2} {#3} {#4} {#5}
+ \__kernel_tl_set:Nx #6 { \exp_not:o \l__keys_unused_clist }
+ \__kernel_tl_set:Nx \l__keys_unused_clist { \exp_not:n {#1} }
}
-\cs_new_protected:Npn \keys_set_filter:nnn #1#2#3
- {\__keys_set_filter:nnnn \q__keys_no_value {#1} {#2} {#3} }
-\cs_generate_variant:Nn \keys_set_filter:nnn { nnV , nnv , nno }
-\cs_new_protected:Npn \__keys_set_filter:nnnn #1#2#3#4
+\cs_new_protected:Npn \keys_set_exclude_groups:nnn #1#2#3
+ {\__keys_set_exclude_groups:nnnn \q__keys_no_value {#1} {#2} {#3} }
+\cs_generate_variant:Nn \keys_set_exclude_groups:nnn { nnV , nnv , nno }
+\cs_new_protected:Npn \__keys_set_exclude_groups:nnnn #1#2#3#4
{
\use:e
{
@@ -13845,7 +13881,8 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ \exp_args:No \__keys_set_selective:nnnn \l__keys_selective_seq }
\cs_new_protected:Npn \__keys_set_selective:nnnn #1#2#3#4
{
- \seq_set_from_clist:Nn \l__keys_selective_seq {#3}
+ \exp_args:NNe \seq_set_from_clist:Nn
+ \l__keys_selective_seq { \tl_to_str:n {#3} }
\__keys_set:nn {#2} {#4}
\tl_set:Nn \l__keys_selective_seq {#1}
}
@@ -13869,7 +13906,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \__keys_set_keyval:nnn #1#2#3
{
- \__kernel_tl_set:Ne \l_keys_path_str
+ \__kernel_tl_set:Nx \l_keys_path_str
{
\tl_if_blank:nF {#1}
{ #1 / }
@@ -13932,13 +13969,10 @@ Type H <return> for immediate help}\def~{\errmessage{%
\bool_set_false:N \l__keys_tmp_bool
\seq_map_inline:Nn \l__keys_selective_seq
{
- \clist_map_inline:Nn \l__keys_groups_clist
+ \clist_if_in:NnT \l__keys_groups_clist {##1}
{
- \str_if_eq:nnT {##1} {####1}
- {
- \bool_set_true:N \l__keys_tmp_bool
- \clist_map_break:n \seq_map_break:
- }
+ \bool_set_true:N \l__keys_tmp_bool
+ \seq_map_break:
}
}
\bool_if:NTF \l__keys_tmp_bool
@@ -14079,7 +14113,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \__keys_store_unused_aux:
{
- \__kernel_tl_set:Ne \l__keys_relative_tl
+ \__kernel_tl_set:Nx \l__keys_relative_tl
{ \exp_args:No \__keys_trim_spaces:n \l__keys_relative_tl }
\use:e
{
@@ -14966,10 +15000,10 @@ Type H <return> for immediate help}\def~{\errmessage{%
\prop_gput:Nnn \g_msg_module_name_prop { fp } { LaTeX }
\prop_gput:Nnn \g_msg_module_type_prop { fp } { }
%% File: l3fp-traps.dtx
-\flag_new:n { fp_invalid_operation }
-\flag_new:n { fp_division_by_zero }
-\flag_new:n { fp_overflow }
-\flag_new:n { fp_underflow }
+\flag_new:N \l_fp_invalid_operation_flag
+\flag_new:N \l_fp_division_by_zero_flag
+\flag_new:N \l_fp_overflow_flag
+\flag_new:N \l_fp_underflow_flag
\cs_new_protected:Npn \fp_trap:nn #1#2
{
\cs_if_exist_use:cF { __fp_trap_#1_set_#2: }
@@ -15000,7 +15034,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
#1
\__fp_error:nnfn { invalid } {##2} { \fp_to_tl:n { ##3; } } { }
- \flag_ensure_raised:n { fp_invalid_operation }
+ \flag_ensure_raised:N \l_fp_invalid_operation_flag
##1
}
\exp_args:Nno \use:n
@@ -15009,7 +15043,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
#1
\__fp_error:nffn { invalid-ii }
{ \fp_to_tl:n { ##2; } } { \fp_to_tl:n { ##3; } } {##1}
- \flag_ensure_raised:n { fp_invalid_operation }
+ \flag_ensure_raised:N \l_fp_invalid_operation_flag
\exp_after:wN \c_nan_fp
}
\exp_args:Nno \use:n
@@ -15017,7 +15051,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
#1
\__fp_error:nffn { invalid } {##1} {##2} { }
- \flag_ensure_raised:n { fp_invalid_operation }
+ \flag_ensure_raised:N \l_fp_invalid_operation_flag
\exp_after:wN \c_nan_fp
}
}
@@ -15034,7 +15068,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
#1
\__fp_error:nnfn { zero-div } {##2} { \fp_to_tl:n { ##3; } } { }
- \flag_ensure_raised:n { fp_division_by_zero }
+ \flag_ensure_raised:N \l_fp_division_by_zero_flag
\exp_after:wN ##1
}
\exp_args:Nno \use:n
@@ -15043,7 +15077,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
#1
\__fp_error:nffn { zero-div-ii }
{ \fp_to_tl:n { ##3; } } { \fp_to_tl:n { ##4; } } {##2}
- \flag_ensure_raised:n { fp_division_by_zero }
+ \flag_ensure_raised:N \l_fp_division_by_zero_flag
\exp_after:wN ##1
}
}
@@ -15074,7 +15108,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ \fp_to_tl:n { \s__fp \__fp_chk:w ##1##2##3; } }
{ \token_if_eq_meaning:NNF 0 ##2 { - } #4 }
{#2}
- \flag_ensure_raised:n { fp_#2 }
+ \flag_ensure_raised:c { l_fp_#2_flag }
#3 ##2
}
}
@@ -16782,9 +16816,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ \cs_new_eq:NN #1 \c_zero_fp }
\cs_generate_variant:Nn \fp_new:N {c}
\cs_new_protected:Npn \fp_set:Nn #1#2
- { \__kernel_tl_set:Ne #1 { \exp_not:f { \__fp_parse:n {#2} } } }
+ { \__kernel_tl_set:Nx #1 { \exp_not:f { \__fp_parse:n {#2} } } }
\cs_new_protected:Npn \fp_gset:Nn #1#2
- { \__kernel_tl_gset:Ne #1 { \exp_not:f { \__fp_parse:n {#2} } } }
+ { \__kernel_tl_gset:Nx #1 { \exp_not:f { \__fp_parse:n {#2} } } }
\cs_new_protected:Npn \fp_const:Nn #1#2
{ \tl_const:Ne #1 { \exp_not:f { \__fp_parse:n {#2} } } }
\cs_generate_variant:Nn \fp_set:Nn {c}
@@ -21110,7 +21144,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\__fp_variable_set_parsing:Nn \cs_gset_eq:NN {#1}
}
}
-\flag_new:n { __fp_symbolic }
+\flag_new:N \l__fp_symbolic_flag
\cs_new_protected:Npn \fp_set_variable:nn #1
{
\exp_args:No \__fp_set_variable:nn { \tl_to_str:n {#1} }
@@ -21123,10 +21157,10 @@ Type H <return> for immediate help}\def~{\errmessage{%
\__fp_variable_set_parsing:Nn \cs_set_eq:NN {#1}
\fp_set:Nn \l__fp_symbolic_fp {#2}
\cs_set_nopar:cpn { l__fp_variable_#1_fp }
- { \flag_ensure_raised:n { __fp_symbolic } \c_nan_fp }
- \flag_clear:n { __fp_symbolic }
+ { \flag_ensure_raised:N \l__fp_symbolic_flag \c_nan_fp }
+ \flag_clear:N \l__fp_symbolic_flag
\fp_set:cn { l__fp_variable_#1_fp } { \l__fp_symbolic_fp }
- \flag_if_raised:nT { __fp_symbolic }
+ \flag_if_raised:NT \l__fp_symbolic_flag
{
\msg_error:nneee { fp } { id-loop }
{ #1 }
@@ -22207,7 +22241,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\group_begin:
\__sort_main:NNNn \tl_map_inline:Nn \tl_map_break:n #2 {#3}
- \__kernel_tl_gset:Ne \g__sort_internal_tl
+ \__kernel_tl_gset:Nx \g__sort_internal_tl
{ \__sort_tl_toks:w \l__sort_min_int ; }
\group_end:
#1 #2 \g__sort_internal_tl
@@ -22550,8 +22584,8 @@ Type H <return> for immediate help}\def~{\errmessage{%
\prop_gput:Nnn \g__str_alias_prop { default } { utf8 }
}
\bool_new:N \g__str_error_bool
-\flag_new:n { __str_byte }
-\flag_new:n { __str_error }
+\flag_new:N \l__str_byte_flag
+\flag_new:N \l__str_error_flag
\prg_new_conditional:Npnn \__str_if_contains_char:Nn #1#2 { T , TF }
{
\exp_after:wN \__str_if_contains_char_aux:nn \exp_after:wN {#1} {#2}
@@ -22604,7 +22638,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\fi:
}
\group_begin:
- \__kernel_tl_set:Ne \l__str_internal_tl { \tl_to_str:n { 0123456789ABCDEF } }
+ \__kernel_tl_set:Nx \l__str_internal_tl { \tl_to_str:n { 0123456789ABCDEF } }
\tl_map_inline:Nn \l__str_internal_tl
{
\tl_map_inline:Nn \l__str_internal_tl
@@ -22649,7 +22683,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \__str_convert_gmap:N #1
{
- \__kernel_tl_gset:Ne \g__str_result_tl
+ \__kernel_tl_gset:Nx \g__str_result_tl
{
\exp_after:wN \__str_convert_gmap_loop:NN
\exp_after:wN #1
@@ -22665,7 +22699,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \__str_convert_gmap_internal:N #1
{
- \__kernel_tl_gset:Ne \g__str_result_tl
+ \__kernel_tl_gset:Nx \g__str_result_tl
{
\exp_after:wN \__str_convert_gmap_internal_loop:Nww
\exp_after:wN #1
@@ -22679,16 +22713,16 @@ Type H <return> for immediate help}\def~{\errmessage{%
#1 {#3}
\__str_convert_gmap_internal_loop:Nww #1
}
-\cs_new_protected:Npn \__str_if_flag_error:nne #1
+\cs_new_protected:Npn \__str_if_flag_error:Nne #1
{
- \flag_if_raised:nTF {#1}
+ \flag_if_raised:NTF #1
{ \msg_error:nne { str } }
{ \use_none:nn }
}
-\cs_new_protected:Npn \__str_if_flag_no_error:nne #1#2#3
- { \flag_if_raised:nT {#1} { \bool_gset_true:N \g__str_error_bool } }
-\cs_new:Npn \__str_if_flag_times:nT #1#2
- { \flag_if_raised:nT {#1} { #2~(x \flag_height:n {#1} ) } }
+\cs_new_protected:Npn \__str_if_flag_no_error:Nne #1#2#3
+ { \flag_if_raised:NT #1 { \bool_gset_true:N \g__str_error_bool } }
+\cs_new:Npn \__str_if_flag_times:NT #1#2
+ { \flag_if_raised:NT #1 { #2~(x \flag_height:N #1 ) } }
\cs_new_protected:Npn \str_set_convert:Nnnn
{ \__str_convert:nNNnnn { } \tl_set_eq:NN }
\cs_new_protected:Npn \str_gset_convert:Nnnn
@@ -22698,7 +22732,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\bool_gset_false:N \g__str_error_bool
\__str_convert:nNNnnn
- { \cs_set_eq:NN \__str_if_flag_error:nne \__str_if_flag_no_error:nne }
+ { \cs_set_eq:NN \__str_if_flag_error:Nne \__str_if_flag_no_error:Nne }
\tl_set_eq:NN #1 {#2} {#3} {#4}
\bool_if:NTF \g__str_error_bool \prg_return_false: \prg_return_true:
}
@@ -22707,7 +22741,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\bool_gset_false:N \g__str_error_bool
\__str_convert:nNNnnn
- { \cs_set_eq:NN \__str_if_flag_error:nne \__str_if_flag_no_error:nne }
+ { \cs_set_eq:NN \__str_if_flag_error:Nne \__str_if_flag_no_error:Nne }
\tl_gset_eq:NN #1 {#2} {#3} {#4}
\bool_if:NTF \g__str_error_bool \prg_return_false: \prg_return_true:
}
@@ -22715,7 +22749,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\group_begin:
#1
- \__kernel_tl_gset:Ne \g__str_result_tl { \__kernel_str_to_other_fast:n {#4} }
+ \__kernel_tl_gset:Nx \g__str_result_tl { \__kernel_str_to_other_fast:n {#4} }
\exp_after:wN \__str_convert:wwwnn
\tl_to_str:n {#5} /// \s__str_stop
{ decode } { unescape }
@@ -22726,7 +22760,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ encode } { escape }
\use_ii_i:nn
\__str_convert_encode_:
- \__kernel_tl_gset:Ne \g__str_result_tl
+ \__kernel_tl_gset:Nx \g__str_result_tl
{ \tl_to_str:V \g__str_result_tl }
\group_end:
#2 #3 \g__str_result_tl
@@ -22830,7 +22864,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\if_int_compare:w `#1 < 256 \exp_stop_f:
#1
\else:
- \flag_raise:n { __str_byte }
+ \flag_raise:N \l__str_byte_flag
\fi:
\__str_filter_bytes_aux:N
}
@@ -22844,10 +22878,10 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\cs_new_protected:Npn \__str_convert_unescape_:
{
- \flag_clear:n { __str_byte }
- \__kernel_tl_gset:Ne \g__str_result_tl
+ \flag_clear:N \l__str_byte_flag
+ \__kernel_tl_gset:Nx \g__str_result_tl
{ \exp_args:No \__str_filter_bytes:n \g__str_result_tl }
- \__str_if_flag_error:nne { __str_byte } { non-byte } { bytes }
+ \__str_if_flag_error:Nne \l__str_byte_flag { non-byte } { bytes }
}
}
{ \cs_new_protected:Npn \__str_convert_unescape_: { } }
@@ -22872,15 +22906,15 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\cs_new_protected:Npn \__str_convert_encode_:
{
- \flag_clear:n { __str_error }
+ \flag_clear:N \l__str_error_flag
\__str_convert_gmap_internal:N \__str_encode_native_char:n
- \__str_if_flag_error:nne { __str_error }
+ \__str_if_flag_error:Nne \l__str_error_flag
{ native-overflow } { }
}
\cs_new:Npn \__str_encode_native_char:n #1
{
\if_int_compare:w #1 > \c__str_max_byte_int
- \flag_raise:n { __str_error }
+ \flag_raise:N \l__str_error_flag
?
\else:
\char_generate:nn {#1} {12}
@@ -22897,7 +22931,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_new_protected:Npn \__str_convert_decode_clist:
{
\clist_gset:No \g__str_result_tl \g__str_result_tl
- \__kernel_tl_gset:Ne \g__str_result_tl
+ \__kernel_tl_gset:Nx \g__str_result_tl
{
\exp_args:No \clist_map_function:nN
\g__str_result_tl \__str_decode_clist_char:n
@@ -22908,7 +22942,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_new_protected:Npn \__str_convert_encode_clist:
{
\__str_convert_gmap_internal:N \__str_encode_clist_char:n
- \__kernel_tl_gset:Ne \g__str_result_tl { \tl_tail:N \g__str_result_tl }
+ \__kernel_tl_gset:Nx \g__str_result_tl { \tl_tail:N \g__str_result_tl }
}
\cs_new:Npn \__str_encode_clist_char:n #1 { , #1 }
\cs_new_protected:Npn \__str_declare_eight_bit_encoding:nnnn #1
@@ -22966,9 +23000,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
\exp_not:N \__str_decode_eight_bit_aux:Nn
\exp_not:c { g__str_decode_#1_intarray }
}
- \flag_clear:n { __str_error }
+ \flag_clear:N \l__str_error_flag
\__str_convert_gmap:N \__str_tmp:w
- \__str_if_flag_error:nne { __str_error } { decode-8-bit } {#1}
+ \__str_if_flag_error:Nne \l__str_error_flag { decode-8-bit } {#1}
}
\cs_new:Npn \__str_decode_eight_bit_aux:Nn #1#2
{
@@ -22980,7 +23014,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_new:Npn \__str_decode_eight_bit_aux:n #1
{
\if_int_compare:w #1 < \c_zero_int
- \flag_raise:n { __str_error }
+ \flag_raise:N \l__str_error_flag
\int_value:w \c__str_replacement_char_int
\else:
#1
@@ -22995,9 +23029,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
\exp_not:c { g__str_encode_#1_intarray }
\exp_not:c { g__str_decode_#1_intarray }
}
- \flag_clear:n { __str_error }
+ \flag_clear:N \l__str_error_flag
\__str_convert_gmap_internal:N \__str_tmp:w
- \__str_if_flag_error:nne { __str_error } { encode-8-bit } {#1}
+ \__str_if_flag_error:Nne \l__str_error_flag { encode-8-bit } {#1}
}
\cs_new:Npn \__str_encode_eight_bit_aux:NNn #1#2#3
{
@@ -23013,7 +23047,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\int_compare:nNnTF { \intarray_item:Nn #3 { 1 + #1 } } = {#2}
{ \__str_output_byte:n {#1} }
- { \flag_raise:n { __str_error } }
+ { \flag_raise:N \l__str_error_flag }
}
\msg_new:nnn { str } { unknown-esc }
{ Escaping~scheme~'#1'~(filtered:~'#2')~unknown. }
@@ -23064,9 +23098,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_new_protected:Npn \__str_convert_unescape_hex:
{
\group_begin:
- \flag_clear:n { __str_error }
+ \flag_clear:N \l__str_error_flag
\int_set:Nn \tex_escapechar:D { 92 }
- \__kernel_tl_gset:Ne \g__str_result_tl
+ \__kernel_tl_gset:Nx \g__str_result_tl
{
\__str_output_byte:w "
\exp_last_unbraced:Nf \__str_unescape_hex_auxi:N
@@ -23075,7 +23109,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\prg_break_point:
\__str_output_end:
}
- \__str_if_flag_error:nne { __str_error } { unescape-hex } { }
+ \__str_if_flag_error:Nne \l__str_error_flag { unescape-hex } { }
\group_end:
}
\cs_new:Npn \__str_unescape_hex_auxi:N #1
@@ -23084,7 +23118,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\__str_hexadecimal_use:NTF #1
{ \__str_unescape_hex_auxii:N }
{
- \flag_raise:n { __str_error }
+ \flag_raise:N \l__str_error_flag
\__str_unescape_hex_auxi:N
}
}
@@ -23097,7 +23131,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\__str_output_byte:w " \__str_unescape_hex_auxi:N
}
{
- \flag_raise:n { __str_error }
+ \flag_raise:N \l__str_error_flag
\__str_unescape_hex_auxii:N
}
}
@@ -23112,17 +23146,17 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_new_protected:cpn { __str_convert_unescape_#2: }
{
\group_begin:
- \flag_clear:n { __str_byte }
- \flag_clear:n { __str_error }
+ \flag_clear:N \l__str_byte_flag
+ \flag_clear:N \l__str_error_flag
\int_set:Nn \tex_escapechar:D { 92 }
- \__kernel_tl_gset:Ne \g__str_result_tl
+ \__kernel_tl_gset:Nx \g__str_result_tl
{
\exp_after:wN #3 \g__str_result_tl
#1 ? { ? \prg_break: }
\prg_break_point:
}
- \__str_if_flag_error:nne { __str_byte } { non-byte } { #2 }
- \__str_if_flag_error:nne { __str_error } { unescape-#2 } { }
+ \__str_if_flag_error:Nne \l__str_byte_flag { non-byte } { #2 }
+ \__str_if_flag_error:Nne \l__str_error_flag { unescape-#2 } { }
\group_end:
}
\cs_new:Npn #3 ##1#1##2##3
@@ -23135,12 +23169,12 @@ Type H <return> for immediate help}\def~{\errmessage{%
\__str_hexadecimal_use:NTF ##3
{ }
{
- \flag_raise:n { __str_error }
+ \flag_raise:N \l__str_error_flag
* 0 + `#1 \use_i:nn
}
}
{
- \flag_raise:n { __str_error }
+ \flag_raise:N \l__str_error_flag
0 + `#1 \use_i:nn
}
\__str_output_end:
@@ -23165,23 +23199,23 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_new_protected:Npn \__str_convert_unescape_string:
{
\group_begin:
- \flag_clear:n { __str_byte }
- \flag_clear:n { __str_error }
+ \flag_clear:N \l__str_byte_flag
+ \flag_clear:N \l__str_error_flag
\int_set:Nn \tex_escapechar:D { 92 }
- \__kernel_tl_gset:Ne \g__str_result_tl
+ \__kernel_tl_gset:Nx \g__str_result_tl
{
\exp_after:wN \__str_unescape_string_newlines:wN
\g__str_result_tl \prg_break: ^^M ?
\prg_break_point:
}
- \__kernel_tl_gset:Ne \g__str_result_tl
+ \__kernel_tl_gset:Nx \g__str_result_tl
{
\exp_after:wN \__str_unescape_string_loop:wNNN
\g__str_result_tl #1 ?? { ? \prg_break: }
\prg_break_point:
}
- \__str_if_flag_error:nne { __str_byte } { non-byte } { string }
- \__str_if_flag_error:nne { __str_error } { unescape-string } { }
+ \__str_if_flag_error:Nne \l__str_byte_flag { non-byte } { string }
+ \__str_if_flag_error:Nne \l__str_error_flag { unescape-string } { }
\group_end:
}
}
@@ -23221,7 +23255,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ ^^J } { 0 - 1 }
}
{
- \flag_raise:n { __str_error }
+ \flag_raise:N \l__str_error_flag
0 - 1 \use_i:nn
}
}
@@ -23347,19 +23381,19 @@ Type H <return> for immediate help}\def~{\errmessage{%
#5 \s__str_stop
\__str_output_byte:n { #2 - 64 * ( #1 - 2 ) }
}
-\flag_clear_new:n { __str_missing }
-\flag_clear_new:n { __str_extra }
-\flag_clear_new:n { __str_overlong }
-\flag_clear_new:n { __str_overflow }
+\flag_clear_new:N \l__str_missing_flag
+\flag_clear_new:N \l__str_extra_flag
+\flag_clear_new:N \l__str_overlong_flag
+\flag_clear_new:N \l__str_overflow_flag
\msg_new:nnnn { str } { utf8-decode }
{
Invalid~UTF-8~string:
\exp_last_unbraced:Nf \use_none:n
{
- \__str_if_flag_times:nT { __str_missing } { ,~missing~continuation~byte }
- \__str_if_flag_times:nT { __str_extra } { ,~extra~continuation~byte }
- \__str_if_flag_times:nT { __str_overlong } { ,~overlong~form }
- \__str_if_flag_times:nT { __str_overflow } { ,~code~point~too~large }
+ \__str_if_flag_times:NT \l__str_missing_flag { ,~missing~continuation~byte }
+ \__str_if_flag_times:NT \l__str_extra_flag { ,~extra~continuation~byte }
+ \__str_if_flag_times:NT \l__str_overlong_flag { ,~overlong~form }
+ \__str_if_flag_times:NT \l__str_overflow_flag { ,~code~point~too~large }
}
.
}
@@ -23374,25 +23408,25 @@ Type H <return> for immediate help}\def~{\errmessage{%
Code~point~ <~1114112:~11110xxx~10xxxxxx~10xxxxxx~10xxxxxx \\
}
Bytes~of~the~form~10xxxxxx~are~called~continuation~bytes.
- \flag_if_raised:nT { __str_missing }
+ \flag_if_raised:NT \l__str_missing_flag
{
\\\\
A~leading~byte~(in~the~range~[192,255])~was~not~followed~by~
the~appropriate~number~of~continuation~bytes.
}
- \flag_if_raised:nT { __str_extra }
+ \flag_if_raised:NT \l__str_extra_flag
{
\\\\
LaTeX~came~across~a~continuation~byte~when~it~was~not~expected.
}
- \flag_if_raised:nT { __str_overlong }
+ \flag_if_raised:NT \l__str_overlong_flag
{
\\\\
Every~Unicode~code~point~must~be~expressed~in~the~shortest~
possible~form.~For~instance,~'0xC0'~'0x83'~is~not~a~valid~
representation~for~the~code~point~3.
}
- \flag_if_raised:nT { __str_overflow }
+ \flag_if_raised:NT \l__str_overflow_flag
{
\\\\
Unicode~limits~code~points~to~the~range~[0,1114111].
@@ -23402,18 +23436,18 @@ Type H <return> for immediate help}\def~{\errmessage{%
\prop_gput:Nnn \g_msg_module_type_prop { str } { }
\cs_new_protected:cpn { __str_convert_decode_utf8: }
{
- \flag_clear:n { __str_error }
- \flag_clear:n { __str_missing }
- \flag_clear:n { __str_extra }
- \flag_clear:n { __str_overlong }
- \flag_clear:n { __str_overflow }
- \__kernel_tl_gset:Ne \g__str_result_tl
+ \flag_clear:N \l__str_error_flag
+ \flag_clear:N \l__str_missing_flag
+ \flag_clear:N \l__str_extra_flag
+ \flag_clear:N \l__str_overlong_flag
+ \flag_clear:N \l__str_overflow_flag
+ \__kernel_tl_gset:Nx \g__str_result_tl
{
\exp_after:wN \__str_decode_utf_viii_start:N \g__str_result_tl
{ \prg_break: \__str_decode_utf_viii_end: }
\prg_break_point:
}
- \__str_if_flag_error:nne { __str_error } { utf8-decode } { }
+ \__str_if_flag_error:Nne \l__str_error_flag { utf8-decode } { }
}
\cs_new:Npn \__str_decode_utf_viii_start:N #1
{
@@ -23423,8 +23457,8 @@ Type H <return> for immediate help}\def~{\errmessage{%
\if_int_compare:w `#1 < "80 \exp_stop_f:
\int_value:w `#1
\else:
- \flag_raise:n { __str_extra }
- \flag_raise:n { __str_error }
+ \flag_raise:N \l__str_extra_flag
+ \flag_raise:N \l__str_error_flag
\int_use:N \c__str_replacement_char_int
\fi:
\else:
@@ -23447,8 +23481,8 @@ Type H <return> for immediate help}\def~{\errmessage{%
\int_value:w \int_eval:n { #1 * "40 + `#3 - "80 } \exp_after:wN
\else:
\s__str
- \flag_raise:n { __str_missing }
- \flag_raise:n { __str_error }
+ \flag_raise:N \l__str_missing_flag
+ \flag_raise:N \l__str_error_flag
\int_use:N \c__str_replacement_char_int
\fi:
\s__str
@@ -23461,8 +23495,8 @@ Type H <return> for immediate help}\def~{\errmessage{%
\if_int_compare:w #1 < #4 \exp_stop_f:
\s__str
\if_int_compare:w #1 < #3 \exp_stop_f:
- \flag_raise:n { __str_overlong }
- \flag_raise:n { __str_error }
+ \flag_raise:N \l__str_overlong_flag
+ \flag_raise:N \l__str_error_flag
\int_use:N \c__str_replacement_char_int
\else:
#1
@@ -23481,15 +23515,15 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_new:Npn \__str_decode_utf_viii_overflow:w #1 \fi: #2 \fi:
{
\fi: \fi:
- \flag_raise:n { __str_overflow }
- \flag_raise:n { __str_error }
+ \flag_raise:N \l__str_overflow_flag
+ \flag_raise:N \l__str_error_flag
\int_use:N \c__str_replacement_char_int
}
\cs_new:Npn \__str_decode_utf_viii_end:
{
\s__str
- \flag_raise:n { __str_missing }
- \flag_raise:n { __str_error }
+ \flag_raise:N \l__str_missing_flag
+ \flag_raise:N \l__str_error_flag
\int_use:N \c__str_replacement_char_int \s__str
\prg_break:
}
@@ -23507,10 +23541,10 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ \__str_encode_utf_xvi_aux:N \__str_output_byte_pair_le:n }
\cs_new_protected:Npn \__str_encode_utf_xvi_aux:N #1
{
- \flag_clear:n { __str_error }
+ \flag_clear:N \l__str_error_flag
\cs_set_eq:NN \__str_tmp:w #1
\__str_convert_gmap_internal:N \__str_encode_utf_xvi_char:n
- \__str_if_flag_error:nne { __str_error } { utf16-encode } { }
+ \__str_if_flag_error:Nne \l__str_error_flag { utf16-encode } { }
}
\cs_new:Npn \__str_encode_utf_xvi_char:n #1
{
@@ -23519,7 +23553,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\else:
\if_int_compare:w #1 < "10000 \exp_stop_f:
\if_int_compare:w #1 < "E000 \exp_stop_f:
- \flag_raise:n { __str_error }
+ \flag_raise:N \l__str_error_flag
\__str_tmp:w { \c__str_replacement_char_int }
\else:
\__str_tmp:w {#1}
@@ -23530,9 +23564,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
\fi:
\fi:
}
- \flag_clear_new:n { __str_missing }
- \flag_clear_new:n { __str_extra }
- \flag_clear_new:n { __str_end }
+ \flag_clear_new:N \l__str_missing_flag
+ \flag_clear_new:N \l__str_extra_flag
+ \flag_clear_new:N \l__str_end_flag
\msg_new:nnnn { str } { utf16-encode }
{ Unicode~string~cannot~be~expressed~in~UTF-16:~surrogate. }
{
@@ -23545,9 +23579,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
Invalid~UTF-16~string:
\exp_last_unbraced:Nf \use_none:n
{
- \__str_if_flag_times:nT { __str_missing } { ,~missing~trail~surrogate }
- \__str_if_flag_times:nT { __str_extra } { ,~extra~trail~surrogate }
- \__str_if_flag_times:nT { __str_end } { ,~odd~number~of~bytes }
+ \__str_if_flag_times:NT \l__str_missing_flag { ,~missing~trail~surrogate }
+ \__str_if_flag_times:NT \l__str_extra_flag { ,~extra~trail~surrogate }
+ \__str_if_flag_times:NT \l__str_end_flag { ,~odd~number~of~bytes }
}
.
}
@@ -23564,17 +23598,17 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
Lead~surrogates~are~pairs~of~bytes~in~the~range~[0xD800,~0xDBFF],~
and~trail~surrogates~are~in~the~range~[0xDC00,~0xDFFF].
- \flag_if_raised:nT { __str_missing }
+ \flag_if_raised:NT \l__str_missing_flag
{
\\\\
A~lead~surrogate~was~not~followed~by~a~trail~surrogate.
}
- \flag_if_raised:nT { __str_extra }
+ \flag_if_raised:NT \l__str_extra_flag
{
\\\\
LaTeX~came~across~a~trail~surrogate~when~it~was~not~expected.
}
- \flag_if_raised:nT { __str_end }
+ \flag_if_raised:NT \l__str_end_flag
{
\\\\
The~string~contained~an~odd~number~of~bytes.~This~is~invalid:~
@@ -23602,18 +23636,18 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \__str_decode_utf_xvi:Nw #1#2 \s__str_stop
{
- \flag_clear:n { __str_error }
- \flag_clear:n { __str_missing }
- \flag_clear:n { __str_extra }
- \flag_clear:n { __str_end }
+ \flag_clear:N \l__str_error_flag
+ \flag_clear:N \l__str_missing_flag
+ \flag_clear:N \l__str_extra_flag
+ \flag_clear:N \l__str_end_flag
\cs_set:Npn \__str_tmp:w ##1 ##2 { ` ## #1 }
- \__kernel_tl_gset:Ne \g__str_result_tl
+ \__kernel_tl_gset:Nx \g__str_result_tl
{
\exp_after:wN \__str_decode_utf_xvi_pair:NN
#2 \q__str_nil \q__str_nil
\prg_break_point:
}
- \__str_if_flag_error:nne { __str_error } { utf16-decode } { }
+ \__str_if_flag_error:Nne \l__str_error_flag { utf16-decode } { }
}
\cs_new:Npn \__str_decode_utf_xvi_pair:NN #1#2
{
@@ -23669,8 +23703,8 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ \__str_decode_utf_xvi_error:nNN { extra } #1#2 }
\cs_new:Npn \__str_decode_utf_xvi_error:nNN #1#2#3
{
- \flag_raise:n { __str_error }
- \flag_raise:n { str_#1 }
+ \flag_raise:N \l__str_error_flag
+ \flag_raise:c { l__str_#1_flag }
#2 #3 \s__str
\int_use:N \c__str_replacement_char_int \s__str
}
@@ -23710,29 +23744,29 @@ Type H <return> for immediate help}\def~{\errmessage{%
\__str_output_byte_pair_le:n {#1}
^^00
}
- \flag_clear_new:n { __str_overflow }
- \flag_clear_new:n { __str_end }
+ \flag_clear_new:N \l__str_overflow_flag
+ \flag_clear_new:N \l__str_end_flag
\msg_new:nnnn { str } { utf32-decode }
{
Invalid~UTF-32~string:
\exp_last_unbraced:Nf \use_none:n
{
- \__str_if_flag_times:nT { __str_overflow } { ,~code~point~too~large }
- \__str_if_flag_times:nT { __str_end } { ,~truncated~string }
+ \__str_if_flag_times:NT \l__str_overflow_flag { ,~code~point~too~large }
+ \__str_if_flag_times:NT \l__str_end_flag { ,~truncated~string }
}
.
}
{
In~the~UTF-32~encoding,~every~Unicode~character~
(in~the~range~[U+0000,~U+10FFFF])~is~encoded~as~4~bytes.
- \flag_if_raised:nT { __str_overflow }
+ \flag_if_raised:NT \l__str_overflow_flag
{
\\\\
LaTeX~came~across~a~code~point~larger~than~1114111,~
the~maximum~code~point~defined~by~Unicode.~
Perhaps~the~string~was~not~encoded~in~the~UTF-32~encoding?
}
- \flag_if_raised:nT { __str_end }
+ \flag_if_raised:NT \l__str_end_flag
{
\\\\
The~length~of~the~string~is~not~a~multiple~of~4.~
@@ -23760,17 +23794,17 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \__str_decode_utf_xxxii:Nw #1#2 \s__str_stop
{
- \flag_clear:n { __str_overflow }
- \flag_clear:n { __str_end }
- \flag_clear:n { __str_error }
+ \flag_clear:N \l__str_overflow_flag
+ \flag_clear:N \l__str_end_flag
+ \flag_clear:N \l__str_error_flag
\cs_set:Npn \__str_tmp:w ##1 ##2 { ` ## #1 }
- \__kernel_tl_gset:Ne \g__str_result_tl
+ \__kernel_tl_gset:Nx \g__str_result_tl
{
\exp_after:wN \__str_decode_utf_xxxii_loop:NNNN
#2 \s__str_stop \s__str_stop \s__str_stop \s__str_stop
\prg_break_point:
}
- \__str_if_flag_error:nne { __str_error } { utf32-decode } { }
+ \__str_if_flag_error:Nne \l__str_error_flag { utf32-decode } { }
}
\cs_new:Npn \__str_decode_utf_xxxii_loop:NNNN #1#2#3#4
{
@@ -23779,13 +23813,13 @@ Type H <return> for immediate help}\def~{\errmessage{%
\fi:
#1#2#3#4 \s__str
\if_int_compare:w \__str_tmp:w #1#4 > \c_zero_int
- \flag_raise:n { __str_overflow }
- \flag_raise:n { __str_error }
+ \flag_raise:N \l__str_overflow_flag
+ \flag_raise:N \l__str_error_flag
\int_use:N \c__str_replacement_char_int
\else:
\if_int_compare:w \__str_tmp:w #2#3 > 16 \exp_stop_f:
- \flag_raise:n { __str_overflow }
- \flag_raise:n { __str_error }
+ \flag_raise:N \l__str_overflow_flag
+ \flag_raise:N \l__str_error_flag
\int_use:N \c__str_replacement_char_int
\else:
\int_eval:n
@@ -23799,8 +23833,8 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\tl_if_empty:nF {#1}
{
- \flag_raise:n { __str_end }
- \flag_raise:n { __str_error }
+ \flag_raise:N \l__str_end_flag
+ \flag_raise:N \l__str_error_flag
#1 \s__str
\int_use:N \c__str_replacement_char_int \s__str
}
@@ -24084,7 +24118,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \__tl_analysis_b:n #1
{
- \__kernel_tl_gset:Ne \g__tl_analysis_result_tl
+ \__kernel_tl_gset:Nx \g__tl_analysis_result_tl
{
\__tl_analysis_b_loop:w 0; #1
\prg_break_point:
@@ -24594,10 +24628,10 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ \int_set:Nn \tex_escapechar:D { `\\ } }
\cs_new:Npn \__regex_toks_use:w { \tex_the:D \tex_toks:D }
\cs_new_protected:Npn \__regex_toks_clear:N #1
- { \__regex_toks_set:Nn #1 { } }
+ { \tex_toks:D #1 = { } }
\cs_new_eq:NN \__regex_toks_set:Nn \tex_toks:D
\cs_new_protected:Npn \__regex_toks_set:No #1
- { \tex_toks:D #1 \exp_after:wN }
+ { \tex_toks:D #1 = \exp_after:wN }
\cs_new_protected:Npn \__regex_toks_memcpy:NNn #1#2#3
{
\prg_replicate:nn {#3}
@@ -24607,35 +24641,37 @@ Type H <return> for immediate help}\def~{\errmessage{%
\int_incr:N #2
}
}
-\cs_new_protected:Npn \__regex_toks_put_left:Ne #1#2
+\cs_if_exist:NTF \tex_etokspre:D
+ { \cs_new_eq:NN \__regex_toks_put_left:Ne \tex_etokspre:D }
{
- \cs_set_nopar:Npe \__regex_tmp:w { #2 }
- \tex_toks:D #1 \exp_after:wN \exp_after:wN \exp_after:wN
- { \exp_after:wN \__regex_tmp:w \tex_the:D \tex_toks:D #1 }
+ \cs_new_protected:Npn \__regex_toks_put_left:Ne #1#2
+ { \tex_toks:D #1 = \tex_expanded:D {{ #2 \tex_the:D \tex_toks:D #1 }} }
}
-\cs_new_protected:Npn \__regex_toks_put_right:Ne #1#2
+\cs_if_exist:NTF \tex_etoksapp:D
+ { \cs_new_eq:NN \__regex_toks_put_right:Ne \tex_etoksapp:D }
{
- \cs_set_nopar:Npe \__regex_tmp:w {#2}
- \tex_toks:D #1 \exp_after:wN
- { \tex_the:D \tex_toks:D \exp_after:wN #1 \__regex_tmp:w }
+ \cs_new_protected:Npn \__regex_toks_put_right:Ne #1#2
+ { \tex_toks:D #1 = \tex_expanded:D {{ \tex_the:D \tex_toks:D #1 #2 }} }
+ }
+\cs_if_exist:NTF \tex_toksapp:D
+ { \cs_new_eq:NN \__regex_toks_put_right:Nn \tex_toksapp:D }
+ {
+ \cs_new_protected:Npn \__regex_toks_put_right:Nn #1#2
+ { \tex_toks:D #1 = \exp_after:wN { \tex_the:D \tex_toks:D #1 #2 } }
}
-\cs_new_protected:Npn \__regex_toks_put_right:Nn #1#2
- { \tex_toks:D #1 \exp_after:wN { \tex_the:D \tex_toks:D #1 #2 } }
\cs_new:Npn \__regex_curr_cs_to_str:
{
\exp_after:wN \exp_after:wN \exp_after:wN \cs_to_str:N
\l__regex_curr_token_tl
}
\cs_new:Npn \__regex_intarray_item:NnF #1#2
- { \exp_args:Nf \__regex_intarray_item_aux:nNF { \int_eval:n {#2} } #1 }
+ { \exp_args:No \__regex_intarray_item_aux:nNF { \tex_the:D \__regex_int_eval:w #2 } #1 }
\cs_new:Npn \__regex_intarray_item_aux:nNF #1#2
{
\if_int_compare:w #1 > \c_zero_int
- \exp_after:wN \use_i:nn
- \else:
- \exp_after:wN \use_ii:nn
+ \exp_after:wN \use_ii:nnn
\fi:
- { \__kernel_intarray_item:Nn #2 {#1} }
+ \use_ii:nn { \__kernel_intarray_item:Nn #2 {#1} }
}
\cs_new:Npn \__regex_maplike_break:
{ \prg_map_break:Nn \__regex_maplike_break: { } }
@@ -24731,14 +24767,12 @@ Type H <return> for immediate help}\def~{\errmessage{%
\if_int_compare:w \l__regex_curr_char_int > `Z \exp_stop_f:
\if_int_compare:w \l__regex_curr_char_int > `z \exp_stop_f: \else:
\if_int_compare:w \l__regex_curr_char_int < `a \exp_stop_f: \else:
- \int_sub:Nn \l__regex_case_changed_char_int
- { \c__regex_ascii_lower_int }
+ \int_sub:Nn \l__regex_case_changed_char_int \c__regex_ascii_lower_int
\fi:
\fi:
\else:
\if_int_compare:w \l__regex_curr_char_int < `A \exp_stop_f: \else:
- \int_add:Nn \l__regex_case_changed_char_int
- { \c__regex_ascii_lower_int }
+ \int_add:Nn \l__regex_case_changed_char_int \c__regex_ascii_lower_int
\fi:
\fi:
\cs_set_eq:NN \__regex_maybe_compute_ccc: \prg_do_nothing:
@@ -24756,12 +24790,12 @@ Type H <return> for immediate help}\def~{\errmessage{%
\or: 1000000 \or: 4000000 \else: 1*0
\fi:
}
-\cs_new_protected:Npn \__regex_item_catcode:nT #1
+\prg_new_protected_conditional:Npnn \__regex_item_catcode:n #1 { T }
{
- \if_int_odd:w \int_eval:n { #1 / \__regex_item_catcode: } \exp_stop_f:
- \exp_after:wN \use:n
+ \if_int_odd:w \__regex_int_eval:w #1 / \__regex_item_catcode: \scan_stop:
+ \prg_return_true:
\else:
- \exp_after:wN \use_none:n
+ \prg_return_false:
\fi:
}
\cs_new_protected:Npn \__regex_item_catcode_reverse:nT #1#2
@@ -24776,9 +24810,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \__regex_item_exact_cs:n #1
{
- \int_compare:nNnTF \l__regex_curr_catcode_int = 0
+ \int_compare:nNnTF \l__regex_curr_catcode_int = \c_zero_int
{
- \__kernel_tl_set:Ne \l__regex_internal_a_tl
+ \__kernel_tl_set:Nx \l__regex_internal_a_tl
{ \scan_stop: \__regex_curr_cs_to_str: \scan_stop: }
\tl_if_in:noTF { \scan_stop: #1 \scan_stop: }
\l__regex_internal_a_tl
@@ -24788,7 +24822,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \__regex_item_cs:n #1
{
- \int_compare:nNnT \l__regex_curr_catcode_int = 0
+ \int_compare:nNnT \l__regex_curr_catcode_int = \c_zero_int
{
\group_begin:
\__regex_single_match:
@@ -24888,7 +24922,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_set:Npn \__regex_escape_escaped:N ##1 { #2 }
\cs_set:Npn \__regex_escape_raw:N ##1 { #3 }
\__regex_standard_escapechar:
- \__kernel_tl_gset:Ne \g__regex_internal_tl
+ \__kernel_tl_gset:Nx \g__regex_internal_tl
{ \__kernel_str_to_other_fast:n {#4} }
\tl_put_right:Ne \l__regex_internal_a_tl
{
@@ -25016,13 +25050,13 @@ Type H <return> for immediate help}\def~{\errmessage{%
\msg_expandable_error:nnn { regex } { x-missing-rbrace } {#1}
\__regex_escape_loop:N #1
}
-\prg_new_conditional:Npnn \__regex_hexadecimal_use:N #1 { TF }
+\cs_new:Npn \__regex_hexadecimal_use:NTF #1
{
- \if_int_compare:w 1 < "1 \token_to_str:N #1 \exp_stop_f:
- #1 \prg_return_true:
+ \if_int_compare:w \c_one_int < "1 \token_to_str:N #1 \exp_stop_f:
+ #1
\else:
\if_case:w
- \int_eval:n { \exp_after:wN ` \token_to_str:N #1 - `a }
+ \__regex_int_eval:w \exp_after:wN ` \token_to_str:N #1 - `a \scan_stop:
A
\or: B
\or: C
@@ -25030,51 +25064,64 @@ Type H <return> for immediate help}\def~{\errmessage{%
\or: E
\or: F
\else:
- \prg_return_false:
- \exp_after:wN \use_none:n
+ \exp_after:wN \exp_after:wN \exp_after:wN \use_iii:nnn
\fi:
- \prg_return_true:
\fi:
+ \use_i:nn
}
\prg_new_conditional:Npnn \__regex_char_if_special:N #1 { TF }
{
- \if_int_compare:w `#1 > `Z \exp_stop_f:
- \if_int_compare:w `#1 > `z \exp_stop_f:
- \if_int_compare:w `#1 < \c__regex_ascii_max_int
- \prg_return_true: \else: \prg_return_false: \fi:
- \else:
- \if_int_compare:w `#1 < `a \exp_stop_f:
- \prg_return_true: \else: \prg_return_false: \fi:
- \fi:
+ \if:w
+ T
+ \if_int_compare:w `#1 > `Z \exp_stop_f:
+ \if_int_compare:w `#1 > `z \exp_stop_f:
+ \if_int_compare:w `#1 < \c__regex_ascii_max_int
+ \else: F \fi:
+ \else:
+ \if_int_compare:w `#1 < `a \exp_stop_f:
+ \else: F \fi:
+ \fi:
+ \else:
+ \if_int_compare:w `#1 > `9 \exp_stop_f:
+ \if_int_compare:w `#1 < `A \exp_stop_f:
+ \else: F \fi:
+ \else:
+ \if_int_compare:w `#1 < `0 \exp_stop_f:
+ \if_int_compare:w `#1 < `\ \exp_stop_f:
+ F \fi:
+ \else: F \fi:
+ \fi:
+ \fi:
+ T
+ \prg_return_true:
\else:
- \if_int_compare:w `#1 > `9 \exp_stop_f:
- \if_int_compare:w `#1 < `A \exp_stop_f:
- \prg_return_true: \else: \prg_return_false: \fi:
- \else:
- \if_int_compare:w `#1 < `0 \exp_stop_f:
- \if_int_compare:w `#1 < `\ \exp_stop_f:
- \prg_return_false: \else: \prg_return_true: \fi:
- \else: \prg_return_false: \fi:
- \fi:
+ \prg_return_false:
\fi:
}
\prg_new_conditional:Npnn \__regex_char_if_alphanumeric:N #1 { TF }
{
- \if_int_compare:w `#1 > `Z \exp_stop_f:
- \if_int_compare:w `#1 > `z \exp_stop_f:
- \prg_return_false:
- \else:
- \if_int_compare:w `#1 < `a \exp_stop_f:
- \prg_return_false: \else: \prg_return_true: \fi:
- \fi:
+ \if:w
+ T
+ \if_int_compare:w `#1 > `Z \exp_stop_f:
+ \if_int_compare:w `#1 > `z \exp_stop_f:
+ F
+ \else:
+ \if_int_compare:w `#1 < `a \exp_stop_f:
+ F \fi:
+ \fi:
+ \else:
+ \if_int_compare:w `#1 > `9 \exp_stop_f:
+ \if_int_compare:w `#1 < `A \exp_stop_f:
+ F \fi:
+ \else:
+ \if_int_compare:w `#1 < `0 \exp_stop_f:
+ F \fi:
+ \fi:
+ \fi:
+ T
+ \prg_return_true:
\else:
- \if_int_compare:w `#1 > `9 \exp_stop_f:
- \if_int_compare:w `#1 < `A \exp_stop_f:
- \prg_return_false: \else: \prg_return_true: \fi:
- \else:
- \if_int_compare:w `#1 < `0 \exp_stop_f:
- \prg_return_false: \else: \prg_return_true: \fi:
- \fi:
+ \prg_return_false:
\fi:
}
\int_new:N \l__regex_group_level_int
@@ -25104,17 +25151,14 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_new_eq:NN \l__regex_internal_regex \c__regex_no_match_regex
\seq_new:N \l__regex_show_prefix_seq
\int_new:N \l__regex_show_lines_int
-\prg_new_conditional:Npnn \__regex_two_if_eq:NNNN #1#2#3#4 { TF }
+\cs_new:Npn \__regex_two_if_eq:NNNNTF #1#2#3#4
{
\if_meaning:w #1 #3
\if:w #2 #4
- \prg_return_true:
- \else:
- \prg_return_false:
+ \exp_after:wN \exp_after:wN \exp_after:wN \use_ii:nnn
\fi:
- \else:
- \prg_return_false:
\fi:
+ \use_ii:nn
}
\cs_new_protected:Npn \__regex_get_digits:NTFw #1#2#3#4#5
{
@@ -25128,70 +25172,63 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ #3 \__regex_get_digits_loop:nw {#1} }
{ \scan_stop: #1 #2 #3 }
}
-\prg_new_conditional:Npnn \__regex_if_raw_digit:NN #1#2 { TF }
+\cs_new:Npn \__regex_if_raw_digit:NNTF #1#2
{
\if_meaning:w \__regex_compile_raw:N #1
- \if_int_compare:w 1 < 1 #2 \exp_stop_f:
- \prg_return_true:
- \else:
- \prg_return_false:
+ \if_int_compare:w \c_one_int < 1 #2 \exp_stop_f:
+ \exp_after:wN \exp_after:wN \exp_after:wN \use_ii:nnn
\fi:
- \else:
- \prg_return_false:
\fi:
+ \use_ii:nn
}
-\cs_new:Npn \__regex_if_in_class:TF
+\prg_new_conditional:Npnn \__regex_if_in_class: { TF }
{
\if_int_odd:w \l__regex_mode_int
- \exp_after:wN \use_i:nn
+ \prg_return_true:
\else:
- \exp_after:wN \use_ii:nn
+ \prg_return_false:
\fi:
}
\cs_new:Npn \__regex_if_in_cs:TF
{
\if_int_odd:w \l__regex_mode_int
- \exp_after:wN \use_ii:nn
\else:
\if_int_compare:w \l__regex_mode_int < \c__regex_outer_mode_int
- \exp_after:wN \exp_after:wN \exp_after:wN \use_i:nn
- \else:
- \exp_after:wN \exp_after:wN \exp_after:wN \use_ii:nn
+ \exp_after:wN \exp_after:wN \exp_after:wN \use_ii:nnn
\fi:
\fi:
+ \use_ii:nn
}
\cs_new:Npn \__regex_if_in_class_or_catcode:TF
{
\if_int_odd:w \l__regex_mode_int
- \exp_after:wN \use_i:nn
\else:
\if_int_compare:w \l__regex_mode_int > \c__regex_outer_mode_int
- \exp_after:wN \exp_after:wN \exp_after:wN \use_i:nn
\else:
- \exp_after:wN \exp_after:wN \exp_after:wN \use_ii:nn
+ \exp_after:wN \exp_after:wN \exp_after:wN \use_iii:nnn
\fi:
\fi:
+ \use_i:nn
}
-\cs_new:Npn \__regex_if_within_catcode:TF
+\prg_new_conditional:Npnn \__regex_if_within_catcode: { TF }
{
\if_int_compare:w \l__regex_mode_int > \c__regex_outer_mode_int
- \exp_after:wN \use_i:nn
+ \prg_return_true:
\else:
- \exp_after:wN \use_ii:nn
+ \prg_return_false:
\fi:
}
\cs_new_protected:Npn \__regex_chk_c_allowed:T
{
\if_int_compare:w \l__regex_mode_int = \c__regex_outer_mode_int
- \exp_after:wN \use:n
\else:
\if_int_compare:w \l__regex_mode_int = \c__regex_class_mode_int
- \exp_after:wN \exp_after:wN \exp_after:wN \use:n
\else:
\msg_error:nn { regex } { c-bad-mode }
- \exp_after:wN \exp_after:wN \exp_after:wN \use_none:n
+ \exp_after:wN \use_i:nnn
\fi:
\fi:
+ \use:n
}
\cs_new_protected:Npn \__regex_mode_quit_c:
{
@@ -25230,7 +25267,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\msg_error:nne { regex } { missing-rparen }
{ \int_use:N \l__regex_group_level_int }
\prg_replicate:nn
- { \l__regex_group_level_int }
+ \l__regex_group_level_int
{
\tl_build_put_right:Nn \l__regex_build_tl
{
@@ -25393,7 +25430,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ \__regex_compile_special:N \c_right_brace_str }
{
\exp_args:No \__regex_compile_quantifier_lazyness:nnNN
- { \int_use:N \l__regex_internal_a_int } { 0 }
+ { \int_use:N \l__regex_internal_a_int } 0
}
{ \__regex_compile_special:N , }
{
@@ -25471,21 +25508,19 @@ Type H <return> for immediate help}\def~{\errmessage{%
#2 #3
}
}
-\prg_new_protected_conditional:Npnn \__regex_if_end_range:NN #1#2 { TF }
+\cs_new_protected:Npn \__regex_if_end_range:NNTF #1#2
{
\if_meaning:w \__regex_compile_raw:N #1
- \prg_return_true:
\else:
\if_meaning:w \__regex_compile_special:N #1
\if_charcode:w ] #2
- \prg_return_false:
- \else:
- \prg_return_true:
+ \use_i:nn
\fi:
\else:
- \prg_return_false:
+ \exp_after:wN \exp_after:wN \exp_after:wN \use_iii:nnn
\fi:
\fi:
+ \use_i:nn
}
\cs_new_protected:Npn \__regex_compile_range:Nw #1#2#3
{
@@ -25667,12 +25702,12 @@ Type H <return> for immediate help}\def~{\errmessage{%
\__regex_two_if_eq:NNNNTF #5 #6 \__regex_compile_special:N ^
{
\bool_set_false:N \l__regex_internal_bool
- \__kernel_tl_set:Ne \l__regex_internal_a_tl { \if_false: } \fi:
+ \__kernel_tl_set:Nx \l__regex_internal_a_tl { \if_false: } \fi:
\__regex_compile_class_posix_loop:w
}
{
\bool_set_true:N \l__regex_internal_bool
- \__kernel_tl_set:Ne \l__regex_internal_a_tl { \if_false: } \fi:
+ \__kernel_tl_set:Nx \l__regex_internal_a_tl { \if_false: } \fi:
\__regex_compile_class_posix_loop:w #5 #6
}
}
@@ -25903,7 +25938,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \__regex_compile_c_lbrack_add:N #1
{
- \if_int_odd:w \int_eval:n { \l__regex_catcodes_int / #1 } \exp_stop_f:
+ \if_int_odd:w \__regex_int_eval:w \l__regex_catcodes_int / #1 \scan_stop:
\else:
\int_add:Nn \l__regex_catcodes_int {#1}
\fi:
@@ -25932,7 +25967,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ \msg_error:nnn { regex } { cu-lbrace } { c } }
{ \exp_after:wN \__regex_compile_raw:N \c_left_brace_str }
}
-\flag_new:n { __regex_cs }
+\flag_new:N \l__regex_cs_flag
\cs_new_protected:cpn { __regex_compile_ \c_right_brace_str : }
{
\__regex_if_in_cs:TF
@@ -25942,15 +25977,15 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_new_protected:Npn \__regex_compile_end_cs:
{
\__regex_compile_end:
- \flag_clear:n { __regex_cs }
- \__kernel_tl_set:Ne \l__regex_internal_a_tl
+ \flag_clear:N \l__regex_cs_flag
+ \__kernel_tl_set:Nx \l__regex_internal_a_tl
{
\exp_after:wN \__regex_compile_cs_aux:Nn \l__regex_internal_regex
\q__regex_nil \q__regex_nil \q__regex_recursion_stop
}
\exp_args:Ne \__regex_compile_one:n
{
- \flag_if_raised:nTF { __regex_cs }
+ \flag_if_raised:NTF \l__regex_cs_flag
{ \__regex_item_cs:n { \exp_not:o \l__regex_internal_regex } }
{
\__regex_item_exact_cs:n
@@ -25969,7 +26004,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\__regex_compile_cs_aux:Nn
}
{
- \__regex_quark_if_nil:NF #1 { \flag_ensure_raised:n { __regex_cs } }
+ \__regex_quark_if_nil:NF #1 { \flag_ensure_raised:N \l__regex_cs_flag }
\__regex_use_none_delimit_by_q_recursion_stop:w
}
}
@@ -25981,7 +26016,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{#2}
{ \tl_if_head_eq_meaning_p:nN {#3} \__regex_item_caseful_equal:n }
{ \int_compare_p:nNn { \tl_count:n {#3} } = { 2 } }
- { \int_compare_p:nNn {#5} = { 0 } }
+ { \int_compare_p:nNn {#5} = \c_zero_int }
}
{
\prg_replicate:nn {#4}
@@ -25991,7 +26026,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\__regex_quark_if_nil:NF #1
{
- \flag_ensure_raised:n { __regex_cs }
+ \flag_ensure_raised:N \l__regex_cs_flag
\__regex_use_i_delimit_by_q_recursion_stop:nw
}
\__regex_use_none_delimit_by_q_recursion_stop:w
@@ -26012,7 +26047,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\__regex_two_if_eq:NNNNTF #2 #3 \__regex_compile_special:N \c_left_brace_str
{
\tl_set:Nn \l__regex_internal_b_tl {#1}
- \__kernel_tl_set:Ne \l__regex_internal_a_tl { \if_false: } \fi:
+ \__kernel_tl_set:Nx \l__regex_internal_a_tl { \if_false: } \fi:
\__regex_compile_u_loop:NN
}
{
@@ -26097,7 +26132,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \__regex_compile_u_in_cs:
{
- \__kernel_tl_gset:Ne \g__regex_internal_tl
+ \__kernel_tl_gset:Nx \g__regex_internal_tl
{
\exp_args:No \__kernel_str_to_other_fast:n
{ \l__regex_internal_a_tl }
@@ -26153,10 +26188,10 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new:Npn \__regex_clean_int_aux:N #1
{
- \if_int_compare:w 1 < 1 #1 ~
+ \if_int_compare:w \c_one_int < 1 #1 ~
#1
\else:
- \exp_after:wN \str_map_break:
+ \str_map_break:n
\fi:
}
\cs_new:Npn \__regex_clean_regex:n #1
@@ -26177,7 +26212,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new:Npn \__regex_clean_branch_loop:n #1
{
- \tl_if_single:nF {#1} { \prg_break: }
+ \tl_if_single:nF {#1} \prg_break:
\token_case_meaning:NnF #1
{
\__regex_command_K: { #1 \__regex_clean_branch_loop:n }
@@ -26187,7 +26222,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\__regex_group_no_capture:nnnN { #1 \__regex_clean_group:nnnN }
\__regex_group_resetting:nnnN { #1 \__regex_clean_group:nnnN }
}
- { \prg_break: }
+ \prg_break:
}
\cs_new:Npn \__regex_clean_assertion:Nn #1#2
{
@@ -26208,16 +26243,16 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\__regex_clean_bool:n {#1}
{ \__regex_clean_class:n {#2} }
- { \int_max:nn { 0 } { \__regex_clean_int:n {#3} } }
- { \int_max:nn { -1 } { \__regex_clean_int:n {#4} } }
+ { \int_max:nn \c_zero_int { \__regex_clean_int:n {#3} } }
+ { \int_max:nn { -\c_one_int } { \__regex_clean_int:n {#4} } }
\__regex_clean_bool:n {#5}
\__regex_clean_branch_loop:n
}
\cs_new:Npn \__regex_clean_group:nnnN #1#2#3#4
{
{ \__regex_clean_regex:n {#1} }
- { \int_max:nn { 0 } { \__regex_clean_int:n {#2} } }
- { \int_max:nn { -1 } { \__regex_clean_int:n {#3} } }
+ { \int_max:nn \c_zero_int { \__regex_clean_int:n {#2} } }
+ { \int_max:nn { -\c_one_int } { \__regex_clean_int:n {#3} } }
\__regex_clean_bool:n {#4}
\__regex_clean_branch_loop:n
}
@@ -26225,7 +26260,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ \__regex_clean_class_loop:nnn #1 ????? \prg_break_point: }
\cs_new:Npn \__regex_clean_class_loop:nnn #1#2#3
{
- \tl_if_single:nF {#1} { \prg_break: }
+ \tl_if_single:nF {#1} \prg_break:
\token_case_meaning:NnTF #1
{
\__regex_item_cs:n { #1 { \__regex_clean_regex:n {#2} } }
@@ -26257,10 +26292,10 @@ Type H <return> for immediate help}\def~{\errmessage{%
\__regex_clean_class_loop:nnn
}
{
- \exp_args:Nf \str_case:nnTF
+ \exp_args:Ne \str_case:nnTF
{
- \exp_args:Nf \str_range:nnn
- { \cs_to_str:N #1 } { 1 } { 13 }
+ \exp_args:Ne \str_range:nnn
+ { \cs_to_str:N #1 } \c_one_int { 13 }
}
{
{ __regex_prop_ } { }
@@ -26270,7 +26305,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
#1
\__regex_clean_class_loop:nnn {#2} {#3}
}
- { \prg_break: }
+ \prg_break:
}
}
}
@@ -26398,14 +26433,14 @@ Type H <return> for immediate help}\def~{\errmessage{%
\int_zero:N \l__regex_show_lines_int
\__regex_show_push:n {~}
#2
- \int_compare:nTF { \l__regex_show_lines_int = 0 }
+ \int_compare:nTF { \l__regex_show_lines_int = \c_zero_int }
{
\group_end:
\__regex_show_one:n { \bool_if:NTF #1 { Fail } { Pass } }
}
{
\bool_if:nTF
- { #1 && \int_compare_p:n { \l__regex_show_lines_int = 1 } }
+ { #1 && \int_compare_p:n { \l__regex_show_lines_int = \c_one_int } }
{
\group_end:
#2
@@ -26497,7 +26532,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
%
\__regex_build_new_state:
\__regex_toks_put_left:Ne \l__regex_left_state_int
- { \__regex_action_submatch:nN { 0 } < }
+ { \__regex_action_submatch:nN \c_zero_int < }
\__regex_push_lr_states:
\int_zero:N \l__regex_case_max_group_int
\int_gzero:N \g__regex_case_int
@@ -26511,18 +26546,15 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \__regex_case_build_loop:n #1
{
- \int_set:Nn \l__regex_capturing_group_int { 1 }
+ \int_set_eq:NN \l__regex_capturing_group_int \c_one_int
\__regex_compile_use:n {#1}
\int_set:Nn \l__regex_case_max_group_int
- {
- \int_max:nn { \l__regex_case_max_group_int }
- { \l__regex_capturing_group_int }
- }
+ { \int_max:nn \l__regex_case_max_group_int \l__regex_capturing_group_int }
\seq_pop:NN \l__regex_right_state_seq \l__regex_internal_a_tl
\int_set:Nn \l__regex_right_state_int \l__regex_internal_a_tl
\__regex_toks_put_left:Ne \l__regex_right_state_int
{
- \__regex_action_submatch:nN { 0 } >
+ \__regex_action_submatch:nN \c_zero_int >
\int_gset:Nn \g__regex_case_int
{ \int_use:N \g__regex_case_int }
\__regex_action_success:
@@ -26562,9 +26594,9 @@ Type H <return> for immediate help}\def~{\errmessage{%
\int_set:Nn \l__regex_right_state_int \l__regex_internal_a_tl
}
\cs_new_protected:Npn \__regex_build_transition_left:NNN #1#2#3
- { \__regex_toks_put_left:Ne #2 { #1 { \int_eval:n { #3 - #2 } } } }
+ { \__regex_toks_put_left:Ne #2 { #1 { \tex_the:D \__regex_int_eval:w #3 - #2 } } }
\cs_new_protected:Npn \__regex_build_transition_right:nNn #1#2#3
- { \__regex_toks_put_right:Ne #2 { #1 { \int_eval:n { #3 - #2 } } } }
+ { \__regex_toks_put_right:Ne #2 { #1 { \tex_the:D \__regex_int_eval:w #3 - #2 } } }
\cs_new_protected:Npn \__regex_build_new_state:
{
\__regex_toks_clear:N \l__regex_max_state_int
@@ -26578,11 +26610,11 @@ Type H <return> for immediate help}\def~{\errmessage{%
\__regex_toks_put_right:Ne \l__regex_left_state_int
{
\if_meaning:w \c_true_bool #1
- #2 { \int_eval:n { #3 - \l__regex_left_state_int } }
- #4 { \int_eval:n { #5 - \l__regex_left_state_int } }
+ #2 { \tex_the:D \__regex_int_eval:w #3 - \l__regex_left_state_int }
+ #4 { \tex_the:D \__regex_int_eval:w #5 - \l__regex_left_state_int }
\else:
- #4 { \int_eval:n { #5 - \l__regex_left_state_int } }
- #2 { \int_eval:n { #3 - \l__regex_left_state_int } }
+ #4 { \tex_the:D \__regex_int_eval:w #5 - \l__regex_left_state_int }
+ #2 { \tex_the:D \__regex_int_eval:w #3 - \l__regex_left_state_int }
\fi:
}
}
@@ -26629,7 +26661,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\__regex_class_repeat:n {#1}
\int_set:Nn \l__regex_internal_a_int
- { \l__regex_max_state_int + #2 - 1 }
+ { \l__regex_max_state_int + #2 - \c_one_int }
\prg_replicate:nn { #2 }
{
\__regex_build_transitions_lazyness:NNNNN #3
@@ -26682,8 +26714,8 @@ Type H <return> for immediate help}\def~{\errmessage{%
\use_none:nn #3 { \int_set:Nn \l__regex_capturing_group_int {#1} }
\int_set:Nn \l__regex_capturing_group_int {#2}
#3 {#4}
- \exp_args:Nf \__regex_group_resetting_loop:nnNn
- { \int_max:nn {#1} { \l__regex_capturing_group_int } }
+ \exp_args:Ne \__regex_group_resetting_loop:nnNn
+ { \int_max:nn {#1} \l__regex_capturing_group_int }
{#2}
}
\cs_new_protected:Npn \__regex_branch:n #1
@@ -26702,7 +26734,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\if_int_compare:w #2 = \c_zero_int
\int_set:Nn \l__regex_max_state_int
- { \l__regex_left_state_int - 1 }
+ { \l__regex_left_state_int - \c_one_int }
\__regex_build_new_state:
\else:
\__regex_group_repeat_aux:n {#2}
@@ -26724,14 +26756,14 @@ Type H <return> for immediate help}\def~{\errmessage{%
\l__regex_right_state_int \l__regex_max_state_int
\int_set_eq:NN \l__regex_internal_a_int \l__regex_left_state_int
\int_set_eq:NN \l__regex_internal_b_int \l__regex_max_state_int
- \if_int_compare:w \int_eval:n {#1} > \c_one_int
+ \if_int_compare:w \__regex_int_eval:w #1 > \c_one_int
\int_set:Nn \l__regex_internal_c_int
{
- ( #1 - 1 )
+ ( #1 - \c_one_int )
* ( \l__regex_internal_b_int - \l__regex_internal_a_int )
}
- \int_add:Nn \l__regex_right_state_int { \l__regex_internal_c_int }
- \int_add:Nn \l__regex_max_state_int { \l__regex_internal_c_int }
+ \int_add:Nn \l__regex_right_state_int \l__regex_internal_c_int
+ \int_add:Nn \l__regex_max_state_int \l__regex_internal_c_int
\__regex_toks_memcpy:NNn
\l__regex_internal_b_int
\l__regex_internal_a_int
@@ -26744,7 +26776,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\__regex_group_submatches:nNN {#1}
\l__regex_left_state_int \l__regex_right_state_int
\int_set:Nn \l__regex_internal_a_int
- { \l__regex_left_state_int - 1 }
+ { \l__regex_left_state_int - \c_one_int }
\__regex_build_transition_right:nNn \__regex_action_free:n
\l__regex_right_state_int \l__regex_internal_a_int
\__regex_build_new_state:
@@ -26784,7 +26816,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\l__regex_left_state_int \l__regex_max_state_int
}
\else:
- \prg_replicate:nn { #3 - 1 }
+ \prg_replicate:nn { #3 - \c_one_int }
{
\int_sub:Nn \l__regex_right_state_int
{ \l__regex_internal_b_int - \l__regex_internal_a_int }
@@ -26793,7 +26825,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\if_int_compare:w #2 = \c_zero_int
\int_set:Nn \l__regex_right_state_int
- { \l__regex_left_state_int - 1 }
+ { \l__regex_left_state_int - \c_one_int }
\else:
\int_sub:Nn \l__regex_right_state_int
{ \l__regex_internal_b_int - \l__regex_internal_a_int }
@@ -26814,8 +26846,8 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\__regex_action_free:n
{
- \int_eval:n
- { \l__regex_right_state_int - \l__regex_left_state_int }
+ \tex_the:D \__regex_int_eval:w
+ \l__regex_right_state_int - \l__regex_left_state_int
}
}
\bool_if:NT #1 { { } }
@@ -26853,12 +26885,12 @@ Type H <return> for immediate help}\def~{\errmessage{%
\__regex_build_new_state:
\__regex_toks_put_right:Ne \l__regex_left_state_int
{
- \__regex_action_submatch:nN { 0 } <
+ \__regex_action_submatch:nN \c_zero_int <
\bool_set_true:N \l__regex_fresh_thread_bool
\__regex_action_free:n
{
- \int_eval:n
- { \l__regex_right_state_int - \l__regex_left_state_int }
+ \tex_the:D \__regex_int_eval:w
+ \l__regex_right_state_int - \l__regex_left_state_int
}
\bool_set_false:N \l__regex_fresh_thread_bool
}
@@ -26918,10 +26950,10 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\bool_gset_false:N \g__regex_success_bool
\int_step_inline:nnn
- \l__regex_min_state_int { \l__regex_max_state_int - 1 }
+ \l__regex_min_state_int { \l__regex_max_state_int - \c_one_int }
{
\__kernel_intarray_gset:Nnn
- \g__regex_state_active_intarray {##1} { 1 }
+ \g__regex_state_active_intarray {##1} \c_one_int
}
\int_zero:N \l__regex_step_int
\int_set:Nn \l__regex_min_pos_int { 2 }
@@ -26929,7 +26961,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\int_set:Nn \l__regex_last_char_success_int { -2 }
\tl_build_begin:N \l__regex_matched_analysis_tl
\tl_clear:N \l__regex_curr_analysis_tl
- \int_set:Nn \l__regex_min_submatch_int { 1 }
+ \int_set_eq:NN \l__regex_min_submatch_int \c_one_int
\int_set_eq:NN \l__regex_submatch_int \l__regex_min_submatch_int
\bool_set_false:N \l__regex_empty_success_bool
}
@@ -26950,8 +26982,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ \prg_replicate:nn { 2 * \l__regex_capturing_group_int } { 0 , } }
\int_set_eq:NN \l__regex_max_thread_int \l__regex_min_thread_int
\__regex_store_state:n { \l__regex_min_state_int }
- \int_set:Nn \l__regex_curr_pos_int
- { \l__regex_start_pos_int - 1 }
+ \int_set:Nn \l__regex_curr_pos_int { \l__regex_start_pos_int - \c_one_int }
\int_set_eq:NN \l__regex_curr_char_int \l__regex_last_char_success_int
\tl_build_get_intermediate:NN \l__regex_matched_analysis_tl \l__regex_internal_a_tl
\exp_args:NNf \__regex_match_once_init_aux:
@@ -27003,15 +27034,15 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\int_set_eq:NN \l__regex_max_thread_int \l__regex_min_thread_int
\int_step_function:nnN
- { \l__regex_min_thread_int }
- { \l__regex_max_thread_int - 1 }
+ \l__regex_min_thread_int
+ { \l__regex_max_thread_int - \c_one_int }
\__regex_match_one_active:n
}
\prg_break_point:
\bool_set_false:N \l__regex_fresh_thread_bool
\if_int_compare:w \l__regex_max_thread_int > \l__regex_min_thread_int
\if_int_compare:w -2 < \l__regex_curr_char_int
- \exp_after:wN \exp_after:wN \exp_after:wN \use_none:n
+ \exp_after:wN \use_i:nn
\fi:
\fi:
\l__regex_every_match_tl
@@ -27021,25 +27052,25 @@ Type H <return> for immediate help}\def~{\errmessage{%
\__regex_use_state_and_submatches:w
\__kernel_intarray_range_to_clist:Nnn
\g__regex_thread_info_intarray
- { 1 + #1 * (\l__regex_capturing_group_int * 2 + 1) }
- { (1 + #1) * (\l__regex_capturing_group_int * 2 + 1) }
+ { \c_one_int + #1 * (\l__regex_capturing_group_int * 2 + \c_one_int) }
+ { (\c_one_int + #1) * (\l__regex_capturing_group_int * 2 + \c_one_int) }
;
}
\cs_new_protected:Npn \__regex_use_state:
{
\__kernel_intarray_gset:Nnn \g__regex_state_active_intarray
- { \l__regex_curr_state_int } { \l__regex_step_int }
+ \l__regex_curr_state_int \l__regex_step_int
\__regex_toks_use:w \l__regex_curr_state_int
\__kernel_intarray_gset:Nnn \g__regex_state_active_intarray
- { \l__regex_curr_state_int }
- { \int_eval:n { \l__regex_step_int + 1 } }
+ \l__regex_curr_state_int
+ { \__regex_int_eval:w \l__regex_step_int + \c_one_int \scan_stop: }
}
\cs_new_protected:Npn \__regex_use_state_and_submatches:w #1 , #2 ;
{
\int_set:Nn \l__regex_curr_state_int {#1}
\if_int_compare:w
\__kernel_intarray_item:Nn \g__regex_state_active_intarray
- { \l__regex_curr_state_int }
+ \l__regex_curr_state_int
< \l__regex_step_int
\tl_set:Nn \l__regex_curr_submatches_tl { #2 , }
\exp_after:wN \__regex_use_state:
@@ -27066,7 +27097,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\if_int_compare:w
\__kernel_intarray_item:Nn \g__regex_state_active_intarray
- { \l__regex_curr_state_int }
+ \l__regex_curr_state_int
#1
\exp_after:wN \__regex_use_state:
\fi:
@@ -27079,8 +27110,8 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \__regex_action_cost:n #1
{
- \exp_args:Ne \__regex_store_state:n
- { \int_eval:n { \l__regex_curr_state_int + #1 } }
+ \exp_args:No \__regex_store_state:n
+ { \tex_the:D \__regex_int_eval:w \l__regex_curr_state_int + #1 }
}
\cs_new_protected:Npn \__regex_store_state:n #1
{
@@ -27094,8 +27125,8 @@ Type H <return> for immediate help}\def~{\errmessage{%
\g__regex_thread_info_intarray
{
\__regex_int_eval:w
- 1 + \l__regex_max_thread_int *
- (\l__regex_capturing_group_int * 2 + 1)
+ \c_one_int + \l__regex_max_thread_int *
+ (\l__regex_capturing_group_int * 2 + \c_one_int)
}
{ #2 , #1 }
}
@@ -27165,11 +27196,11 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\if_int_compare:w #1 < #2 \exp_stop_f:
\else:
- \exp_after:wN \prg_break:
+ \prg_break:n
\fi:
\__regex_toks_use:w #1 \exp_stop_f:
\exp_after:wN \__regex_query_range_loop:ww
- \int_value:w \__regex_int_eval:w #1 + 1 ; #2 ;
+ \int_value:w \__regex_int_eval:w #1 + \c_one_int ; #2 ;
}
\cs_new:Npn \__regex_query_submatch:n #1
{
@@ -27179,22 +27210,21 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \__regex_submatch_balance:n #1
{
- \int_eval:n
- {
- \__regex_intarray_item:NnF \g__regex_balance_intarray
- {
- \__kernel_intarray_item:Nn
- \g__regex_submatch_end_intarray {#1}
- }
- { 0 }
- -
- \__regex_intarray_item:NnF \g__regex_balance_intarray
- {
- \__kernel_intarray_item:Nn
- \g__regex_submatch_begin_intarray {#1}
- }
- { 0 }
- }
+ \tex_the:D \__regex_int_eval:w
+ \__regex_intarray_item:NnF \g__regex_balance_intarray
+ {
+ \__kernel_intarray_item:Nn
+ \g__regex_submatch_end_intarray {#1}
+ }
+ \c_zero_int
+ -
+ \__regex_intarray_item:NnF \g__regex_balance_intarray
+ {
+ \__kernel_intarray_item:Nn
+ \g__regex_submatch_begin_intarray {#1}
+ }
+ \c_zero_int
+ \scan_stop:
}
\cs_new_protected:Npn \__regex_replacement:n
{ \__regex_replacement_apply:Nn \__regex_replacement_set:n }
@@ -27292,7 +27322,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ \tl_build_put_right:Nn \l__regex_build_tl }
\cs_new_protected:Npn \__regex_replacement_normal:n #1
{
- \int_compare:nNnTF { \l__regex_replacement_csnames_int } > 0
+ \int_compare:nNnTF \l__regex_replacement_csnames_int > \c_zero_int
{ \exp_args:No \__regex_replacement_put:n { \token_to_str:N #1 } }
{
\tl_if_empty:NTF \l__regex_replacement_category_tl
@@ -27340,7 +27370,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\cs_if_exist_use:cF { __regex_replacement_#1:w }
{
- \if_int_compare:w 1 < 1#1 \exp_stop_f:
+ \if_int_compare:w \c_one_int < 1#1 \exp_stop_f:
\__regex_replacement_put_submatch:n {#1}
\else:
\__regex_replacement_normal:n {#1}
@@ -27353,16 +27383,16 @@ Type H <return> for immediate help}\def~{\errmessage{%
\__regex_replacement_put_submatch_aux:n {#1}
\else:
\msg_expandable_error:nnff { regex } { submatch-too-big }
- {#1} { \int_eval:n { \l__regex_capturing_group_int - 1 } }
+ {#1} { \int_eval:n { \l__regex_capturing_group_int - \c_one_int } }
\fi:
}
\cs_new_protected:Npn \__regex_replacement_put_submatch_aux:n #1
{
\tl_build_put_right:Nn \l__regex_build_tl
- { \__regex_query_submatch:n { \int_eval:n { #1 + ##1 } } }
+ { \__regex_query_submatch:n { \__regex_int_eval:w #1 + ##1 \scan_stop: } }
\if_int_compare:w \l__regex_replacement_csnames_int = \c_zero_int
\tl_gput_right:Nn \g__regex_balance_tl
- { + \__regex_submatch_balance:n { \int_eval:n { #1 + ##1 } } }
+ { + \__regex_submatch_balance:n { \__regex_int_eval:w #1 + ##1 \scan_stop: } }
\fi:
}
\cs_new_protected:Npn \__regex_replacement_g:w #1#2
@@ -27375,7 +27405,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\token_if_eq_meaning:NNTF #1 \__regex_replacement_normal:n
{
- \if_int_compare:w 1 < 1#2 \exp_stop_f:
+ \if_int_compare:w \c_one_int < 1#2 \exp_stop_f:
#2
\exp_after:wN \use_i:nnn
\exp_after:wN \__regex_replacement_g_digits:NN
@@ -27451,7 +27481,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\token_if_eq_meaning:NNTF \prg_do_nothing: #3
{ \msg_error:nn { regex } { replacement-catcode-end } }
{
- \int_compare:nNnTF { \l__regex_replacement_csnames_int } > 0
+ \int_compare:nNnTF \l__regex_replacement_csnames_int > \c_zero_int
{
\msg_error:nnnn
{ regex } { replacement-catcode-in-cs } {#1} {#3}
@@ -27483,7 +27513,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\group_begin:
\cs_new_protected:Npn \__regex_replacement_char:nNN #1#2#3
{
- \tex_lccode:D 0 = `#3 \scan_stop:
+ \tex_lccode:D \c_zero_int = `#3 \scan_stop:
\tex_lowercase:D { \__regex_replacement_put:n {#1} }
}
\char_set_catcode_active:N \^^@
@@ -27638,7 +27668,6 @@ Type H <return> for immediate help}\def~{\errmessage{%
\prg_generate_conditional_variant:Nnn #2 { nV } { T , F , TF }
\cs_generate_variant:Nn #3 { NV }
\prg_generate_conditional_variant:Nnn #3 { NV } { T , F , TF }
-
}
\__regex_tmp:w \__regex_extract_once:nnN
\regex_extract_once:nnN \regex_extract_once:NnN
@@ -27696,8 +27725,8 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_new_protected:Npn \regex_replace_case_all:nNF #1#2
{ \regex_replace_case_all:nNTF {#1} {#2} { } }
\int_new:N \l__regex_match_count_int
-\flag_new:n { __regex_begin }
-\flag_new:n { __regex_end }
+\flag_new:N \l__regex_begin_flag
+\flag_new:N \l__regex_end_flag
\int_new:N \l__regex_min_submatch_int
\int_new:N \l__regex_submatch_int
\int_new:N \l__regex_zeroth_submatch_int
@@ -27731,7 +27760,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\int_incr:N \l__regex_curr_pos_int
\__regex_toks_set:Nn \l__regex_curr_pos_int {#1}
\__kernel_intarray_gset:Nnn \g__regex_balance_intarray
- { \l__regex_curr_pos_int } { \l__regex_balance_int }
+ \l__regex_curr_pos_int \l__regex_balance_int
\if_case:w "#2 \exp_stop_f:
\or: \int_incr:N \l__regex_balance_int
\or: \int_decr:N \l__regex_balance_int
@@ -27803,29 +27832,29 @@ Type H <return> for immediate help}\def~{\errmessage{%
\l__regex_start_pos_int < \l__regex_success_pos_int
\__regex_extract:
\__kernel_intarray_gset:Nnn \g__regex_submatch_prev_intarray
- { \l__regex_zeroth_submatch_int } { 0 }
+ \l__regex_zeroth_submatch_int \c_zero_int
\__kernel_intarray_gset:Nnn \g__regex_submatch_end_intarray
- { \l__regex_zeroth_submatch_int }
+ \l__regex_zeroth_submatch_int
{
\__kernel_intarray_item:Nn \g__regex_submatch_begin_intarray
- { \l__regex_zeroth_submatch_int }
+ \l__regex_zeroth_submatch_int
}
\__kernel_intarray_gset:Nnn \g__regex_submatch_begin_intarray
- { \l__regex_zeroth_submatch_int }
- { \l__regex_start_pos_int }
+ \l__regex_zeroth_submatch_int
+ \l__regex_start_pos_int
\fi:
}
#1
\__regex_match:n {#2}
\__regex_query_set:n {#2}
\__kernel_intarray_gset:Nnn \g__regex_submatch_prev_intarray
- { \l__regex_submatch_int } { 0 }
+ \l__regex_submatch_int \c_zero_int
\__kernel_intarray_gset:Nnn \g__regex_submatch_end_intarray
- { \l__regex_submatch_int }
- { \l__regex_max_pos_int }
+ \l__regex_submatch_int
+ \l__regex_max_pos_int
\__kernel_intarray_gset:Nnn \g__regex_submatch_begin_intarray
- { \l__regex_submatch_int }
- { \l__regex_start_pos_int }
+ \l__regex_submatch_int
+ \l__regex_start_pos_int
\int_incr:N \l__regex_submatch_int
\if_meaning:w \c_true_bool \l__regex_empty_success_bool
\if_int_compare:w \l__regex_start_pos_int = \l__regex_max_pos_int
@@ -27836,24 +27865,24 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \__regex_group_end_extract_seq:N #1
{
- \flag_clear:n { __regex_begin }
- \flag_clear:n { __regex_end }
+ \flag_clear:N \l__regex_begin_flag
+ \flag_clear:N \l__regex_end_flag
\cs_set_eq:NN \__regex_tmp:w \scan_stop:
- \__kernel_tl_gset:Ne \g__regex_internal_tl
+ \__kernel_tl_gset:Nx \g__regex_internal_tl
{
- \int_step_function:nnN { \l__regex_min_submatch_int }
- { \l__regex_submatch_int - 1 } \__regex_extract_seq_aux:n
+ \int_step_function:nnN \l__regex_min_submatch_int
+ { \l__regex_submatch_int - \c_one_int } \__regex_extract_seq_aux:n
\__regex_tmp:w
}
\int_set:Nn \l__regex_added_begin_int
- { \flag_height:n { __regex_begin } }
+ { \flag_height:N \l__regex_begin_flag }
\int_set:Nn \l__regex_added_end_int
- { \flag_height:n { __regex_end } }
+ { \flag_height:N \l__regex_end_flag }
\tex_afterassignment:D \__regex_extract_check:w
- \__kernel_tl_gset:Ne \g__regex_internal_tl
+ \__kernel_tl_gset:Nx \g__regex_internal_tl
{ \g__regex_internal_tl \if_false: { \fi: } }
\int_compare:nNnT
- { \l__regex_added_begin_int + \l__regex_added_end_int } > 0
+ { \l__regex_added_begin_int + \l__regex_added_end_int } > \c_zero_int
{
\msg_error:nneee { regex } { result-unbalanced }
{ splitting~or~extracting~submatches }
@@ -27889,7 +27918,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\if_int_compare:w #1 < \c_zero_int
\prg_replicate:nn {-#1}
{
- \flag_raise:n { __regex_begin }
+ \flag_raise:N \l__regex_begin_flag
\exp_not:n { { \if_false: } \fi: }
}
\fi:
@@ -27897,7 +27926,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\if_int_compare:w #1 > \c_zero_int
\prg_replicate:nn {#1}
{
- \flag_raise:n { __regex_end }
+ \flag_raise:N \l__regex_end_flag
\exp_not:n { \if_false: { \fi: } }
}
\fi:
@@ -27914,7 +27943,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
\int_incr:N \l__regex_added_begin_int
\int_incr:N \l__regex_added_end_int
\tex_afterassignment:D \__regex_extract_check:w
- \__kernel_tl_gset:Ne \g__regex_internal_tl
+ \__kernel_tl_gset:Nx \g__regex_internal_tl
{
\exp_after:wN \__regex_extract_check_loop:w
\g__regex_internal_tl
@@ -27945,15 +27974,15 @@ Type H <return> for immediate help}\def~{\errmessage{%
\prg_replicate:nn \l__regex_capturing_group_int
{
\__kernel_intarray_gset:Nnn \g__regex_submatch_prev_intarray
- { \l__regex_submatch_int } { 0 }
+ \l__regex_submatch_int \c_zero_int
\__kernel_intarray_gset:Nnn \g__regex_submatch_case_intarray
- { \l__regex_submatch_int } { 0 }
+ \l__regex_submatch_int \c_zero_int
\int_incr:N \l__regex_submatch_int
}
\__kernel_intarray_gset:Nnn \g__regex_submatch_prev_intarray
- { \l__regex_zeroth_submatch_int } { \l__regex_start_pos_int }
+ \l__regex_zeroth_submatch_int \l__regex_start_pos_int
\__kernel_intarray_gset:Nnn \g__regex_submatch_case_intarray
- { \l__regex_zeroth_submatch_int } { \g__regex_case_int }
+ \l__regex_zeroth_submatch_int \g__regex_case_int
\int_zero:N \l__regex_internal_a_int
\exp_after:wN \__regex_extract_aux:w \l__regex_success_submatches_tl
\prg_break_point: \__regex_use_none_delimit_by_q_recursion_stop:w ,
@@ -27968,7 +27997,12 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ \__regex_int_eval:w \l__regex_zeroth_submatch_int + \l__regex_internal_a_int } {#1}
\else:
\__kernel_intarray_gset:Nnn \g__regex_submatch_end_intarray
- { \__regex_int_eval:w \l__regex_zeroth_submatch_int + \l__regex_internal_a_int - \l__regex_capturing_group_int } {#1}
+ {
+ \__regex_int_eval:w
+ \l__regex_zeroth_submatch_int + \l__regex_internal_a_int
+ - \l__regex_capturing_group_int
+ }
+ {#1}
\fi:
\int_incr:N \l__regex_internal_a_int
\__regex_extract_aux:w
@@ -27987,20 +28021,16 @@ Type H <return> for immediate help}\def~{\errmessage{%
\exp_args:No \__regex_query_set:n {#3}
#2
\int_set:Nn \l__regex_balance_int
+ { \__regex_replacement_balance_one_match:n \l__regex_zeroth_submatch_int }
+ \__kernel_tl_set:Nx \l__regex_internal_a_tl
{
- \__regex_replacement_balance_one_match:n
- { \l__regex_zeroth_submatch_int }
- }
- \__kernel_tl_set:Ne \l__regex_internal_a_tl
- {
- \__regex_replacement_do_one_match:n
- { \l__regex_zeroth_submatch_int }
+ \__regex_replacement_do_one_match:n \l__regex_zeroth_submatch_int
\__regex_query_range:nn
{
\__kernel_intarray_item:Nn \g__regex_submatch_end_intarray
- { \l__regex_zeroth_submatch_int }
+ \l__regex_zeroth_submatch_int
}
- { \l__regex_max_pos_int }
+ \l__regex_max_pos_int
}
\__regex_group_end_replace:N #3
}
@@ -28018,19 +28048,19 @@ Type H <return> for immediate help}\def~{\errmessage{%
#2
\int_set:Nn \l__regex_balance_int
{
- 0
+ \c_zero_int
\int_step_function:nnnN
- { \l__regex_min_submatch_int }
+ \l__regex_min_submatch_int
\l__regex_capturing_group_int
- { \l__regex_submatch_int - 1 }
+ { \l__regex_submatch_int - \c_one_int }
\__regex_replacement_balance_one_match:n
}
- \__kernel_tl_set:Ne \l__regex_internal_a_tl
+ \__kernel_tl_set:Nx \l__regex_internal_a_tl
{
\int_step_function:nnnN
- { \l__regex_min_submatch_int }
+ \l__regex_min_submatch_int
\l__regex_capturing_group_int
- { \l__regex_submatch_int - 1 }
+ { \l__regex_submatch_int - \c_one_int }
\__regex_replacement_do_one_match:n
\__regex_query_range:nn
\l__regex_start_pos_int \l__regex_max_pos_int
@@ -28040,11 +28070,12 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_new_protected:Npn \__regex_group_end_replace:N #1
{
\int_set:Nn \l__regex_added_begin_int
- { \int_max:nn { - \l__regex_balance_int } { 0 } }
+ { \int_max:nn { - \l__regex_balance_int } \c_zero_int }
\int_set:Nn \l__regex_added_end_int
- { \int_max:nn { \l__regex_balance_int } { 0 } }
+ { \int_max:nn \l__regex_balance_int \c_zero_int }
\__regex_group_end_replace_try:
- \int_compare:nNnT { \l__regex_added_begin_int + \l__regex_added_end_int } > 0
+ \int_compare:nNnT { \l__regex_added_begin_int + \l__regex_added_end_int }
+ > \c_zero_int
{
\msg_error:nneee { regex } { result-unbalanced }
{ replacing } { \int_use:N \l__regex_added_begin_int }
@@ -28056,11 +28087,11 @@ Type H <return> for immediate help}\def~{\errmessage{%
\cs_new_protected:Npn \__regex_group_end_replace_try:
{
\tex_afterassignment:D \__regex_group_end_replace_check:w
- \__kernel_tl_gset:Ne \g__regex_internal_tl
+ \__kernel_tl_gset:Nx \g__regex_internal_tl
{
- \prg_replicate:nn { \l__regex_added_begin_int } { { \if_false: } \fi: }
+ \prg_replicate:nn \l__regex_added_begin_int { { \if_false: } \fi: }
\l__regex_internal_a_tl
- \prg_replicate:nn { \l__regex_added_end_int } { \if_false: { \fi: } }
+ \prg_replicate:nn \l__regex_added_end_int { \if_false: { \fi: } }
\if_false: { \fi: }
}
}
@@ -28212,14 +28243,13 @@ Type H <return> for immediate help}\def~{\errmessage{%
\use:e
{
\exp_not:n { \exp_after:wN \l__regex_peek_true_tl \exp:w }
- \__regex_replacement_do_one_match:n
- { \l__regex_zeroth_submatch_int }
+ \__regex_replacement_do_one_match:n \l__regex_zeroth_submatch_int
\__regex_query_range:nn
{
\__kernel_intarray_item:Nn \g__regex_submatch_end_intarray
- { \l__regex_zeroth_submatch_int }
+ \l__regex_zeroth_submatch_int
}
- { \l__regex_max_pos_int }
+ \l__regex_max_pos_int
\exp_end:
}
}
@@ -28255,10 +28285,14 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\if_case:w \l__regex_replacement_csnames_int
\tl_build_put_right:Nn \l__regex_build_tl
- { \__regex_query_submatch:n { \int_eval:n { #1 + ##1 } } }
+ { \__regex_query_submatch:n { \__regex_int_eval:w #1 + ##1 \scan_stop: } }
\else:
\tl_build_put_right:Nn \l__regex_build_tl
- { \exp:w \__regex_query_submatch:n { \int_eval:n { #1 + ##1 } } \exp_end: }
+ {
+ \exp:w
+ \__regex_query_submatch:n { \__regex_int_eval:w #1 + ##1 \scan_stop: }
+ \exp_end:
+ }
\fi:
}
\cs_new_protected:Npn \__regex_peek_replacement_var:N #1
@@ -28589,7 +28623,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\int_step_inline:nnn
\l__regex_min_state_int
- { \l__regex_max_state_int - 1 }
+ { \l__regex_max_state_int - \c_one_int }
{
\__regex_trace:nne { regex } {#1}
{ \iow_char:N \\toks ##1 = { \__regex_toks_use:w ##1 } }
@@ -36451,17 +36485,6 @@ Type H <return> for immediate help}\def~{\errmessage{%
\q_recursion_tail ? { }
\q_recursion_stop
\group_end:
-%% File: l3candidates.dtx
-\cs_new_protected:Npn \seq_set_filter:NNn
- { \__seq_set_filter:NNNn \__kernel_tl_set:Ne }
-\cs_new_protected:Npn \seq_gset_filter:NNn
- { \__seq_set_filter:NNNn \__kernel_tl_gset:Ne }
-\cs_new_protected:Npn \__seq_set_filter:NNNn #1#2#3#4
- {
- \__seq_push_item_def:n { \bool_if:nT {#4} { \__seq_wrap_item:n {##1} } }
- #1 #2 { #3 }
- \__seq_pop_item_def:
- }
%% File: l3legacy.dtx
\prg_new_conditional:Npnn \legacy_if:n #1 { p , T , F , TF }
{
@@ -36548,220 +36571,6 @@ Type H <return> for immediate help}\def~{\errmessage{%
\tl_if_blank:nF {#3} { Use~ \tl_trim_spaces:n {#3} ~not~ }
#2~deprecated~on~#1.
}
-\cs_new_protected:Npn \__deprecation_old_protected:Nnn #1#2#3
- {
- \__kernel_patch_deprecation:nnNNpn {#3} {#2}
- \cs_gset_protected:Npn #1 { }
- }
-\cs_new_protected:Npn \__deprecation_old:Nnn #1#2#3
- {
- \__kernel_patch_deprecation:nnNNpn {#3} {#2}
- \cs_gset:Npn #1 { }
- }
-\__deprecation_old_protected:Nnn \box_gset_eq_clear:NN
- { \box_gset_eq_drop:NN } { 2021-07-01 }
-\__deprecation_old_protected:Nnn \box_set_eq_clear:NN
- { \box_set_eq_drop:NN } { 2021-07-01 }
-\__deprecation_old_protected:Nnn \box_resize:Nnn
- { \box_resize_to_wd_and_ht_plus_dp:Nnn } { 2019-01-01 }
-\__deprecation_old_protected:Nnn \box_use_clear:N
- { \box_use_drop:N } { 2019-01-01 }
-\__deprecation_old:Nnn \c_job_name_tl
- { \c_sys_jobname_str } { 2017-01-01 }
-\__deprecation_old:Nnn \c_minus_one
- { -1 } { 2019-01-01 }
-\__deprecation_old:Nnn \c_zero
- { 0 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_one
- { 1 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_two
- { 2 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_three
- { 3 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_four
- { 4 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_five
- { 5 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_six
- { 6 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_seven
- { 7 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_eight
- { 8 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_nine
- { 9 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_ten
- { 10 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_eleven
- { 11 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_twelve
- { 12 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_thirteen
- { 13 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_fourteen
- { 14 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_fifteen
- { 15 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_sixteen
- { 16 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_thirty_two
- { 32 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_one_hundred
- { 100 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_two_hundred_fifty_five
- { 255 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_two_hundred_fifty_six
- { 256 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_one_thousand
- { 1000 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_ten_thousand
- { 10000 } { 2020-01-01 }
-\__deprecation_old:Nnn \c_term_ior
- { -1 } { 2021-07-01 }
-\__deprecation_old:Nnn \dim_case:nnn
- { \dim_case:nnF } { 2015-07-14 }
-\__deprecation_old_protected:Nnn \file_add_path:nN
- { \file_get_full_name:nN } { 2019-01-01 }
-\__deprecation_old_protected:Nnn \file_if_exist_input:nT
- { \file_if_exist:nT and~ \file_input:n } { 2018-03-05 }
-\__deprecation_old_protected:Nnn \file_if_exist_input:nTF
- { \file_if_exist:nT and~ \file_input:n } { 2018-03-05 }
-\__deprecation_old_protected:Nnn \file_list:
- { \file_log_list: } { 2019-01-01 }
-\__deprecation_old:Nnn \file_path_include:n
- { \seq_put_right:Nn \l_file_search_path_seq } { 2019-01-01 }
-\__deprecation_old_protected:Nnn \file_path_remove:n
- { \seq_remove_all:Nn \l_file_search_path_seq } { 2019-01-01 }
-\__deprecation_old:Nnn \g_file_current_name_tl
- { \g_file_curr_name_str } { 2019-01-01 }
-\__deprecation_old_protected:Nnn \hbox_unpack_clear:N
- { \hbox_unpack_drop:N } { 2021-07-01 }
-\__deprecation_old:Nnn \int_case:nnn
- { \int_case:nnF } { 2015-07-14 }
-\__deprecation_old:Nnn \int_from_binary:n
- { \int_from_bin:n } { 2016-01-05 }
-\__deprecation_old:Nnn \int_from_hexadecimal:n
- { \int_from_hex:n } { 2016-01-05 }
-\__deprecation_old:Nnn \int_from_octal:n
- { \int_from_oct:n } { 2016-01-05 }
-\__deprecation_old:Nnn \int_to_binary:n
- { \int_to_bin:n } { 2016-01-05 }
-\__deprecation_old:Nnn \int_to_hexadecimal:n
- { \int_to_hex:n } { 2016-01-05 }
-\__deprecation_old:Nnn \int_to_octal:n
- { \int_to_oct:n } { 2016-01-05 }
-\__deprecation_old_protected:Nnn \ior_get_str:NN
- { \ior_str_get:NN } { 2018-03-05 }
-\__deprecation_old_protected:Nnn \ior_list_streams:
- { \ior_show_list: } { 2019-01-01 }
-\__deprecation_old_protected:Nnn \ior_log_streams:
- { \ior_log_list: } { 2019-01-01 }
-\__deprecation_old_protected:Nnn \iow_list_streams:
- { \iow_show_list: } { 2019-01-01 }
-\__deprecation_old_protected:Nnn \iow_log_streams:
- { \iow_log_list: } { 2019-01-01 }
-\__deprecation_old:Nnn \lua_escape_x:n
- { \lua_escape:e } { 2020-01-01 }
-\__deprecation_old:Nnn \lua_now_x:n
- { \lua_now:e } { 2020-01-01 }
-\__deprecation_old_protected:Nnn \lua_shipout_x:n
- { \lua_shipout_e:n } { 2020-01-01 }
-\__deprecation_old:Nnn \luatex_if_engine_p:
- { \sys_if_engine_luatex_p: } { 2017-01-01 }
-\__deprecation_old:Nnn \luatex_if_engine:F
- { \sys_if_engine_luatex:F } { 2017-01-01 }
-\__deprecation_old:Nnn \luatex_if_engine:T
- { \sys_if_engine_luatex:T } { 2017-01-01 }
-\__deprecation_old:Nnn \luatex_if_engine:TF
- { \sys_if_engine_luatex:TF } { 2017-01-01 }
-\__deprecation_old_protected:Nnn \msg_interrupt:nnn
- { [Defined~error~message] } { 2020-01-01 }
-\__deprecation_old_protected:Nnn \msg_log:n
- { \iow_log:n } { 2020-01-01 }
-\__deprecation_old_protected:Nnn \msg_term:n
- { \iow_term:n } { 2020-01-01 }
-\__deprecation_old:Nnn \pdftex_if_engine_p:
- { \sys_if_engine_pdftex_p: } { 2017-01-01 }
-\__deprecation_old:Nnn \pdftex_if_engine:F
- { \sys_if_engine_pdftex:F } { 2017-01-01 }
-\__deprecation_old:Nnn \pdftex_if_engine:T
- { \sys_if_engine_pdftex:T } { 2017-01-01 }
-\__deprecation_old:Nnn \pdftex_if_engine:TF
- { \sys_if_engine_pdftex:TF } { 2017-01-01 }
-\__deprecation_old:Nnn \prop_get:cn
- { \prop_item:cn } { 2016-01-05 }
-\__deprecation_old:Nnn \prop_get:Nn
- { \prop_item:Nn } { 2016-01-05 }
-\__deprecation_old:Nnn \quark_if_recursion_tail_break:N
- { } { 2015-07-14 }
-\__deprecation_old:Nnn \quark_if_recursion_tail_break:n
- { } { 2015-07-14 }
-\__deprecation_old:Nnn \scan_align_safe_stop:
- { protected~commands } { 2017-01-01 }
-\__deprecation_old:Nnn \sort_ordered:
- { \sort_return_same: } { 2019-01-01 }
-\__deprecation_old:Nnn \sort_reversed:
- { \sort_return_swapped: } { 2019-01-01 }
-\__deprecation_old:Nnn \str_case:nnn
- { \str_case:nnF } { 2015-07-14 }
-\__deprecation_old:Nnn \str_case:onn
- { \str_case:onF } { 2015-07-14 }
-\__deprecation_old:Nnn \str_case_x:nn
- { \str_case_e:nn } { 2020-01-01 }
-\__deprecation_old:Nnn \str_case_x:nnn
- { \str_case_e:nnF } { 2015-07-14 }
-\__deprecation_old:Nnn \str_case_x:nnT
- { \str_case_e:nnT } { 2020-01-01 }
-\__deprecation_old:Nnn \str_case_x:nnTF
- { \str_case_e:nnTF } { 2020-01-01 }
-\__deprecation_old:Nnn \str_case_x:nnF
- { \str_case_e:nnF } { 2020-01-01 }
-\__deprecation_old:Nnn \str_if_eq_x_p:nn
- { \str_if_eq_p:ee } { 2020-01-01 }
-\__deprecation_old:Nnn \str_if_eq_x:nnT
- { \str_if_eq:eeT } { 2020-01-01 }
-\__deprecation_old:Nnn \str_if_eq_x:nnF
- { \str_if_eq:eeF } { 2020-01-01 }
-\__deprecation_old:Nnn \str_if_eq_x:nnTF
- { \str_if_eq:eeTF } { 2020-01-01 }
-\__deprecation_old_protected:Nnn \tl_show_analysis:N
- { \tl_analysis_show:N } { 2020-01-01 }
-\__deprecation_old_protected:Nnn \tl_show_analysis:n
- { \tl_analysis_show:n } { 2020-01-01 }
-\__deprecation_old:Nnn \tl_case:cnn
- { \exp_args:Nc \token_case_meaning:NnF } { 2015-07-14 }
-\__deprecation_old:Nnn \tl_case:Nnn
- { \token_case_meaning:NnF } { 2015-07-14 }
-\__deprecation_old_protected:Nnn \tl_gset_from_file:Nnn
- { \file_get:nnN } { 2021-07-01 }
-\__deprecation_old_protected:Nnn \tl_gset_from_file_x:Nnn
- { \file_get:nnN } { 2021-07-01 }
-\__deprecation_old_protected:Nnn \tl_set_from_file:Nnn
- { \file_get:nnN } { 2021-07-01 }
-\__deprecation_old_protected:Nnn \tl_set_from_file_x:Nnn
- { \file_get:nnN } { 2021-07-01 }
-\__deprecation_old_protected:Nnn \tl_to_lowercase:n
- { \tex_lowercase:D } { 2018-03-05 }
-\__deprecation_old_protected:Nnn \tl_to_uppercase:n
- { \tex_uppercase:D } { 2018-03-05 }
-\__deprecation_old:Nnn \token_get_arg_spec:N
- { \cs_argument_spec:N } { 2021-07-01 }
-\__deprecation_old:Nnn \token_get_prefix_spec:N
- { \cs_prefix_spec:N } { 2021-07-01 }
-\__deprecation_old:Nnn \token_get_replacement_spec:N
- { \cs_replacement_spec:N } { 2021-07-01 }
-\__deprecation_old_protected:Nnn \token_new:Nn
- { \cs_new_eq:NN } { 2019-01-01 }
-\__deprecation_old_protected:Nnn \vbox_unpack_clear:N
- { \vbox_unpack_drop:N } { 2021-07-01 }
-\__deprecation_old:Nnn \xetex_if_engine_p:
- { \sys_if_engine_xetex_p: } { 2017-01-01 }
-\__deprecation_old:Nnn \xetex_if_engine:F
- { \sys_if_engine_xetex:F } { 2017-01-01 }
-\__deprecation_old:Nnn \xetex_if_engine:T
- { \sys_if_engine_xetex:T } { 2017-01-01 }
-\__deprecation_old:Nnn \xetex_if_engine:TF
- { \sys_if_engine_xetex:TF } { 2017-01-01 }
\cs_gset:Npn \cs_argument_spec:N { \cs_parameter_spec:N }
\cs_new_protected:Npn \iow_shipout_x:Nn { \iow_shipout_e:Nn }
\cs_generate_variant:Nn \iow_shipout_x:Nn { Nx , c, cx }
@@ -36781,6 +36590,12 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ \__keys_variable_set:NnnN #1 { tl } { g } x }
\cs_new_protected:cpn { \c__keys_props_root_str .tl_gset_x:c } #1
{ \__keys_variable_set:cnnN {#1} { tl } { g } x }
+\cs_set_protected:Npn \keys_set_filter:nnn { \keys_set_exclude_groups:nnn }
+\cs_generate_variant:Nn \keys_set_filter:nnn { nnV , nnv , nno }
+\cs_set_protected:Npn \keys_set_filter:nnnN { \keys_set_exclude_groups:nnnN }
+\cs_generate_variant:Nn \keys_set_filter:nnnN { nnV , nnv , nno }
+\cs_set_protected:Npn \keys_set_filter:nnnnN { \keys_set_exclude_groups:nnnnN }
+\cs_generate_variant:Nn \keys_set_filter:nnnnN { nnV , nnv , nno }
\prop_new:N \g__pdf_object_prop
\__kernel_patch_deprecation:nnNNpn { 2022-08-30 } { [\pdf_object_new:n] }
\cs_new_protected:Npn \pdf_object_new:nn #1#2
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex
index ea54c39293e..3a05b2b303e 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex
+++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: expl3.dtx
-\def\ExplFileDate{2024-01-04}%
+\def\ExplFileDate{2024-01-22}%
\let\ExplLoaderFileDate\ExplFileDate
\begingroup
\catcode`\_=11
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx b/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx
index a37c8e41829..016df8683d9 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx
+++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: expl3.dtx
-\def\ExplFileDate{2024-01-04}%
+\def\ExplFileDate{2024-01-22}%
\let\ExplLoaderFileDate\ExplFileDate
\begingroup
\catcode`\_=11
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty
index 6e2bffbc859..230e5567dd5 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty
+++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: expl3.dtx
-\def\ExplFileDate{2024-01-04}%
+\def\ExplFileDate{2024-01-22}%
\let\ExplLoaderFileDate\ExplFileDate
\ProvidesPackage{expl3}
[%
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3debug.def b/Master/texmf-dist/tex/latex/l3kernel/l3debug.def
index 28e21e3a6eb..c988bf2bd80 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3debug.def
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3debug.def
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: l3debug.dtx
-\ProvidesExplFile{l3debug.def}{2024-01-04}{}{L3 Debugging support}
+\ProvidesExplFile{l3debug.def}{2024-01-22}{}{L3 Debugging support}
\scan_new:N \s__debug_stop
\cs_new:Npn \__debug_use_i_delimit_by_s_stop:nw #1 #2 \s__debug_stop {#1}
\quark_new:N \q__debug_recursion_tail
@@ -71,7 +71,7 @@
}
\cs_set_protected:Npn \debug_resume:
{
- \__kernel_tl_set:Ne \l__debug_suspended_tl
+ \__kernel_tl_set:Nx \l__debug_suspended_tl
{ \tl_tail:N \l__debug_suspended_tl }
\tl_if_empty:NT \l__debug_suspended_tl
{
@@ -82,7 +82,7 @@
\cs_new_protected:Npn \__kernel_chk_var_exist:N #1 { }
\cs_new_protected:Npn \__kernel_chk_cs_exist:N #1 { }
\cs_generate_variant:Nn \__kernel_chk_cs_exist:N { c }
-\cs_new:Npn \__kernel_chk_flag_exist:n #1 { }
+\cs_new:Npn \__kernel_chk_flag_exist:NN { }
\cs_new_protected:Npn \__kernel_chk_var_local:N #1 { }
\cs_new_protected:Npn \__kernel_chk_var_global:N #1 { }
\cs_new_protected:Npn \__kernel_chk_var_scope:NN #1#2 { }
@@ -106,13 +106,14 @@
{ \token_to_str:N ##1 }
}
}
- \cs_set:Npn \__kernel_chk_flag_exist:n ##1
+ \cs_set:Npn \__kernel_chk_flag_exist:NN ##1##2
{
- \__debug_suspended:T \use_none:nnn
- \flag_if_exist:nF {##1}
+ \__debug_suspended:T \use_iii:nnnn
+ \flag_if_exist:NTF ##2
+ { ##1 ##2 }
{
- \msg_expandable_error:nnn
- { kernel } { bad-variable } { flag~##1~ }
+ \msg_expandable_error:nnn { kernel } { bad-variable } {##2}
+ ##1 \l_tmpa_flag
}
}
\cs_set_protected:Npn \__kernel_chk_var_scope:NN
@@ -137,7 +138,7 @@
{
\cs_set_protected:Npn \__kernel_chk_var_exist:N ##1 { }
\cs_set_protected:Npn \__kernel_chk_cs_exist:N ##1 { }
- \cs_set:Npn \__kernel_chk_flag_exist:N ##1 { }
+ \cs_set:Npn \__kernel_chk_flag_exist:NN { }
\cs_set_protected:Npn \__kernel_chk_var_local:N ##1 { }
\cs_set_protected:Npn \__kernel_chk_var_global:N ##1 { }
\cs_set_protected:Npn \__kernel_chk_var_scope:NN ##1##2 { }
@@ -213,11 +214,11 @@
\tl_new:N \l__debug_tmpb_tl
\cs_new_protected:Npn \__debug_generate_parameter_list:NNN #1#2#3
{
- \__kernel_tl_set:Ne \l__debug_internal_tl
+ \__kernel_tl_set:Nx \l__debug_internal_tl
{ \exp_last_unbraced:Nf \use_ii:nnn \cs_split_function:N #1 }
- \__kernel_tl_set:Ne #2
+ \__kernel_tl_set:Nx #2
{ \exp_args:NV \__debug_build_parm_text:n \l__debug_internal_tl }
- \__kernel_tl_set:Ne #3
+ \__kernel_tl_set:Nx #3
{ \exp_args:NV \__debug_build_arg_list:n \l__debug_internal_tl }
}
\cs_new:Npn \__debug_build_parm_text:n #1
@@ -423,8 +424,8 @@
\tl_concat:NNN
\tl_gconcat:NNN
}
-\cs_gset_protected:Npn \__kernel_tl_set:Ne { \cs_set_nopar:Npe }
-\cs_gset_protected:Npn \__kernel_tl_gset:Ne { \cs_gset_nopar:Npe }
+\cs_gset_protected:Npn \__kernel_tl_set:Nx { \cs_set_nopar:Npe }
+\cs_gset_protected:Npn \__kernel_tl_gset:Nx { \cs_gset_nopar:Npe }
\__kernel_patch:nnn
{ \__kernel_chk_var_local:N #1 }
{ }
@@ -470,7 +471,7 @@
\str_set_eq:NN
\str_put_left:Nn
\str_put_right:Nn
- \__kernel_tl_set:Ne
+ \__kernel_tl_set:Nx
\tl_clear:N
\tl_set_eq:NN
\tl_put_left:Nn
@@ -539,7 +540,7 @@
\str_gset_eq:NN
\str_gput_left:Nn
\str_gput_right:Nn
- \__kernel_tl_gset:Ne
+ \__kernel_tl_gset:Nx
\tl_gclear:N
\tl_gset_eq:NN
\tl_gput_left:Nn
@@ -577,16 +578,16 @@
\tl_const:Nn
}
\__kernel_patch:nnn
- { \__kernel_chk_flag_exist:n {#1} }
+ { \__kernel_chk_flag_exist:NN }
{ }
{
- \flag_if_raised:nT
- \flag_if_raised:nF
- \flag_if_raised:nTF
- \flag_if_raised_p:n
- \flag_height:n
- \flag_ensure_raised:n
- \flag_clear:n
+ \flag_ensure_raised:N
+ \flag_height:N
+ \flag_if_raised:NT
+ \flag_if_raised:NF
+ \flag_if_raised:NTF
+ \flag_if_raised_p:N
+ \flag_raise:N
}
\__kernel_patch:nnn
{ \__kernel_chk_cs_exist:N #1 }
@@ -597,6 +598,17 @@
{ }
{ \cctab_new:N }
\__kernel_patch:nnn
+ { \__kernel_chk_var_scope:NN l #1 }
+ { }
+ { \flag_new:N }
+ \__kernel_patch:nnn
+ {
+ \__kernel_chk_var_scope:NN l #1
+ \__kernel_chk_flag_exist:NN
+ }
+ { }
+ { \flag_clear:N }
+ \__kernel_patch:nnn
{ \__kernel_chk_var_scope:NN g #1 }
{ }
{ \intarray_new:Nn }
@@ -662,7 +674,7 @@
{
\__regex_trace_push:nnN { regex } { 1 } \__regex_escape_use:nnnn
\group_begin:
- \__kernel_tl_set:Ne \l__regex_internal_a_tl
+ \__kernel_tl_set:Nx \l__regex_internal_a_tl
{ \__regex_trace_pop:nnN { regex } { 1 } \__regex_escape_use:nnnn }
\use_none:nnn
}
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls
index c8603e6af79..a77b2476789 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls
@@ -20,7 +20,7 @@
%%
%% File: l3doc.dtx
\RequirePackage{calc}
-\ProvidesExplClass{l3doc}{2024-01-04}{}
+\ProvidesExplClass{l3doc}{2024-01-22}{}
{L3 Experimental documentation class}
\clist_new:N \g_docinput_clist
\seq_new:N \g_doc_functions_seq
@@ -116,7 +116,7 @@
\cs_new_protected:Npn \__codedoc_trim_right:Nn #1#2
{
\cs_set:Npn \__codedoc_tmp:w ##1 #2 ##2 \q_stop { \exp_not:n {##1} }
- \__kernel_tl_set:Ne #1 { \exp_after:wN \__codedoc_tmp:w #1 #2 \q_stop }
+ \__kernel_tl_set:Nx #1 { \exp_after:wN \__codedoc_tmp:w #1 #2 \q_stop }
}
\cs_generate_variant:Nn \__codedoc_trim_right:Nn { No }
\prg_new_protected_conditional:Npnn \__codedoc_str_if_begin:nn #1#2 { TF , T , F }
@@ -251,14 +251,14 @@
\__codedoc_if_almost_str:nTF {#1}
{
\__codedoc_key_get_base_TF:nN {#1} \l__codedoc_tmpa_tl
- \__kernel_tl_set:Ne #2
+ \__kernel_tl_set:Nx #2
{ \__codedoc_split_function_do:on \l__codedoc_tmpa_tl { \__codedoc_base_form_aux:nnN } }
}
{ \tl_set:Nn #2 {#1} }
}
\cs_new:Npe \__codedoc_key_get_base_TF:nN #1#2
{
- \__kernel_tl_set:Ne #2 { \exp_not:N \tl_to_str:n {#1} }
+ \__kernel_tl_set:Nx #2 { \exp_not:N \tl_to_str:n {#1} }
\tl_if_in:NoF #2 { \tl_to_str:n {:} }
{ \exp_not:N \prg_break: }
\tl_if_in:onT { #2 z } { \tl_to_str:n {TF} z }
@@ -404,7 +404,7 @@
\DeclareUnknownKeyHandler [ l3doc / options ]
{ \PassOptionsToClass { \CurrentOption } { article } }
\SetKeys [ l3doc / options ]
- { full , kernel , check = false , checktest = false , lm-default }
+ { full , check = false , checktest = false , lm-default }
\PassOptionsToClass { a4paper } { article }
\msg_new:nnn { l3doc } { input-cfg }
{ Local~config~file~l3doc.cfg~loaded. }
@@ -679,7 +679,7 @@
\verbatim@font
\__codedoc_if_almost_str:VT \l__codedoc_cmd_tl
{
- \__kernel_tl_set:Ne \l__codedoc_cmd_tl { \tl_to_str:N \l__codedoc_cmd_tl }
+ \__kernel_tl_set:Nx \l__codedoc_cmd_tl { \tl_to_str:N \l__codedoc_cmd_tl }
\bool_if:NT \g__codedoc_cs_break_bool
{
\regex_replace_all:nnN
@@ -698,13 +698,13 @@
{
\quark_if_no_value:NF \l__codedoc_cmd_index_tl
{
- \__kernel_tl_set:Ne \l__codedoc_cmd_tl
+ \__kernel_tl_set:Nx \l__codedoc_cmd_tl
{ \c_backslash_str \exp_not:o { \l__codedoc_cmd_index_tl } }
}
\exp_args:No \__codedoc_key_get:n { \l__codedoc_cmd_tl }
\quark_if_no_value:NF \l__codedoc_cmd_module_tl
{
- \__kernel_tl_set:Ne \l__codedoc_index_module_tl
+ \__kernel_tl_set:Nx \l__codedoc_index_module_tl
{ \tl_to_str:N \l__codedoc_cmd_module_tl }
}
\__codedoc_special_index_module:ooonN
@@ -782,7 +782,7 @@
}
\cs_new_protected:Npn \__codedoc_get_hyper_target:nN #1#2
{
- \__kernel_tl_set:Ne #2 { \tl_to_str:n {#1} }
+ \__kernel_tl_set:Nx #2 { \tl_to_str:n {#1} }
\tl_replace_all:NVn #2 \c_underscore_str { / }
\tl_remove_all:NV #2 \c_backslash_str
\tl_put_left:Nn #2 { doc/function// }
@@ -790,7 +790,7 @@
\cs_generate_variant:Nn \__codedoc_get_hyper_target:nN { o , e }
\cs_new_protected:Npn \__codedoc_names_get_seq:nN #1#2
{
- \__kernel_tl_set:Ne \l__codedoc_tmpa_tl { \tl_to_str:n {#1} }
+ \__kernel_tl_set:Nx \l__codedoc_tmpa_tl { \tl_to_str:n {#1} }
\bool_if:NTF \l__codedoc_names_verb_bool
{
\seq_clear:N #2
@@ -1389,7 +1389,7 @@
\l__codedoc_macro_do_not_index_tl
\exp_args:NNV \seq_set_from_clist:Nn
\l__codedoc_tmpa_seq \l__codedoc_macro_do_not_index_tl
- \__kernel_tl_set:Ne \l__codedoc_macro_do_not_index_tl
+ \__kernel_tl_set:Nx \l__codedoc_macro_do_not_index_tl
{ \seq_use:Nn \l__codedoc_tmpa_seq { , } }
\exp_args:NV \DoNotIndex \l__codedoc_macro_do_not_index_tl
}
@@ -2257,7 +2257,7 @@
\cs_new_protected:Npn \__codedoc_hdindex_aux:w #1 M { }
\cs_new_protected:Npn \__codedoc_special_index_set:Nn #1#2
{
- \__kernel_tl_set:Ne #1 { \tl_to_str:n {#2} }
+ \__kernel_tl_set:Nx #1 { \tl_to_str:n {#2} }
\__codedoc_if_almost_str:nTF {#2}
{
\tl_replace_all:Nen #1 { \tl_to_str:n { __ } }
@@ -2275,7 +2275,7 @@
\token_to_str:N \verb * \verbatimchar
}
}
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{
\token_to_str:N \verb * \verbatimchar
#1 \verbatimchar
@@ -2300,7 +2300,7 @@
\cs_new_protected:Npe \__codedoc_key_get:n #1
{
\exp_not:N \__codedoc_key_get_base:nN {#1} \exp_not:N \l__codedoc_index_macro_tl
- \__kernel_tl_set:Ne \exp_not:N \l__codedoc_index_key_tl
+ \__kernel_tl_set:Nx \exp_not:N \l__codedoc_index_key_tl
{ \exp_not:N \tl_to_str:N \exp_not:N \l__codedoc_index_macro_tl }
\tl_clear:N \exp_not:N \l__codedoc_index_module_tl
\tl_if_in:NnTF \exp_not:N \l__codedoc_index_key_tl { \tl_to_str:n { __ } }
@@ -2322,14 +2322,14 @@
}
\cs_new_protected:Npn \__codedoc_key_pop:
{
- \__kernel_tl_set:Ne \l__codedoc_index_key_tl
+ \__kernel_tl_set:Nx \l__codedoc_index_key_tl
{ \tl_tail:N \l__codedoc_index_key_tl }
}
\cs_new_protected:Npn \__codedoc_key_trim_module:n #1
{
\cs_set:Npn \__codedoc_tmpa:w ##1 #1 ##2 \q_stop
{ \exp_not:n {##1} }
- \__kernel_tl_set:Ne \l__codedoc_index_module_tl
+ \__kernel_tl_set:Nx \l__codedoc_index_module_tl
{ \exp_after:wN \__codedoc_tmpa:w \l__codedoc_index_module_tl #1 \q_stop }
}
\cs_new_protected:Npn \__codedoc_key_drop_underscores: