[latex3-commits] [latex3/latex3] main: Switch from x-type to e-type in expl3.dtx (4a1281ef5)
github at latex-project.org
github at latex-project.org
Tue Oct 10 12:59:28 CEST 2023
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/4a1281ef5f0e726d68274b92a1ebf65dc6955da4
>---------------------------------------------------------------
commit 4a1281ef5f0e726d68274b92a1ebf65dc6955da4
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Mon Sep 25 22:57:03 2023 +0100
Switch from x-type to e-type in expl3.dtx
This also covers the documentation phase.
>---------------------------------------------------------------
4a1281ef5f0e726d68274b92a1ebf65dc6955da4
l3backend/CHANGELOG.md | 3 +++
l3kernel/CHANGELOG.md | 1 +
l3kernel/expl3.dtx | 37 ++++++++++++++++++++-----------------
l3packages/CHANGELOG.md | 3 +++
4 files changed, 27 insertions(+), 17 deletions(-)
diff --git a/l3backend/CHANGELOG.md b/l3backend/CHANGELOG.md
index 5877ce53d..4b2c669d2 100644
--- a/l3backend/CHANGELOG.md
+++ b/l3backend/CHANGELOG.md
@@ -6,6 +6,9 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+### Changed
+- Track `expl3` changes
+
## [2023-04-19]
### Changed
diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index d2b0b2c46..ba7c49979 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -16,6 +16,7 @@ this project uses date-based 'snapshot' version identifiers.
- Key properties `.str_(g)set_e:N` and `.tl_(g)set_e:N`
### Changed
+- Switch generally from `x`- to `e`-type variants
- Convert `\file_if_exist:n(TF)` to expandable status,
adding predicate version
- Standardise variants for `\prop_(g)pop:NnN(TF)`
diff --git a/l3kernel/expl3.dtx b/l3kernel/expl3.dtx
index 5d9d2c4d1..8fadec50b 100644
--- a/l3kernel/expl3.dtx
+++ b/l3kernel/expl3.dtx
@@ -648,20 +648,10 @@
% variables which have a \cs{\meta{var}_use:N} function (other than
% boxes), and which therefore deliver a single
% \enquote{value}.
-% \item[x] Fully-expanded token or braced token list.\\
-% This means that the argument is expanded as in the replacement
-% text of an~\tn{edef}, and the expansion is passed to the function as
-% a braced token list. Expansion takes place until only unexpandable
-% tokens are left. |x|-type arguments cannot be nested.
% \item[e] Fully-expanded token or braced token list.\\
-% This expansion is very similar to |x|-type but may be nested and does
-% not require that |#| tokens are doubled. It uses \tn{expanded} primitive.
-% \item[f] Expanding the first token recursively in a braced token
-% list.\\ Almost the same as the |x| type except here the token list
-% is expanded fully until the first unexpandable token is found and
-% the rest is left unchanged. Note that if this function finds a
-% space at the beginning of the argument it gobbles it and does not
-% expand the next token.
+% This means that the argument is expanded as in the replacement
+% text of a~\tn{message}, and the expansion is passed to the function as
+% a braced token list.
% \item[o] One-level-expanded token or braced token list.\\
% This means that the argument is expanded one level, as by
% \tn{expandafter}, and the expansion is passed to the function as a
@@ -669,6 +659,19 @@
% token list then only the first token in that list is expanded.
% In general, using \texttt{V} should be preferred to using
% \texttt{o} for simple variable retrieval.
+% \item[f] Expanding the first token recursively in a braced token
+% list.\\ Almost the same as the |e| type except here the token list
+% is expanded fully until the first unexpandable token is found and
+% the rest is left unchanged. Note that if this function finds a
+% space at the beginning of the argument it gobbles it and does not
+% expand the next token.
+% \item[x] Fully-expanded token or braced token list.\\
+% This expansion is very similar to |e|-type but is not nestable,
+% can only be used to create non-expandable functions, and requires
+% that |#| tokens are doubled in the argument. In almost all cases,
+% |e|-type should be preferred: retained largely for historical
+% reasons, and should where possible be replaced by the |e|-type
+% equivalent.
% \end{description}
%
% \subsection{Simpler means better}
@@ -756,7 +759,7 @@
%
% To illustrate this let us suppose you have a \enquote{base function}
% |\demo_cmd:Nnn| that takes three normal arguments, and that you need
-% to construct the variant |\demo_cmd:cnx|, for which the first argument
+% to construct the variant |\demo_cmd:cne|, for which the first argument
% is used to construct the \emph{name} of a command, whilst the third
% argument must be fully expanded before being passed to
% |\demo_cmd:Nnn|.
@@ -766,7 +769,7 @@
% \end{verbatim}
% This defines the variant form so that you can then write, for example:
% \begin{verbatim}
-% \demo_cmd:cnx { abc } { pq } { \rst \xyz }
+% \demo_cmd:cne { abc } { pq } { \rst \xyz }
% \end{verbatim}
% rather than \ldots\ well, something like this!
% \begin{verbatim}
@@ -788,7 +791,7 @@
% \end{verbatim}
%
% Another example: you may wish to declare a function
-% |\demo_cmd_b:xcxcx|, a variant of an existing function
+% |\demo_cmd_b:ecece|, a variant of an existing function
% |\demo_cmd_b:nnnnn|, that fully
% expands arguments 1,~3 and~5, and produces commands to pass as
% arguments 2 and~4 using~\tn{csname}.
@@ -1536,7 +1539,7 @@
}
\cs_gset_protected:Npn \@expl at push@filename@@@@
{
- \exp_args:Nx \__kernel_file_input_push:n
+ \exp_args:Ne \__kernel_file_input_push:n
{
\tl_to_str:N \@currname .
\tl_to_str:N \@currext
diff --git a/l3packages/CHANGELOG.md b/l3packages/CHANGELOG.md
index 288cbc498..8b5f5b0c0 100644
--- a/l3packages/CHANGELOG.md
+++ b/l3packages/CHANGELOG.md
@@ -7,6 +7,9 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+### Changed
+- Track `expl3` changes
+
## [2023-08-29]
### Added
More information about the latex3-commits
mailing list.