summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/filehook/filehook.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/filehook/filehook.sty')
-rw-r--r--Master/texmf-dist/tex/latex/filehook/filehook.sty23
1 files changed, 14 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/filehook/filehook.sty b/Master/texmf-dist/tex/latex/filehook/filehook.sty
index 54f7b28a700..acdce91068a 100644
--- a/Master/texmf-dist/tex/latex/filehook/filehook.sty
+++ b/Master/texmf-dist/tex/latex/filehook/filehook.sty
@@ -18,48 +18,53 @@
%% This work consists of the files filehook.dtx, filehook.ins
%% and the derived file filehook.sty.
%%
-%% $Id: filehook.dtx 2252 2011-03-09 19:21:15Z martin $
+%% $Id: filehook.dtx 2504 2011-07-18 17:22:50Z martin $
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{filehook}
- [2011/03/09 v0.5a Hooks for input files]
+ [2011/07/18 v0.5b 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}
+}
\def\filehook@include@atbegin#1{%
\let\InputIfFileExists\filehook@@InputIfFileExists
- \@nameuse{\filehook@include@atbegin@#1}%
+ \filehook@csuse{\filehook@include@atbegin@#1}%
\filehook@include@@atbegin
}
\def\filehook@include@@atbegin{}
\def\filehook@include@atend#1{%
\filehook@include@@atend
- \@nameuse{\filehook@include@atend@#1}%
+ \filehook@csuse{\filehook@include@atend@#1}%
}
\def\filehook@include@@atend{}
\def\filehook@include@after#1{%
\filehook@include@@after
- \@nameuse{\filehook@include@after@#1}%
+ \filehook@csuse{\filehook@include@after@#1}%
}
\def\filehook@include@@after{}
\def\filehook@input@atbegin#1{%
\let\InputIfFileExists\filehook@@InputIfFileExists
- \@nameuse{\filehook@input@atbegin@\filehook@ensureext{#1}}%
+ \filehook@csuse{\filehook@input@atbegin@\filehook@ensureext{#1}}%
\filehook@input@@atbegin
}
\def\filehook@input@@atbegin{}
\def\filehook@input@atend#1{%
\filehook@input@@atend
- \@nameuse{\filehook@input@atend@\filehook@ensureext{#1}}%
+ \filehook@csuse{\filehook@input@atend@\filehook@ensureext{#1}}%
}
\def\filehook@input@@atend{}
\def\filehook@atbegin#1{%
- \@nameuse{\filehook@atbegin@\filehook@ensureext{#1}}%
+ \filehook@csuse{\filehook@atbegin@\filehook@ensureext{#1}}%
\filehook@@atbegin
}
\def\filehook@@atbegin{}
\def\filehook@atend#1{%
\filehook@@atend
- \@nameuse{\filehook@atend@\filehook@ensureext{#1}}%
+ \filehook@csuse{\filehook@atend@\filehook@ensureext{#1}}%
}
\def\filehook@@atend{}
\def\filehook@every@atbegin#1{%