[latex3-commits] [git/LaTeX3-latex3-latex2e] hotfix/gh422: The file substitution flag has to be explicitly cleared (8c059062)

PhelypeOleinik phelype.oleinik at latex-project.org
Sat Nov 14 23:53:54 CET 2020


Repository : https://github.com/latex3/latex2e
On branch  : hotfix/gh422
Link       : https://github.com/latex3/latex2e/commit/8c059062fd99bb4c7e1ba614bc8ef9000fd4f57c

>---------------------------------------------------------------

commit 8c059062fd99bb4c7e1ba614bc8ef9000fd4f57c
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Sat Nov 14 19:53:54 2020 -0300

    The file substitution flag has to be explicitly cleared


>---------------------------------------------------------------

8c059062fd99bb4c7e1ba614bc8ef9000fd4f57c
 base/ltclass.dtx    |  1 +
 base/ltfilehook.dtx | 10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/base/ltclass.dtx b/base/ltclass.dtx
index 036e9d3b..beefbc78 100644
--- a/base/ltclass.dtx
+++ b/base/ltclass.dtx
@@ -1171,6 +1171,7 @@
   \@expl@@@filehook at set@curr at file@@nNN
     {\@expl@@@filehook at resolve@file at subst@@w #3.#1\@nil}%
       \reserved at a\reserved at b
+  \@expl@@@filehook at clear@replacement at flag@@
   \expandafter\xdef\csname opt@\reserved at a\endcsname{%
     \@ifundefined{opt@\reserved at a}\@empty
       {\csname opt@\reserved at a\endcsname,}%
diff --git a/base/ltfilehook.dtx b/base/ltfilehook.dtx
index ecb499f3..bd4082a9 100644
--- a/base/ltfilehook.dtx
+++ b/base/ltfilehook.dtx
@@ -929,6 +929,7 @@
        \if at tempswa \@expl@@@filehook at drop@extension@@N\@curr at file@reqd \fi}%
       {\if at tempswa \@expl@@@filehook at drop@extension@@N\@curr at file \fi
        \global\let\@curr at file@reqd\@curr at file}%
+    \@expl@@@filehook at clear@replacement at flag@@
   \endgroup}
 %</2ekernel|latexrelease>
 %<latexrelease>\EndIncludeInRelease
@@ -1087,7 +1088,9 @@
 %    \begin{macrocode}
 \flag_new:n { @@_file_replaced }
 \cs_new:Npn \@@_if_file_replaced:TF #1 #2
-   { \flag_if_raised:nTF { @@_file_replaced } {#1} {#2} }
+  { \flag_if_raised:nTF { @@_file_replaced } {#1} {#2} }
+\cs_new_protected:Npn \@@_clear_replacement_flag:
+  { \flag_clear:n { @@_file_replaced } }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -1345,6 +1348,11 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
+\cs_new_eq:NN \@expl@@@filehook at clear@replacement at flag@@
+              \__filehook_clear_replacement_flag:
+%    \end{macrocode}
+%
+%    \begin{macrocode}
 \cs_new_eq:NN \@expl@@@filehook at drop@extension@@N
               \__filehook_drop_extension:N
 %    \end{macrocode}





More information about the latex3-commits mailing list.