[latex3-commits] [git/LaTeX3-latex3-hyperref] cleanup-patches: use \@ifundefined (c743232)
Ulrike Fischer
fischer at troubleshooting-tex.de
Mon Feb 21 17:11:50 CET 2022
Repository : https://github.com/latex3/hyperref
On branch : cleanup-patches
Link : https://github.com/latex3/hyperref/commit/c743232805f9c21c4125f0bcc6f5c44245bf29fa
>---------------------------------------------------------------
commit c743232805f9c21c4125f0bcc6f5c44245bf29fa
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Mon Feb 21 17:11:50 2022 +0100
use \@ifundefined
>---------------------------------------------------------------
c743232805f9c21c4125f0bcc6f5c44245bf29fa
hyperref.dtx | 27 ++++++++++++---------------
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/hyperref.dtx b/hyperref.dtx
index 2aea661..81795a6 100644
--- a/hyperref.dtx
+++ b/hyperref.dtx
@@ -17901,8 +17901,8 @@
}%
\let\HyField at afields\ltx at empty
\let\HyField at cofields\ltx at empty
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname pdflastlink\endcsname\relax
+\@ifundefined{pdflastlink}
+ {%
\let\HyField at AddToFields\relax
\PackageInfo{hyperref}{%
You need pdfTeX 1.40.0 for setting the /Fields entry.%
@@ -17910,8 +17910,8 @@
Adobe Reader/Acrobat accepts an empty /Field array,%
\MessageBreak
but other PDF viewers might complain%
- }%
-\else
+ }}%
+ {%
\let\HyField at AuxAddToFields\ltx at gobble
\let\HyField at AuxAddToCoFields\ltx at gobbletwo
\def\HyField at AfterAuxOpen{\Hy at AtBeginDocument}%
@@ -18006,7 +18006,7 @@
\fi
}%
}%
-\fi
+ }
\def\@Form[#1]{%
\@ifundefined{textcolor}{\let\textcolor\@gobble}{}%
\kvsetkeys{Form}{#1}%
@@ -18888,8 +18888,8 @@
%
% \begin{macro}{\Hy at escapestring}
% \begin{macrocode}
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname pdf at escapestring\endcsname\relax
+\@ifundefined{pdf at escapestring}
+ {%
\let\Hy at escapestring\@firstofone
\def\Hy at escapeform#1{%
\ifHy at pdfescapeform
@@ -18920,7 +18920,7 @@
}%
\fi
}%
-\else
+ }{%
\def\Hy at escapeform#1{%
\ifHy at pdfescapeform
\let\Hy at escapestring\pdfescapestring
@@ -18929,7 +18929,7 @@
\fi
}%
\Hy at escapeform{}%
-\fi
+ }
% \end{macrocode}
% \end{macro}
%
@@ -19885,12 +19885,9 @@
% \end{macrocode}
% \begin{macrocode}
\let\H at old@part\@part
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname chapter\endcsname\relax
- \let\Hy at secnum@part\z@
-\else
- \let\Hy at secnum@part\m at ne
-\fi
+\@ifundefined{chapter}
+ {\let\Hy at secnum@part\z@}
+ {\let\Hy at secnum@part\m at ne}
\def\@part{%
\ifnum\Hy at secnum@part>\c at secnumdepth
\phantomsection
More information about the latex3-commits
mailing list.