[latex3-commits] [git/LaTeX3-latex3-latex3] master: Sharpen documentation of \exp_not:n and \tl_to_str:n [ci-skip] (ab7a53c)
Bruno Le Floch
bruno at le-floch.fr
Mon Apr 23 06:07:39 CEST 2018
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/ab7a53c9f2d5633f7a112493b9d00b7b48cd2ced
>---------------------------------------------------------------
commit ab7a53c9f2d5633f7a112493b9d00b7b48cd2ced
Author: Bruno Le Floch <bruno at le-floch.fr>
Date: Mon Apr 23 00:07:39 2018 -0400
Sharpen documentation of \exp_not:n and \tl_to_str:n [ci-skip]
These are the only two n-type synonyms of primitives, so the only two
n-type arguments that must be braced (the n-type argument of \cs_new:Npn
and similar functions must also be braced but only to end the p-type
argument before it).
>---------------------------------------------------------------
ab7a53c9f2d5633f7a112493b9d00b7b48cd2ced
l3kernel/l3expan.dtx | 18 ++++++++++--------
l3kernel/l3tl.dtx | 3 +++
2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/l3kernel/l3expan.dtx b/l3kernel/l3expan.dtx
index 1777a5b..2246098 100644
--- a/l3kernel/l3expan.dtx
+++ b/l3kernel/l3expan.dtx
@@ -587,10 +587,11 @@
% \begin{texnote}
% This is the \TeX{} \tn{noexpand} primitive. It only prevents
% expansion. At the beginning of an |f|-type argument, a space
-% \meta{token} is removed despite \cs{exp_not:N}. In an
-% |x|-expanding definition (\cs{cs_new:Npx}) a macro parameter
-% \meta{token} (normally~|#|) denotes an argument despite
-% \cs{exp_not:N} (see \cs{exp_not:n}).
+% \meta{token} is removed even if it appears as \cs{exp_not:N}
+% \cs{c_space_token}. In an |x|-expanding definition
+% (\cs{cs_new:Npx}), a macro parameter introduces an argument even
+% if it appears as \cs{exp_not:N} |#| |1|. This differs from
+% \cs{exp_not:n}.
% \end{texnote}
% \end{function}
%
@@ -612,11 +613,12 @@
% Prevents expansion of the \meta{tokens} in an |x|-type argument. In
% other cases (input stream or |o| or |f| arguments) the \meta{tokens}
% continue being expanded.
+% The argument of \cs{exp_not:n} \emph{must} be surrounded by braces.
% \begin{texnote}
-% This is the \eTeX{} \tn{unexpanded} primitive. Hence its argument
-% \emph{must} be surrounded by braces. In an |x|-expanding
-% definition (\cs{cs_new:Npx}), \cs{exp_not:n}~|{#}| inserts a macro
-% parameter character in the replacement text.
+% This is the \eTeX{} \tn{unexpanded} primitive. In an
+% |x|-expanding definition (\cs{cs_new:Npx}), \cs{exp_not:n}~|{#1}|
+% is equivalent to |##1| rather than to~|#1|, namely it inserts the
+% two characters |#| and~|1|.
% \end{texnote}
% \end{function}
%
diff --git a/l3kernel/l3tl.dtx b/l3kernel/l3tl.dtx
index 5f5cc52..6c2c129 100644
--- a/l3kernel/l3tl.dtx
+++ b/l3kernel/l3tl.dtx
@@ -619,7 +619,10 @@
% resulting character tokens in the input stream. A \meta{string}
% is a series of tokens with category code $12$ (other) with the exception
% of spaces, which retain category code $10$ (space).
+% This function requires only a single expansion.
+% Its argument \emph{must} be braced.
% \begin{texnote}
+% This is the \eTeX{} primitive \tn{detokenize}.
% Converting a \meta{token list} to a \meta{string} yields a
% concatenation of the string representations of every token in the
% \meta{token list}.
More information about the latex3-commits
mailing list