summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/eplain/btxmac.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-10-03 17:13:21 +0000
committerKarl Berry <karl@freefriends.org>2013-10-03 17:13:21 +0000
commite5eb637929530ade80eb06166f5c9bf94520cc8a (patch)
treeea5dc6c8b12191cd520b6abdd4d8539830ec154b /Master/texmf-dist/tex/eplain/btxmac.tex
parentdf52409da77deee3e0d970aed77312e628a0e5c0 (diff)
eplain (1oct13)
git-svn-id: svn://tug.org/texlive/trunk@31819 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/eplain/btxmac.tex')
-rw-r--r--Master/texmf-dist/tex/eplain/btxmac.tex24
1 files changed, 13 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/eplain/btxmac.tex b/Master/texmf-dist/tex/eplain/btxmac.tex
index 88338ab8b39..2507dae85f3 100644
--- a/Master/texmf-dist/tex/eplain/btxmac.tex
+++ b/Master/texmf-dist/tex/eplain/btxmac.tex
@@ -1,7 +1,7 @@
%% @texfile{
%% author = "Karl Berry and Oren Patashnik",
-%% version = "0.99m",
-%% date = "7 February 2013",
+%% version = "0.99n",
+%% date = "30 September 2013",
%% filename = "btxmac.tex",
%% address = "tex-eplain@tug.org",
%% supported = "yes",
@@ -299,7 +299,7 @@
% essentially like \futurelet except that it discards any implicit or
% explicit space tokens that intervene before a nonspace is scanned:
%
-\def\@futurenonspacelet#1{\def\cs{#1}%
+\long\def\@futurenonspacelet#1{\def\cs{#1}%
\afterassignment\@stepone\let\@nexttoken=
}%
\begingroup % The grouping here avoids stepping on an outside use of `\\'.
@@ -319,7 +319,7 @@
% the brackets don't have a funny category code.
%
\def\@getoptionalarg#1{%
- \let\@optionaltemp = #1%
+ \let\@optionalusercs = #1%
\let\@optionalnext = \relax
\@futurenonspacelet\@optionalnext\@bracketcheck
}%
@@ -329,19 +329,21 @@
%
\def\@bracketcheck{%
\ifx [\@optionalnext
- \expandafter\@@getoptionalarg
+ \expandafter\@@getoptionalarg % we have an optional arg
\else
- \let\@optionalarg = \empty
- % We can't do the \temp after the \fi, because then the \temp gets
- % in the way of reading the optional argument from the input, if
- % we do have one.
- \expandafter\@optionaltemp
+ \let\@optionalarg = \empty % no optional arg
+ \expandafter\@optionalusercs
\fi
}%
%
+% Get the next bracketed text.
\def\@@getoptionalarg[#1]{%
\def\@optionalarg{#1}%
- \@optionaltemp
+ % Ignore spaces after the optional arg, too.
+ % (We don't actually need to peek ahead, but this is the easiest way
+ % to ignore the spaces.)
+ \let\@optdummy=\relax % just in case it has become \outer somehow
+ \@futurenonspacelet\@optdummy\@optionalusercs
}%
%
%