[latex3-commits] [git/LaTeX3-latex3-latex3] master: Use \c_backslash_str and friends in l3doc [ci skip] (dd81485)
Bruno Le Floch
bruno at le-floch.fr
Sat May 12 22:45:44 CEST 2018
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/dd8148583150894b2e6947404a2cba908768084c
>---------------------------------------------------------------
commit dd8148583150894b2e6947404a2cba908768084c
Author: Bruno Le Floch <bruno at le-floch.fr>
Date: Sat May 12 16:45:30 2018 -0400
Use \c_backslash_str and friends in l3doc [ci skip]
>---------------------------------------------------------------
dd8148583150894b2e6947404a2cba908768084c
l3kernel/l3doc.dtx | 33 ++++++++++++---------------------
1 file changed, 12 insertions(+), 21 deletions(-)
diff --git a/l3kernel/l3doc.dtx b/l3kernel/l3doc.dtx
index fc625ac..e06f540 100644
--- a/l3kernel/l3doc.dtx
+++ b/l3kernel/l3doc.dtx
@@ -757,16 +757,6 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\c_@@_backslash_tl, \c_@@_backslash_token}
-% A single backslash, as a token list, or as an implicit character
-% token.
-% \begin{macrocode}
-\tl_const:Nx \c_@@_backslash_tl { \iow_char:N \\ }
-\exp_last_unbraced:NNo
- \cs_new_eq:NN \c_@@_backslash_token { \c_@@_backslash_tl }
-% \end{macrocode}
-% \end{variable}
-%
% \begin{variable}
% {
% \l_@@_index_macro_tl, \l_@@_index_key_tl,
@@ -969,7 +959,7 @@ and all files in that bundle must be distributed together.
% Used to test if the argument of |\cmd| or other macros to be indexed
% is almost a string or not: for instance this is \texttt{false} if |#1|
% contains |\meta{...}|. The surprising |f|-expansion are there to
-% cope with the case of |#1| starting with \cs{c_@@_backslash_tl}
+% cope with the case of |#1| starting with \cs{c_backslash_str}
% which should be expanded and considered to be \enquote{normal}.
% \begin{macrocode}
\prg_new_protected_conditional:Npnn \@@_if_almost_str:n #1 { TF , T , F }
@@ -1546,7 +1536,7 @@ and all files in that bundle must be distributed together.
\cs_set_protected:Npn \ifnot at excluded
{
\exp_args:Nxx \expanded at notin
- { \c_@@_backslash_tl \tl_to_str:N \macro at namepart , }
+ { \c_backslash_str \tl_to_str:N \macro at namepart , }
{ \exp_args:NV \tl_to_str:n \index at excludelist }
}
% \end{macrocode}
@@ -1679,12 +1669,12 @@ and all files in that bundle must be distributed together.
\DeclareDocumentCommand \cmd { O{} m }
{ \@@_cmd:no {#1} { \token_to_str:N #2 } }
\DeclareDocumentCommand \cs { O{} m }
- { \@@_cmd:no {#1} { \c_@@_backslash_tl #2 } }
+ { \@@_cmd:no {#1} { \c_backslash_str #2 } }
\DeclareDocumentCommand \tn { O{} m }
{
\@@_cmd:no
{ module = TeX , replace = false , #1 }
- { \c_@@_backslash_tl #2 }
+ { \c_backslash_str #2 }
}
% \end{macrocode}
% \end{macro}
@@ -2071,8 +2061,8 @@ and all files in that bundle must be distributed together.
\cs_new_protected:Npn \@@_get_hyper_target:nN #1#2
{
\tl_set:Nx #2 { \tl_to_str:n {#1} }
- \tl_replace_all:Nxn #2 { \iow_char:N \_ } { / }
- \tl_remove_all:Nx #2 { \iow_char:N \\ }
+ \tl_replace_all:Nxn #2 { \c_underscore_str } { / }
+ \tl_remove_all:Nx #2 { \c_backslash_str }
\tl_put_left:Nn #2 { doc/function// }
}
\cs_generate_variant:Nn \@@_get_hyper_target:nN { o , x }
@@ -2101,7 +2091,7 @@ and all files in that bundle must be distributed together.
}
{
\tl_remove_all:Nx \l_@@_tmpa_tl
- { \iow_char:N \^^M \iow_char:N \% }
+ { \iow_char:N \^^M \c_percent_str }
\tl_remove_all:Nx \l_@@_tmpa_tl { \tl_to_str:n { ^ ^ A } }
\tl_remove_all:Nx \l_@@_tmpa_tl { \iow_char:N \^^I }
\tl_remove_all:Nx \l_@@_tmpa_tl { \iow_char:N \^^M }
@@ -3161,7 +3151,7 @@ and all files in that bundle must be distributed together.
\@@_test_missing_aux:Nxn
\g_@@_missing_tests_prop
{ \seq_use:Nn \l_@@_names_seq { , } }
- { { \g_file_curr_name_str \iow_char:N \ (#1) } }
+ { { \g_file_curr_name_str \c_space_tl (#1) } }
}
\cs_new_protected:Npn \@@_test_missing_aux:Nnn #1#2#3
{
@@ -4071,7 +4061,7 @@ and all files in that bundle must be distributed together.
{
\tl_replace_all:Nnn #1 {##1}
{
- \verbatimchar \c_@@_backslash_tl ##1
+ \verbatimchar \c_backslash_str ##1
\token_to_str:N \verb * \verbatimchar
}
}
@@ -4084,7 +4074,7 @@ and all files in that bundle must be distributed together.
{
\tl_set:Nn #1 {#2}
\tl_replace_all:Non #1
- { \c_@@_backslash_tl }
+ { \c_backslash_str }
{ \token_to_str:N \bslash \c_space_tl }
}
\@@_quote_special_char:N #1
@@ -4132,8 +4122,9 @@ and all files in that bundle must be distributed together.
\tl_if_in:NoTF \l_@@_index_key_tl { \tl_to_str:n { __ } }
{ \bool_set_true:N \l_@@_index_internal_bool }
{ \bool_set_false:N \l_@@_index_internal_bool }
+ \exp_last_unbraced:NNo
\tl_if_head_eq_charcode:oNT
- { \l_@@_index_key_tl } \c_@@_backslash_token
+ { \l_@@_index_key_tl } \c_backslash_str
{ \@@_key_pop: }
\tl_if_in:NoTF \l_@@_index_key_tl { \token_to_str:N : }
{ \@@_key_func: }
More information about the latex3-commits
mailing list