summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/regexpatch
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-10-06 22:00:05 +0000
committerKarl Berry <karl@freefriends.org>2020-10-06 22:00:05 +0000
commita7f0e43317c9507cb7ef6cc1ab2ba7fcdec39af8 (patch)
treea695d5824b828ba0b7b1381e1a282f8583d3dab5 /Master/texmf-dist/tex/latex/regexpatch
parenta3d700d85e5a93e7096d56df4d1ac116749a9866 (diff)
regexpatch (6oct20)
git-svn-id: svn://tug.org/texlive/trunk@56576 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/regexpatch')
-rw-r--r--Master/texmf-dist/tex/latex/regexpatch/regexpatch.sty20
1 files changed, 10 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/latex/regexpatch/regexpatch.sty b/Master/texmf-dist/tex/latex/regexpatch/regexpatch.sty
index 89ca7f9ef66..4e37eaa93b3 100644
--- a/Master/texmf-dist/tex/latex/regexpatch/regexpatch.sty
+++ b/Master/texmf-dist/tex/latex/regexpatch/regexpatch.sty
@@ -10,7 +10,7 @@
%% source files specified above.
%%
% \iffalse meta-comment
-%% File: regexpatch.dtx (C) Copyright 2012-2016 Enrico Gregorio
+%% File: regexpatch.dtx (C) Copyright 2012-2020 Enrico Gregorio
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -25,7 +25,7 @@
%% The released version of this bundle is available from CTAN.
%%
\RequirePackage{expl3}
-\GetIdInfo$Id: regexpatch.dtx 0.2d 2018-05-02 12:00:00Z Enrico $
+\GetIdInfo$Id: regexpatch.dtx 0.2e 2020-10-06 12:00:00Z Enrico $
{Extending etoolbox patching commands}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -51,13 +51,13 @@
\tl_new:N \l_xpatch_arg_tl
\tl_new:N \l_xpatch_replacement_tl
\tl_new:N \l_xpatch_type_tl % for debugging messages
-\cs_generate_variant:Nn \regex_match:nnT {nV}
+\prg_generate_conditional_variant:Nnn \regex_match:nn {nV} { T,F,TF }
\cs_new_protected:Npn \xpatch_main_check:N #1
{
\bool_set_false:N \l_xpatch_protect_bool
\bool_set_false:N \l_xpatch_optional_bool
- \tl_set:Nx \l_xpatch_name_tl { \cs_to_str:N #1 }
- \tl_set:Nx \l_xpatch_repl_tl { \token_get_replacement_spec:N #1 }
+ \tl_set:Nf \l_xpatch_name_tl { \cs_to_str:N #1 }
+ \tl_set:Nf \l_xpatch_repl_tl { \token_get_replacement_spec:N #1 }
\tl_clear:N \l_xpatch_type_tl
\regex_match:nVT % \DeclareRobustCommand<control word>
{^\\protect\ \\\u{l_xpatch_name_tl}\ \ }
@@ -101,7 +101,7 @@
}
\bool_if:NT \l_xpatch_protect_bool
{
- \tl_set:Nx \l_xpatch_repl_tl
+ \tl_set:Nf \l_xpatch_repl_tl
{ \exp_after:wN \token_get_replacement_spec:N
\cs:w \l_xpatch_name_tl \cs_end: }
\regex_match:nVT % \DeclareRobustCommand<any cs> with opt arg
@@ -129,9 +129,9 @@
\exp_after:wN #1 \cs:w \l_xpatch_name_tl \cs_end: {#3}{#4}{#5}{#6}
}
{
- \msg_term:n
+ \iow_term:x
{
- xpatch~message \\
+ xpatch~message: ^^J
`\token_to_str:N #2'~is~undefined;~
I'll~ignore~the~request.
}
@@ -291,7 +291,7 @@
{
\bool_if:NT \l_xpatch_tracing_bool
{
- \msg_term:n { xpatch~message \\ #1 }
+ \iow_term:x { xpatch~message ^^J ~ #1 }
}
}
\cs_new:Npn \xpatch_message_cstype:N #1
@@ -851,7 +851,7 @@
\bool_if:NTF \l_xpatch_optional_bool
{
\tl_set:Nx \l_xpatch_name_tl { \tl_tail:V \l_xpatch_name_tl }
- \tl_set:Nf \l_xpatch_prefix_tl { \token_get_prefix_spec:N #1 }
+ \tl_set:Nx \l_xpatch_prefix_tl { \token_get_prefix_spec:N #1 }
\tl_clear:N \l_xpatch_prefix_tl
\tl_set_rescan:Nnx \l_xpatch_prefix_tl { } \l_xpatch_prefix_tl
\tl_set_eq:Nc \l_xpatch_replacement_tl { \l_xpatch_name_tl }