[latex3-commits] [git/LaTeX3-latex3-latex2e] gh818: Refuse sorting one-time hooks (6548ebe3)
PhelypeOleinik
phelype.oleinik at latex-project.org
Tue May 17 05:04:36 CEST 2022
Repository : https://github.com/latex3/latex2e
On branch : gh818
Link : https://github.com/latex3/latex2e/commit/6548ebe38427d2147c904dda0e2750f03152fa44
>---------------------------------------------------------------
commit 6548ebe38427d2147c904dda0e2750f03152fa44
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Tue May 17 00:04:36 2022 -0300
Refuse sorting one-time hooks
Fixes #818
>---------------------------------------------------------------
6548ebe38427d2147c904dda0e2750f03152fa44
base/lthooks.dtx | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 806189ee..b914f893 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -31,8 +31,8 @@
%%% From File: lthooks.dtx
%
% \begin{macrocode}
-\def\lthooksversion{v1.0t}
-\def\lthooksdate{2022/04/14}
+\def\lthooksversion{v1.0u}
+\def\lthooksdate{2022/05/17}
% \end{macrocode}
%
%<*driver>
@@ -3843,8 +3843,8 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_initialize_hook_code:n #1
{
- \@@_debug:n{ \iow_term:x{^^JUpdate~ code~ for~ hook~
- '#1' \on at line :^^J} }
+ \@@_debug:n
+ { \iow_term:x { ^^J Update~code~for~hook~'#1' \on at line :^^J } }
% \end{macrocode}
% This does the sorting and the updates.
% First thing we do is to check if a legacy hook macro exists and
@@ -3862,8 +3862,11 @@
% \cs{@@_initialize_single:NNn} and pass to it ready made csnames
% as they are needed several times inside. This way we save a bit
% on processing time if we do that up front.
+% \changes{v1.0u}{2022/05/17}{Refuse sorting one-time hooks (gh/818).}
% \begin{macrocode}
- \@@_if_usable:nT {#1}
+ \bool_lazy_and:nnT
+ { \@@_if_usable_p:n {#1} }
+ { ! \@@_if_execute_immediately_p:n {#1} }
{
\prop_if_empty:cTF { g_@@_#1_code_prop }
{
@@ -4323,16 +4326,17 @@
% \@@_apply_-rule_>:nnn,
% \@@_apply_-rule_<-:nnn,
% \@@_apply_-rule_->:nnn,
-% \@@_apply_-rule_x:nnn,
+% \@@_apply_-rule_xW:nnn,
+% \@@_apply_-rule_xE:nnn,
% }
% Reversed rules.
% \begin{macrocode}
-\cs_new_eq:cc { @@_apply_-rule_<:nnn } { @@_apply_rule_>:nnn }
-\cs_new_eq:cc { @@_apply_-rule_>:nnn } { @@_apply_rule_<:nnn }
+\cs_new_eq:cc { @@_apply_-rule_<:nnn } { @@_apply_rule_>:nnn }
+\cs_new_eq:cc { @@_apply_-rule_>:nnn } { @@_apply_rule_<:nnn }
\cs_new_eq:cc { @@_apply_-rule_<-:nnn } { @@_apply_rule_<-:nnn }
\cs_new_eq:cc { @@_apply_-rule_->:nnn } { @@_apply_rule_->:nnn }
-\cs_new_eq:cc { @@_apply_-rule_xE:nnn } { @@_apply_rule_xE:nnn }
-\cs_new_eq:cc { @@_apply_-rule_xW:nnn } { @@_apply_rule_xW:nnn }
+\cs_new_eq:cc { @@_apply_-rule_xE:nnn } { @@_apply_rule_xE:nnn }
+\cs_new_eq:cc { @@_apply_-rule_xW:nnn } { @@_apply_rule_xW:nnn }
% \end{macrocode}
% \end{macro}
%
@@ -4875,7 +4879,7 @@
% empty.
% \changes{v1.0r}{2021/09/06}{Macro added (gh/606)}
% \begin{macrocode}
-\prg_new_conditional:Npnn \@@_if_execute_immediately:n #1 { F, TF }
+\prg_new_conditional:Npnn \@@_if_execute_immediately:n #1 { p, F, TF }
{
\@@_if_usable:nTF {#1}
{
More information about the latex3-commits
mailing list.