doc/sod.sty: Hoist `\@ifnextchar@preserve' further up.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 5 Aug 2019 15:13:13 +0000 (16:13 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 5 Aug 2019 15:13:13 +0000 (16:13 +0100)
doc/sod.sty

index 531fce0..3560c62 100644 (file)
   \expandafter\@firstoftwo\expandafter\@scripts%
   \else\@tempa\expandafter\@scripts\fi}
 
+%% Lookahead without eating spaces.
+\def\@ifnextchar@preserve#1#2#3{%
+  \let\want@= #1\def\@tempa{#2}\def\@tempb{#3}%
+  \futurelet\nch@\@ifnch@p%
+}
+\def\@ifnch@p{%
+  \ifx\want@\nch@\expandafter\@tempa\else\expandafter\@tempb\fi}
+
 %% Extra syntax for Lisp templates.  These produce the maths-font versions of
 %% characters, which should contrast well against the sans face used for
 %% literals.
 }
 \def\desc@end{\endlist\after@desc\global\let\after@desc\saved@after@desc}
 
-\def\@ifnextchar@preserve#1#2#3{%
-  \let\want@= #1\def\@tempa{#2}\def\@tempb{#3}%
-  \futurelet\nch@\@ifnch@p%
-}
-\def\@ifnch@p{%
-  \ifx\want@\nch@\expandafter\@tempa\else\expandafter\@tempb\fi}
-
 \@namedef{describe*}#1{\desc@begin{#1}}
 \expandafter\let\csname enddescribe*\endcsname\desc@end
 \def\describe{\parse@dhd\desc@}