[latex3-commits] [latex3/latex3] main: Sync code comment with x-to-e switch, the unsure part (352528c20)

github at latex-project.org github at latex-project.org
Mon Oct 30 23:02:46 CET 2023


Repository : https://github.com/latex3/latex3
On branch  : main
Link       : https://github.com/latex3/latex3/commit/352528c2015c59e5da256f6ccd0718ebe038a60e

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

commit 352528c2015c59e5da256f6ccd0718ebe038a60e
Author: Yukai Chou <muzimuzhi at gmail.com>
Date:   Tue Oct 31 05:28:04 2023 +0800

    Sync code comment with x-to-e switch, the unsure part


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

352528c2015c59e5da256f6ccd0718ebe038a60e
 l3kernel/l3fp-aux.dtx      |  7 ++++---
 l3kernel/l3regex.dtx       | 22 +++++++++++-----------
 l3kernel/l3seq.dtx         | 10 +++++-----
 l3kernel/l3str-convert.dtx |  2 +-
 l3kernel/l3tl-analysis.dtx | 20 ++++++++++----------
 l3kernel/l3tl.dtx          |  6 +++---
 6 files changed, 34 insertions(+), 33 deletions(-)

diff --git a/l3kernel/l3fp-aux.dtx b/l3kernel/l3fp-aux.dtx
index ccd5e63ac..fa32c6438 100644
--- a/l3kernel/l3fp-aux.dtx
+++ b/l3kernel/l3fp-aux.dtx
@@ -97,8 +97,8 @@
 % When used directly without an accessor function, floating points
 % should produce an error: this is the role of \cs{@@_chk:w}.  We could
 % make floating point variables be protected to prevent them from
-% expanding under \texttt{x}-expansion, but it seems more convenient to
-% treat them as a subcase of token list variables.
+% expanding under \texttt{e}/\texttt{x}-expansion, but it seems more
+% convenient to treat them as a subcase of token list variables.
 %
 % The (decimal part of the) IEEE-754-2008 standard requires the format
 % to be able to represent special floating point numbers besides the
@@ -235,7 +235,8 @@
 %   where \cs{s_@@} is equal to the \TeX{} primitive \tn{relax}, and
 %   \cs{@@_chk:w} is protected.  The rest of the floating point number
 %   is made of characters (or \tn{relax}).  This ensures that nothing
-%   expands under \texttt{f}-expansion, nor under \texttt{x}-expansion.
+%   expands under \texttt{f}-expansion, nor under
+%   \texttt{e}/\texttt{x}-expansion.
 %   However, when typeset, \cs{s_@@} does nothing, and \cs{@@_chk:w} is
 %   expanded.  We define \cs{@@_chk:w} to produce an error.
 %    \begin{macrocode}
diff --git a/l3kernel/l3regex.dtx b/l3kernel/l3regex.dtx
index fe2a964bb..70ad1ca9e 100644
--- a/l3kernel/l3regex.dtx
+++ b/l3kernel/l3regex.dtx
@@ -5748,7 +5748,7 @@
 %   \cs{exp_not:n} requires a braced argument. As far as I can tell, it
 %   is only needed if the user tries to include in the replacement text
 %   a control sequence set equal to a macro parameter character, such as
