[latex3-commits] [git/LaTeX3-latex3-latex3] gh664-legacy-if: Use a better name for the new legacy_if commands (see #664 and #908) (5554fdb6a)
Bruno Le Floch
blflatex at gmail.com
Wed May 12 21:27:10 CEST 2021
Repository : https://github.com/latex3/latex3
On branch : gh664-legacy-if
Link : https://github.com/latex3/latex3/commit/5554fdb6a61ed9fe6cf83f95c9098cefcd0b73f3
>---------------------------------------------------------------
commit 5554fdb6a61ed9fe6cf83f95c9098cefcd0b73f3
Author: Bruno Le Floch <blflatex at gmail.com>
Date: Wed May 12 21:27:10 2021 +0200
Use a better name for the new legacy_if commands (see #664 and #908)
>---------------------------------------------------------------
5554fdb6a61ed9fe6cf83f95c9098cefcd0b73f3
l3kernel/l3legacy.dtx | 30 +++++++++++++++---------------
l3kernel/testfiles/m3legacy001.lvt | 4 ++--
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/l3kernel/l3legacy.dtx b/l3kernel/l3legacy.dtx
index 6d31c2002..408a3ed28 100644
--- a/l3kernel/l3legacy.dtx
+++ b/l3kernel/l3legacy.dtx
@@ -65,20 +65,20 @@
%
% \begin{function}[added = 2021-05-10]
% {
-% \legacy_set_true_if:n, \legacy_set_false_if:n,
-% \legacy_gset_true_if:n, \legacy_gset_false_if:n
+% \legacy_if_set_true:n, \legacy_if_set_false:n,
+% \legacy_if_gset_true:n, \legacy_if_gset_false:n
% }
% \begin{syntax}
-% \cs{legacy_set_true_if:n} \Arg{name}
-% \cs{legacy_set_false_if:n} \Arg{name}
+% \cs{legacy_if_set_true:n} \Arg{name}
+% \cs{legacy_if_set_false:n} \Arg{name}
% \end{syntax}
% Sets the \LaTeXe{}/plain \TeX{} conditional |\if|\meta{name}
% (generated by \tn{newif}) to be \texttt{true} or \texttt{false}.
% \end{function}
%
-% \begin{function}[added = 2021-05-10]{\legacy_set_if:nn, \legacy_gset_if:nn}
+% \begin{function}[added = 2021-05-10]{\legacy_if_set:nn, \legacy_if_gset:nn}
% \begin{syntax}
-% \cs{legacy_set_if:nn} \Arg{name} \Arg{boolexpr}
+% \cs{legacy_if_set:nn} \Arg{name} \Arg{boolexpr}
% \end{syntax}
% Sets the \LaTeXe{}/plain \TeX{} conditional |\if|\meta{name}
% (generated by \tn{newif}) to the result of evaluating the
@@ -115,31 +115,31 @@
%
% \begin{macro}
% {
-% \legacy_set_true_if:n, \legacy_set_false_if:n,
-% \legacy_gset_true_if:n, \legacy_gset_false_if:n
+% \legacy_if_set_true:n, \legacy_if_set_false:n,
+% \legacy_if_gset_true:n, \legacy_if_gset_false:n
% }
% A friendly wrapper.
% \begin{macrocode}
-\cs_new_protected:Npn \legacy_set_true_if:n #1
+\cs_new_protected:Npn \legacy_if_set_true:n #1
{ \cs_set_eq:cN { if#1 } \if_true: }
-\cs_new_protected:Npn \legacy_set_false_if:n #1
+\cs_new_protected:Npn \legacy_if_set_false:n #1
{ \cs_set_eq:cN { if#1 } \if_false: }
-\cs_new_protected:Npn \legacy_gset_true_if:n #1
+\cs_new_protected:Npn \legacy_if_gset_true:n #1
{ \cs_gset_eq:cN { if#1 } \if_true: }
-\cs_new_protected:Npn \legacy_gset_false_if:n #1
+\cs_new_protected:Npn \legacy_if_gset_false:n #1
{ \cs_gset_eq:cN { if#1 } \if_false: }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\legacy_set_if:nn, \legacy_gset_if:nn}
+% \begin{macro}{\legacy_if_set:nn, \legacy_if_gset:nn}
% A more elaborate wrapper.
% \begin{macrocode}
-\cs_new_protected:Npn \legacy_set_if:nn #1#2
+\cs_new_protected:Npn \legacy_if_set:nn #1#2
{
\bool_if:nTF {#2} \legacy_set_true_if:n \legacy_set_false_if:n
{#1}
}
-\cs_new_protected:Npn \legacy_gset_if:nn #1#2
+\cs_new_protected:Npn \legacy_if_gset:nn #1#2
{
\bool_if:nTF {#2} \legacy_gset_true_if:n \legacy_gset_false_if:n
{#1}
diff --git a/l3kernel/testfiles/m3legacy001.lvt b/l3kernel/testfiles/m3legacy001.lvt
index 95b196e1b..a4139f37a 100644
--- a/l3kernel/testfiles/m3legacy001.lvt
+++ b/l3kernel/testfiles/m3legacy001.lvt
@@ -40,12 +40,12 @@
{
\TYPE { \meaning \ifC }
\group_begin:
- \legacy_set_if:nn { C } { \legacy_if_p:n { A } && \legacy_if_p:n { B } }
+ \legacy_if_set:nn { C } { \legacy_if_p:n { A } && \legacy_if_p:n { B } }
\TYPE { \meaning \ifC }
\group_end:
\TYPE { \meaning \ifC }
\group_begin:
- \legacy_gset_false_if:n { C }
+ \legacy_if_gset_false:n { C }
\TYPE { \meaning \ifC }
\group_end:
\TYPE { \meaning \ifC }
More information about the latex3-commits
mailing list.