[latex3-commits] [git/LaTeX3-latex3-latex2e] gh675: Correct usage of older \@@_if_file_hook:wTF (6c1a4c36)
PhelypeOleinik
phelype.oleinik at latex-project.org
Wed Sep 29 05:03:48 CEST 2021
Repository : https://github.com/latex3/latex2e
On branch : gh675
Link : https://github.com/latex3/latex2e/commit/6c1a4c3621bc0aac2ad7e9e80afa1d3d1c5664ae
>---------------------------------------------------------------
commit 6c1a4c3621bc0aac2ad7e9e80afa1d3d1c5664ae
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Wed Sep 29 00:03:48 2021 -0300
Correct usage of older \@@_if_file_hook:wTF
Fixes #675
>---------------------------------------------------------------
6c1a4c3621bc0aac2ad7e9e80afa1d3d1c5664ae
base/changes.txt | 5 +++++
base/lthooks.dtx | 13 +++++++++----
base/testfiles-lthooks/github-0675.lvt | 15 +++++++++++++++
.../github-0177.tlg => testfiles-lthooks/github-0675.tlg} | 3 +++
4 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index 50f916b2..69e1a0c1 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,11 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
================================================================================
+2021-09-28 Phelype Oleinik <phelype.oleinik at latex-project.org>
+
+ * lthooks.dtx (subsection{Adding or removing hook code}):
+ Correct usage of older \@@_if_file_hook:wTF (gh/675).
+
2021-09-18 David Carlisle <David.Carlisle at latex-project.org>
* ltpara.dtx: use a \hskip rather than \kern as the guard to
diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 3969a2be..c6dd98f5 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -31,8 +31,8 @@
%%% From File: lthooks.dtx
%
% \begin{macrocode}
-\def\lthooksversion{v1.0r}
-\def\lthooksdate{2021/09/06}
+\def\lthooksversion{v1.0s}
+\def\lthooksdate{2021/09/28}
% \end{macrocode}
%
%<*driver>
@@ -3138,10 +3138,13 @@
% component to see if we have to make a reversed hook. In either case
% the function returns \meta{true} for a generic hook and \meta{false}
% in other cases.
+%
+% \changes{v1.0s}{2021/09/28}
+% {Correct usage of older \cs{@@_if_file_hook:wTF} (gh/675)}
% \begin{macrocode}
%<latexrelease>\cs_new_protected:Npn \@@_try_declaring_generic_hook:nNNnn #1
%<latexrelease> {
-%<latexrelease> \@@_if_file_hook:wTF #1 / \s_@@_mark {#1}
+%<latexrelease> \@@_if_file_hook:wTF #1 / \s_@@_mark
%<latexrelease> {
%<latexrelease> \exp_args:Ne \@@_try_declaring_generic_hook_split:nNNnn
%<latexrelease> { \exp_args:Ne \@@_file_hook_normalize:n {#1} }
@@ -4777,10 +4780,12 @@
%<latexrelease> }
% \end{macrocode}
%
+% \changes{v1.0s}{2021/09/28}
+% {Correct usage of older \cs{@@_if_file_hook:wTF} (gh/675)}
% \begin{macrocode}
%<latexrelease>\cs_new_protected:Npn \@@_try_file_hook:n #1
%<latexrelease> {
-%<latexrelease> \@@_if_file_hook:wTF #1 / \s_@@_mark {#1}
+%<latexrelease> \@@_if_file_hook:wTF #1 / \s_@@_mark
%<latexrelease> {
%<latexrelease> \exp_args:Ne \@@_if_usable_use:n
%<latexrelease> { \exp_args:Ne \@@_file_hook_normalize:n {#1} }
diff --git a/base/testfiles-lthooks/github-0675.lvt b/base/testfiles-lthooks/github-0675.lvt
new file mode 100644
index 00000000..bb164daa
--- /dev/null
+++ b/base/testfiles-lthooks/github-0675.lvt
@@ -0,0 +1,15 @@
+
+\RequirePackage[2021/06/01]{latexrelease}
+
+\RequirePackage[enable-debug]{expl3}
+\ExplSyntaxOn
+\debug_on:n { check-declarations , deprecation }
+\ExplSyntaxOff
+
+\input{test2e}
+
+\START
+\newenvironment{test}{\typeout{foo}}{\typeout{baz}}
+\AddToHook{env/test/before}{\typeout{bar}}
+\begin{test}\end{test}
+\END
diff --git a/base/testfiles/github-0177.tlg b/base/testfiles-lthooks/github-0675.tlg
similarity index 89%
copy from base/testfiles/github-0177.tlg
copy to base/testfiles-lthooks/github-0675.tlg
index 1d0c6975..cb25ed26 100644
--- a/base/testfiles/github-0177.tlg
+++ b/base/testfiles-lthooks/github-0675.tlg
@@ -1,2 +1,5 @@
This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
+bar
+foo
+baz
More information about the latex3-commits
mailing list.