summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/filehook
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-10-07 23:16:56 +0000
committerKarl Berry <karl@freefriends.org>2011-10-07 23:16:56 +0000
commit9693c8c2b4815a4b5206a0ad001c44eb36f1fd13 (patch)
tree96dc0967b06772d2b2bec8fbc05476b3827f2bef /Master/texmf-dist/tex/latex/filehook
parenta04931aaec1f922807f83ac7a7e3498ad54c0cb7 (diff)
filehook (7oct11)
git-svn-id: svn://tug.org/texlive/trunk@24236 c570f23f-e606-0410-a88d-b1316a301751
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}%