[latex3-commits] [l3svn] r6657 - l3doc: make key variants (.tl_set:c, ...) look like function variants
noreply at latex-project.org
noreply at latex-project.org
Sun Aug 14 20:28:21 CEST 2016
Author: bruno
Date: 2016-08-14 20:28:21 +0200 (Sun, 14 Aug 2016)
New Revision: 6657
Modified:
trunk/l3kernel/l3doc.dtx
Log:
l3doc: make key variants (.tl_set:c,...) look like function variants
For now this only applies to the documentation part. In particular
only the "base" key's documentation is indexed, but pointers to
variants' implementations are not removed yet.
Modified: trunk/l3kernel/l3doc.dtx
===================================================================
--- trunk/l3kernel/l3doc.dtx 2016-08-14 18:13:22 UTC (rev 6656)
+++ trunk/l3kernel/l3doc.dtx 2016-08-14 18:28:21 UTC (rev 6657)
@@ -1831,15 +1831,11 @@
% variants of control sequence that may be being documented
% here. (With or without \pkg{expl3} function syntax.)
%
-% If |#1| does not start with |\| then the \enquote{name prefix} is
-% empty and we store \cs{scan_stop:} as the value for the key |#1|, not
-% bothering with variants. If instead |#1| starts with |\| then the
-% \enquote{name prefix} is |\| and we omit the first character of |#1|
-% subsequently. If the next character is |:| then we have one of the
-% weird functions named |\::N| and so on, and we ignore variants,
-% putting \cs{scan_stop:} directly as the value for the key |::N|.
-% Otherwise, we have a regular control sequence, which we decompose
-% using \cs{@@_function_parse_cs_aux:nnN}.
+% We filter out the special case of |#1| containing |\::|, which
+% signals that we have one of the weird functions named |\::N| and so
+% on. Otherwise, split the function into base name (including the
+% potential backslash) and signature. If there was a |:| then store
+% the signature (braced), otherwise store \cs{scan_stop:}.
% \begin{macrocode}
\cs_new_protected:Npn \@@_function_parse:
{
@@ -1849,13 +1845,9 @@
}
\cs_new_protected:Npn \@@_function_parse_one:n #1
{
- \tl_if_head_eq_charcode:nNTF {#1} \c_@@_backslash_token
- {
- \exp_args:No \tl_if_head_eq_charcode:nNTF { \use_none:n #1 } :
- { \prop_put:Nnn \l_@@_functions_block_prop {#1} { \scan_stop: } }
- { \@@_split_function_do:nn {#1} \@@_function_parse_cs_aux:nnN }
- }
+ \tl_if_in:noTF {#1} { \token_to_str:N \:: }
{ \prop_put:Nnn \l_@@_functions_block_prop {#1} { \scan_stop: } }
+ { \@@_split_function_do:nn {#1} \@@_function_parse_cs_aux:nnN }
}
\cs_new_protected:Npn \@@_function_parse_cs_aux:nnN #1#2#3
{
More information about the latex3-commits
mailing list