[latex3-commits] [git/LaTeX3-latex3-latex2e] gh479: Use gset instead of new in latexrelease (4e7d55f9)
PhelypeOleinik
phelype.oleinik at latex-project.org
Fri Mar 19 03:07:44 CET 2021
Repository : https://github.com/latex3/latex2e
On branch : gh479
Link : https://github.com/latex3/latex2e/commit/4e7d55f9a29b52728775ea769c064a2daffe10e1
>---------------------------------------------------------------
commit 4e7d55f9a29b52728775ea769c064a2daffe10e1
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Thu Mar 18 23:07:44 2021 -0300
Use gset instead of new in latexrelease
>---------------------------------------------------------------
4e7d55f9a29b52728775ea769c064a2daffe10e1
base/latexrelease.dtx | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/base/latexrelease.dtx b/base/latexrelease.dtx
index dcddbbee..6ec8e7d1 100644
--- a/base/latexrelease.dtx
+++ b/base/latexrelease.dtx
@@ -513,11 +513,11 @@ of this package available from CTAN}
% if the command being defined already exists, and \cs{newcommand}
% otherwise.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_declare_command:w
+\cs_gset_protected:Npn \@@_declare_command:w
{ \@star at or@long \@@_declare_command:Nw }
-\cs_new_protected:Npn \@@_declare_command:Nw #1
+\cs_gset_protected:Npn \@@_declare_command:Nw #1
{ \cs_if_exist:NTF #1 { \renew at command } { \new at command } #1 }
-\cs_set_protected:Npn \@@_e at alloc:NnnnnN #1 #2 #3 #4 #5 #6
+\cs_gset_protected:Npn \@@_e at alloc:NnnnnN #1 #2 #3 #4 #5 #6
{ \cs_if_free:NTF #6 { \@@_e at alloc #1 {#2} {#3} {#4} {#5} #6 }
{ \typeout{Not~defining~\string#1~\string#6} } }
% \end{macrocode}
@@ -526,16 +526,16 @@ of this package available from CTAN}
% define a temporary macro that will loop through the command list,
% store each in \cs{l_@@_restores_tl}, save a copy, and redefine each.
% \begin{macrocode}
-\tl_new:N \l_@@_restores_tl
-\cs_new:Npn \@@_tmp:w #1 #2
+\tl_clear_new:N \l_@@_restores_tl
+\cs_gset:Npn \@@_tmp:w #1 #2
{
- \quark_if_recursion_tail_stop:N #1
+ \quark_if_recursion_tail_stop_do:Nn #1
+ { \cs_undefine:N \@@_tmp:w }
\tl_put_right:Nn \l_@@_restores_tl {#1}
\cs_set_eq:cN { @@_ \cs_to_str:N #1 } #1
\cs_set_eq:NN #1 #2
\@@_tmp:w
}
-\tl_clear:N \l_@@_restores_tl
% \end{macrocode}
%
% The redefinitions below are needed because:
@@ -607,6 +607,7 @@ of this package available from CTAN}
\cs_set_eq:Nc #1 { @@_ \cs_to_str:N #1 }
\cs_undefine:c { @@_ \cs_to_str:N #1 }
}
+\tl_clear:N \l_@@_restores_tl
% \end{macrocode}
%
% And restore the hook error message.
More information about the latex3-commits
mailing list.