summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-06-14 18:55:27 +0000
committerKarl Berry <karl@freefriends.org>2008-06-14 18:55:27 +0000
commit8842febffdfa43a08856423a4ae0c13ffa2506e4 (patch)
treec58437a40b701d13a102d05fb91693d56a6e9d04 /Master/texmf-dist/tex/latex
parentd7122615203188ff1f643c83d927322d109cf456 (diff)
oberdiek update (13jun08)
git-svn-id: svn://tug.org/texlive/trunk@8732 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/oberdiek/letltxmacro.sty68
1 files changed, 37 insertions, 31 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/letltxmacro.sty b/Master/texmf-dist/tex/latex/oberdiek/letltxmacro.sty
index f247981c1c2..b30895306f9 100644
--- a/Master/texmf-dist/tex/latex/oberdiek/letltxmacro.sty
+++ b/Master/texmf-dist/tex/latex/oberdiek/letltxmacro.sty
@@ -67,7 +67,7 @@
\escapechar=92 % `\\
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{letltxmacro}%
- [2008/06/12 v1.1 Let assignment for LaTeX macros (HO)]
+ [2008/06/13 v1.2 Let assignment for LaTeX macros (HO)]
\newcommand*{\LetLtxMacro}[2]{%
\edef\reserved@a{%
\noexpand\protect
@@ -93,16 +93,28 @@
\def\llm@LetLtxMacro#1#2{%
\expandafter\llm@CheckParams\meaning#2:->\@nil{%
\begingroup
- \ifx\llm@protected\@empty
- \edef\x{%
+ \def\@protected@testopt{%
+ \expandafter\@testopt\@gobble
+ }%
+ \def\@testopt##1##2{%
+ \toks@={##2}%
+ }%
+ \let\llm@testopt\@empty
+ \edef\x{%
+ \noexpand\@protected@testopt
+ \noexpand#2%
+ \expandafter\noexpand\csname\string#2\endcsname
+ }%
+ \expandafter\expandafter\expandafter\def
+ \expandafter\expandafter\expandafter\y
+ \expandafter\expandafter\expandafter{%
+ \expandafter\llm@CarThree#2{}{}{}\llm@nil
+ }%
+ \ifx\x\y
+ #2%
+ \def\llm@testopt{%
\noexpand\@protected@testopt
- \noexpand#2%
- \expandafter\noexpand\csname\string#2\endcsname
- }%
- \expandafter\expandafter\expandafter\def
- \expandafter\expandafter\expandafter\y
- \expandafter\expandafter\expandafter{%
- \expandafter\llm@CarThree#2{}{}{}\llm@nil
+ \noexpand#1%
}%
\else
\edef\x{%
@@ -114,33 +126,27 @@
\expandafter\expandafter\expandafter{%
\expandafter\llm@CarTwo#2{}{}\llm@nil
}%
- \fi
- \expandafter\endgroup\ifx\x\y
- \begingroup
- \def\@protected@testopt##1##2##3{%
- \toks@={##3}%
- \xdef\llm@GlobalTemp{%
- \noexpand\@protected@testopt
- \noexpand#1%
- \expandafter\noexpand\csname\string#1\endcsname
- {\the\toks@}%
- }%
- }%
- \def\@testopt##1##2{%
- \toks@={##2}%
- \protected\xdef\llm@GlobalTemp{%
+ \ifx\x\y
+ #2%
+ \def\llm@testopt{%
\noexpand\@testopt
- \expandafter\noexpand\csname\string#1\endcsname
- {\the\toks@}%
}%
+ \fi
+ \fi
+ \ifx\llm@testopt\@empty
+ \else
+ \llm@protected\xdef\llm@GlobalTemp{%
+ \llm@testopt
+ \expandafter\noexpand\csname\string#1\endcsname
+ {\the\toks@}%
}%
- #2%
- \endgroup
+ \fi
+ \expandafter\endgroup\ifx\llm@testopt\@empty
+ \let#1=#2\relax
+ \else
\let#1=\llm@GlobalTemp
\expandafter\let\csname\string#1\expandafter\endcsname
\csname\string#2\endcsname
- \else
- \let#1=#2\relax
\fi
}{%
\let#1=#2\relax