summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/eplain/btxmac.tex
diff options
context:
space:
mode:
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
}%
%
%