-%   \cs{c_parameter_token}. Indeed, within an \texttt{x}-expanding
+%   \cs{c_parameter_token}. Indeed, within an \texttt{e}/\texttt{x}-expanding
 %   assignment, \cs{exp_not:N}~|#| behaves as a single |#|, whereas
 %   \cs{exp_not:n}~|{#}| behaves as a doubled |##|.
 %    \begin{macrocode}
@@ -5774,7 +5774,7 @@
 %   exclusive. The function \cs{@@_query_range:nn} \Arg{min}
 %   \Arg{max} unpacks registers from the position \meta{min} to the
 %   position $\meta{max}-1$ included. Once this is expanded, a second
-%   \texttt{x}-expansion results in the actual tokens from the
+%   \texttt{e}-expansion results in the actual tokens from the
 %   query. That second expansion is only done by user functions at the
 %   very end of their operation, after checking (and correcting) the
 %   brace balance first.
@@ -6290,7 +6290,7 @@
 %
 % \begin{macro}{\@@_replacement_c_A:w}
 %   For an active character, expansion must be avoided, twice because we
-%   later do two \texttt{x}-expansions, to unpack \tn{toks} for the
+%   later do two \texttt{e}-expansions, to unpack \tn{toks} for the
 %   query, and to expand their contents to tokens of the query.
 %    \begin{macrocode}
   \char_set_catcode_active:N \^^@
@@ -6303,7 +6303,7 @@
 %   An explicit begin-group token increases the balance, unless within a
 %   |\c{...}| or |\u{...}| construction. Add the desired begin-group
 %   character, using the standard \cs{if_false:} trick. We eventually
-%   \texttt{x}-expand twice. The first time must yield a balanced token
+%   \texttt{e}-expand twice. The first time must yield a balanced token
 %   list, and the second one gives the bare begin-group token. The
 %   \cs{exp_after:wN} is not strictly needed, but is more consistent
 %   with \pkg{l3tl-analysis}.
@@ -6324,7 +6324,7 @@
 %   This is not quite catcode-related: when the user requests a
 %   character with category \enquote{control sequence}, the
 %   one-character control symbol is returned. As for the active
-%   character, we prepare for two \texttt{x}-expansions.
+%   character, we prepare for two \texttt{e}-expansions.
 %    \begin{macrocode}
   \cs_new_protected:Npn \@@_replacement_c_C:w #1#2
     {
@@ -6345,7 +6345,7 @@
 % \end{macro}
 %
 % \begin{macro}{\@@_replacement_c_E:w}
-%   Similar to the begin-group case, the second \texttt{x}-expansion
+%   Similar to the begin-group case, the second \texttt{e}-expansion
 %   produces the bare end-group token.
 %    \begin{macrocode}
   \char_set_catcode_group_end:N \^^@
@@ -6389,7 +6389,7 @@
 %
 % \begin{macro}{\@@_replacement_c_P:w}
 %   For macro parameters, expansion is a tricky issue. We need to
-%   prepare for two \texttt{x}-expansions and passing through various
+%   prepare for two \texttt{e}-expansions and passing through various
 %   macro definitions. Note that we cannot replace one \cs{exp_not:n} by
 %   doubling the macro parameter characters because this would misbehave
 %   if a mischievous user asks for |\c{\cP\#}|, since that macro
@@ -7211,7 +7211,7 @@
 %   this match; we need to add the tokens from the end of the match to
 %   the end of the query. Finally, store the result in the user's
 %   variable after closing the group: this step involves an additional
-%   \texttt{x}-expansion, and checks that braces are balanced in the
+%   \texttt{e}-expansion, and checks that braces are balanced in the
 %   final result.
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_replace_once:nnN #1#2
@@ -7497,7 +7497,7 @@
 %   match.  For \cs{peek_regex_remove_once:nTF} we reinsert the tokens
 %   seen only if the match failed; otherwise we just reinsert the
 %   tokens~|#1|, with one expansion.  To be more precise, |#1| consists
-%   of tokens that \texttt{o}-expand and \texttt{x}-expand to the last
+%   of tokens that \texttt{o}-expand and \texttt{e}-expand to the last
 %   token seen, for example it is \cs{exp_not:N} \meta{cs} for a control
 %   sequence.  This means that just doing \cs{exp_after:wN}
 %   \cs{l_@@_peek_true_tl} |#1| would be unsafe because the expansion of
@@ -7659,12 +7659,12 @@
 % \begin{macro}{\@@_peek_replacement_put:n}
 %   While building the replacement function
 %   \cs{@@_replacement_do_one_match:n}, we often want to put simple
-%   material, given as |#1|, whose \texttt{x}-expansion
+%   material, given as |#1|, whose \texttt{e}-expansion
 %   \texttt{o}-expands to a single token.  Normally we can just add the
 %   token to \cs{l_@@_build_tl}, but for
 %   \cs{peek_regex_replace_once:nnTF} we eventually want to do some
 %   strange expansion that is basically using \cs{exp_after:wN} to jump
-%   through numerous tokens (we cannot use \texttt{x}-expansion like for
+%   through numerous tokens (we cannot use \texttt{e}-expansion like for
 %   \cs{regex_replace_once:nnNTF} because it is ok for the result to be
 %   unbalanced since we insert it in the input stream rather than
 %   storing it.  When within a csname we don't do any such shenanigan
diff --git a/l3kernel/l3seq.dtx b/l3kernel/l3seq.dtx
index 8d1245868..a99886750 100644
--- a/l3kernel/l3seq.dtx
+++ b/l3kernel/l3seq.dtx
@@ -1542,15 +1542,15 @@
 %   items one at a time to an intermediate sequence.
 %   The approach taken is therefore similar to
 %   that in \cs{@@_pop_right:NNN}, using a \enquote{flexible}
-%   \texttt{x}-type expansion to do most of the work. As \cs{tl_if_eq:nnT}
+%   \texttt{e}-type expansion to do most of the work. As \cs{tl_if_eq:nnT}
 %   is not expandable, a two-part strategy is needed. First, the
-%   \texttt{x}-type expansion uses \cs{str_if_eq:nnT} to find potential
+%   \texttt{e}-type expansion uses \cs{str_if_eq:nnT} to find potential
 %   matches. If one is found, the expansion is halted and the necessary
-%   set up takes place to use the \cs{tl_if_eq:NNT} test. The \texttt{x}-type
+%   set up takes place to use the \cs{tl_if_eq:NNT} test. The \texttt{e}-type
 %   is started again, including all of the items copied already. This
 %   happens repeatedly until the entire sequence has been scanned. The code
-%   is set up to avoid needing and intermediate scratch list: the lead-off
-%   \texttt{x}-type expansion (|#1 #2 {#2}|) ensures that nothing is lost.
+%   is set up to avoid needing an intermediate scratch list: the lead-off
+%   \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 }
diff --git a/l3kernel/l3str-convert.dtx b/l3kernel/l3str-convert.dtx
index 266238873..4354d583a 100644
--- a/l3kernel/l3str-convert.dtx
+++ b/l3kernel/l3str-convert.dtx
@@ -345,7 +345,7 @@
 %
 % \begin{variable}{str_byte, str_error}
 %   Conversions from one \meta{encoding}/\meta{escaping} pair to another
-%   are done within \texttt{x}-expanding assignments. Errors are
+%   are done within \texttt{e}-expanding assignments. Errors are
 %   signalled by raising the relevant flag.
 %    \begin{macrocode}
 \flag_new:n { str_byte }
diff --git a/l3kernel/l3tl-analysis.dtx b/l3kernel/l3tl-analysis.dtx
index 6336b0d07..db87c7920 100644
--- a/l3kernel/l3tl-analysis.dtx
+++ b/l3kernel/l3tl-analysis.dtx
@@ -61,7 +61,7 @@
 % \meta{token}:
 % \begin{itemize}
 %   \item \meta{tokens}, which both \texttt{o}-expand and
-%     \texttt{x}-expand to the \meta{token}. The detailed form of
+%     \texttt{e}/\texttt{x}-expand to the \meta{token}. The detailed form of
 %     \meta{tokens} may change in later releases.
 %   \item \meta{char code}, a decimal representation of the character
 %     code of the \meta{token}, $-1$ if it is a control sequence.
@@ -132,7 +132,7 @@
 % We thus need a way to encode any \meta{token} (even begin-group and
 % end-group character tokens) in a way amenable to manipulating tokens
 % individually. The best we can do is to find \meta{tokens} which both
-% \texttt{o}-expand and \texttt{x}-expand to the given
+% \texttt{o}-expand and \texttt{e}/\texttt{x}-expand to the given
 % \meta{token}. Collecting more information about the category code and
 % character code is also useful for regular expressions, since most
 % regexes are catcode-agnostic. The internal format thus takes the form
@@ -140,7 +140,7 @@
 % \begin{quote}
 %   \meta{tokens} \cs{s_@@} \meta{catcode} \meta{char code} \cs{s_@@}
 % \end{quote}
-% The \meta{tokens} \texttt{o}- \emph{and} \texttt{x}-expand to the
+% The \meta{tokens} \texttt{o}- \emph{and} \texttt{e}/\texttt{x}-expand to the
 % original token in the token list or to the cluster of tokens
 % corresponding to one Unicode character in the given encoding (for
 % \pkg{l3str-convert}). The \meta{catcode} is given as a single hexadecimal
@@ -155,7 +155,7 @@
 % converting from a general token list to the internal format.
 %
 % The current rule for converting a \meta{token} to a balanced set of
-% \meta{tokens} which both \texttt{o}-expands and \texttt{x}-expands to
+% \meta{tokens} which both \texttt{o}-expands and \texttt{e}/\texttt{x}-expands to
 % it is the following.
 % \begin{itemize}
 %   \item A control sequence |\cs| becomes |\exp_not:n { \cs }|
@@ -189,7 +189,7 @@
 %   then need to control expansion much more carefully: compare
 %   \cs{int_value:w} |`#1| \cs{s_@@} with \cs{int_value:w} |`#1|
 %   \cs{exp_stop_f:} \cs{exp_not:N} \cs{q_mark} to extract a character
-%   code followed by the delimiter in an \texttt{x}-expansion.
+%   code followed by the delimiter in an \texttt{e}-expansion.
 %    \begin{macrocode}
 \scan_new:N \s_@@
 %    \end{macrocode}
@@ -350,7 +350,7 @@
 % (\texttt{N}-type) argument by \TeX{}. The plan is to have a two pass
 % system. In the first pass, locate special tokens, and store them in
 % various \tn{toks} registers. In the second pass, which is done within
-% an \texttt{x}-expanding assignment, normal tokens are taken in as
+% an \texttt{e}-expanding assignment, normal tokens are taken in as
 % \texttt{N}-type arguments, and special tokens are retrieved from the
 % \tn{toks} registers, and removed from the input stream by some means.
 % The whole process takes linear time, because we avoid building the
@@ -830,7 +830,7 @@
 %   while a control sequence is always longer (we have set the escape
 %   character to a printable value). In both cases, we leave
 %   \cs{exp_not:n} \Arg{token} \cs{s_@@} in the input stream
-%   (after \texttt{x}-expansion). Here, \cs{exp_not:n} is used
+%   (after \texttt{e}-expansion). Here, \cs{exp_not:n} is used
 %   rather than \cs{exp_not:N} because |#3| could be
 %   a macro parameter character or could be \cs{s_@@}
 %   (which must be hidden behind braces in the result).
@@ -937,7 +937,7 @@
 %   Check now whether we reached the end (we shouldn't keep the trailing
 %   end-group character that marked the end of the token list in the
 %   first pass).
-%   Unpack the \tn{toks} register: when \texttt{x}-expanding again,
+%   Unpack the \tn{toks} register: when \texttt{e}/\texttt{x}-expanding again,
 %   we will get the special token.
 %   Then leave the category code in the input stream, followed by
 %   the character code, and call \cs{@@_analysis_b_loop:w} with the next index.
@@ -1069,7 +1069,7 @@
 % \end{macro}
 %
 % \begin{macro}[rEXP]{\@@_analysis_show:, \@@_analysis_show_loop:wNw}
-%   Here, |#1| \texttt{o}- and \texttt{x}-expands to the token;
+%   Here, |#1| \texttt{o}- and \texttt{e}/\texttt{x}-expands to the token;
 %   |#2| is the category code (one uppercase hexadecimal digit),
 %   $0$ for control sequences;
 %   |#3| is the character code, which we ignore.
@@ -1549,7 +1549,7 @@
 %   character code.  In the latter two cases we call
 %   \cs{char_generate:nn} with suitable arguments and put suitable
 %   \cs{if_false:} \cs{fi:} constructions to make the result balanced
-%   and such that \texttt{o}-expanding or \texttt{x}-expanding gives
+%   and such that \texttt{o}-expanding or \texttt{e}/\texttt{x}-expanding gives
 %   back a single (unbalanced) begin-group or end-group character.
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_peek_analysis_explicit:n #1
diff --git a/l3kernel/l3tl.dtx b/l3kernel/l3tl.dtx
index 192be0163..a8a681d0d 100644
--- a/l3kernel/l3tl.dtx
+++ b/l3kernel/l3tl.dtx
@@ -2153,7 +2153,7 @@
 %   All of its work is done between
 %   \cs{group_align_safe_begin:} and \cs{group_align_safe_end:} to avoid
 %   issues in alignments.  It does the actual replacement within
-%   |#3|~|#4|~|{...}|, an \texttt{x}-expanding \meta{assignment}~|#3| to
+%   |#3|~|#4|~|{...}|, an \texttt{e}-expanding \meta{assignment}~|#3| to
 %   the \meta{tl~var}~|#4|.  The auxiliary \cs{@@_replace_next:w} is
 %   called, followed by the \meta{token list}, some tokens including the
 %   \meta{delimiter}~|#1|, followed by the \meta{pattern}~|#5|.
@@ -2166,7 +2166,7 @@
 %   |##1| cannot contain the \meta{delimiter}~|#1| that we worked so
 %   hard to obtain, thus \cs{@@_replace_wrap:w} gets~|##1| as its own
 %   argument~|##1|, and protects it against
-%   the \texttt{x}-expanding assignment.  It also finds \cs{exp_not:n}
+%   the \texttt{e}-expanding assignment.  It also finds \cs{exp_not:n}
 %   as~|##2| and does nothing to it, thus letting through \cs{exp_not:n}
 %   \Arg{replacement} into the assignment.  Note that
 %   \cs{@@_replace_next:w} and \cs{@@_replace_wrap:w} are always called
@@ -2858,7 +2858,7 @@
 %   \cs{@@_trim_mark:} expands to nothing in a single expansion.  In the case
 %   at hand, we take \cs{__kernel_exp_not:w} \cs{exp_after:wN} as our
 %   continuation, so that space trimming behaves correctly within an
-%   \texttt{x}-type expansion.
+%   \texttt{e}-type or \texttt{x}-type expansion.
 %    \begin{macrocode}
 \cs_new:Npn \tl_trim_spaces:n #1
   {





More information about the latex3-commits mailing list.