summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/filehook
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/filehook')
-rw-r--r--Master/texmf-dist/tex/latex/filehook/filehook.sty18
1 files changed, 12 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/filehook/filehook.sty b/Master/texmf-dist/tex/latex/filehook/filehook.sty
index acdce91068a..377d7ee2171 100644
--- a/Master/texmf-dist/tex/latex/filehook/filehook.sty
+++ b/Master/texmf-dist/tex/latex/filehook/filehook.sty
@@ -21,15 +21,21 @@
%% $Id: filehook.dtx 2504 2011-07-18 17:22:50Z martin $
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{filehook}
- [2011/07/18 v0.5b Hooks for input files]
+ [2011/10/07 v0.5c Hooks for input files]
\newif\iffilehook@force
\DeclareOption{force}{\filehook@forcetrue}
\ProcessOptions\relax
-\@ifpackageloaded{etoolbox}{%
- \let\filehook@csuse\csuse
-}{%
- \def\filehook@csuse#1{\ifcsname #1\endcsname\csname #1\expandafter\endcsname\fi}
-}
+\begingroup
+\expandafter\ifx\csname csuse\endcsname\relax
+ \expandafter\ifx\csname ifcsname\endcsname\relax
+ \gdef\filehook@csuse#1{\expandafter\ifx\csname #1\endcsname\relax\else\csname #1\expandafter\endcsname\fi}
+ \else
+ \gdef\filehook@csuse#1{\ifcsname #1\endcsname\csname #1\expandafter\endcsname\fi}
+ \fi
+\else
+ \global\let\filehook@csuse\csuse
+\fi
+\endgroup
\def\filehook@include@atbegin#1{%
\let\InputIfFileExists\filehook@@InputIfFileExists
\filehook@csuse{\filehook@include@atbegin@#1}%