diff options
Diffstat (limited to 'graphics/pgf/base/tex/pgfutil-common.tex')
-rw-r--r-- | graphics/pgf/base/tex/pgfutil-common.tex | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/graphics/pgf/base/tex/pgfutil-common.tex b/graphics/pgf/base/tex/pgfutil-common.tex index b1c0546c17..37210d4870 100644 --- a/graphics/pgf/base/tex/pgfutil-common.tex +++ b/graphics/pgf/base/tex/pgfutil-common.tex @@ -1,4 +1,4 @@ -% Copyright 2006 by Till Tantau +% Copyright 2019 by Till Tantau % % This file may be distributed and/or modified % @@ -45,6 +45,18 @@ \def\pgfutil@trimspaces@@#1Q#2{#1} \catcode`\Q=11 +% \pgfutil@ifempty{<cs>}{<true code>}{<false code>} +% +% Check if <cs> is equal to \pgfutil@empty +% +% This macro is expandable. +\def\pgfutil@ifempty#1{% + \ifx#1\pgfutil@empty + \expandafter\pgfutil@firstoftwo + \else + \expandafter\pgfutil@secondoftwo + \fi} + % \pgfutil@ifundefined{<macro name with backslash>} % {<is undefined code>}{<is defined code>} % @@ -99,7 +111,7 @@ \csname newcount\expandafter\endcsname\csname pgfutil@pushedmacro@\pgfutil@pushmacro@string\endcsname \fi \global\advance\csname pgfutil@pushedmacro@\pgfutil@pushmacro@string\endcsname 1\relax - \expandafter\glet\csname\the\csname pgfutil@pushedmacro@\pgfutil@pushmacro@string\endcsname\pgfutil@pushmacro@string\endcsname#1% + \global\expandafter\let\csname\the\csname pgfutil@pushedmacro@\pgfutil@pushmacro@string\endcsname\pgfutil@pushmacro@string\endcsname#1% } \def\pgfutil@popmacro#1{% |