
 %%%%%%%%%%%%%%%%%%%%%%%%%%
 %%% ams-act.tex
 %%  part of fe-format-dumper-cm directory
 %%  L. Siebenmann, 5-92
 %%  Documentation in fe-dump.doc

 %%  
 %%  Input (anytime) AFTER AmSTeX
 %%  and AmSppt.sty (if latter used at all).
 %%  Tuned to version 2.1 of AmSTeX dated 1991 
 %%  source ftp e-math.ams.com [130.44.1.100]
 %%  Hopefully, this "patch" file will become superfluous
 %%  with the next version of AmSTeX.
 %%  When you get such an update try puting \endinput
 %%  at the head of this file.

 %%  The cost of ams-act.tex in active memory is negligible
 %%  since it replaces similar existing
 %%  material of amstex.tex.

 %% The use of \semicolon@ and its companions here 
 %% is explained in a note from June 1990 
 %% by L. Siebenmann concerning active punctuation
 %% posted on ftp rsovax.ups.circe.fr  [130.84.128.100].


 \catcode`\@=11

 %%% New definitions
 \let\semicolon@;
 \let\colon@:
 \let\exclamationmark@!
 \let\questionmark@?
 \let\doublequote@"
 %% Category does not matterjust now.

 %% Aim: to replace ;:!?" respectively 
 %% by the above in the expansions
 %% of the following macros: \boldkey#1, 
 %% \dotsc, \extrap@#1, \tdots@, \keybin@

 %% Then, when ;:!?", to change category 12 to 13 or back,
 %% it is no longer necessary to reiterate the definitions
 %% of these five macros with the new cat codes; 
 %% instead it suffices to reiterate the \let statements 
 %% for the punctuation marks that change category.
 %%

\def\boldkey#1{\ifcat\noexpand#1A%
  \ifx\undefined\cmmibfam \boldnotloaded\@ne
  \else {\fam\cmmibfam#1}\fi
 \else
 \ifx#1\exclamationmark@\mathchar"5\bffam@21 \else
 \ifx#1(\mathchar"4\bffam@28 \else
 \ifx#1)\mathchar"5\bffam@29 \else
 \ifx#1+\mathchar"2\bffam@2B \else
 \ifx#1\colon@\mathchar"3\bffam@3A \else
 \ifx#1\semicolon@\mathchar"6\bffam@3B \else
 \ifx#1=\mathchar"3\bffam@3D \else
 \ifx#1\questionmark@\mathchar"5\bffam@3F \else
 \ifx#1[\mathchar"4\bffam@5B \else
 \ifx#1]\mathchar"5\bffam@5D \else
 \ifx#1,\mathchari@63B \else
 \ifx#1-\mathcharii@200 \else
 \ifx#1.\mathchari@03A \else
 \ifx#1/\mathchari@03D \else
 \ifx#1<\mathchari@33C \else
 \ifx#1>\mathchari@33E \else
 \ifx#1*\mathcharii@203 \else
 \ifx#1|\mathcharii@06A \else
 \ifx#10\bold0\else\ifx#11\bold1\else
 \ifx#12\bold2\else\ifx#13\bold3\else
 \ifx#14\bold4\else\ifx#15\bold5\else
 \ifx#16\bold6\else\ifx#17\bold7\else
 \ifx#18\bold8\else\ifx#19\bold9\else
  \Err@{\string\boldkey\space can't be used with #1}%
 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}


\def\dotsc{\relaxnext@
  \DN@{\ifx\next;\plainldots@\,\else
  \ifx\next.\plainldots@\,\else\extra@\plainldots@
  \ifextra@\,\fi\fi\fi}%
  \FN@\next@}


\def\extrap@#1{%
 \ifx\next,\DN@{#1\,}\else
 \ifx\next\semicolon@\DN@{#1\,}\else
 \ifx\next.\DN@{#1\,}\else\extra@
 \ifextra@\DN@{#1\,}\else
 \let\next@#1\fi\fi\fi\fi\next@}


\def\tdots@{\unskip\relaxnext@
 \DN@{$\m@th\mathinner{\ldotp\ldotp\ldotp}\,
   \ifx\next,\,$\else\ifx\next.\,$\else
   \ifx\next\semicolon@\,$\else
   \ifx\next\colon@\,$\else
   \ifx\next\questionmark@\,$\else
   \ifx\next\exclamationmark@\,$\else
    $ \fi\fi\fi\fi\fi\fi}%
    \ \FN@\next@}


\def\keybin@{\keybin@true
 \ifx\next+\else\ifx\next=\else
 \ifx\next<\else\ifx\next>\else
 \ifx\next-\else\ifx\next*\else
 \ifx\next\colon@\else\keybin@false
    \fi\fi\fi\fi\fi\fi\fi}


 \def\maketag@@{\ifx\next\doublequote@\expandafter
           \maketag@@@\else\expandafter\maketag@@@@\fi}

 %%

 \expandafter\ifx
     \csname amsppt.sty\endcsname\relax
     \def\this{\catcode`\@=13\endinput}
 \else
     \let\this\relax
 \fi

 \this
      
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%% for amsppt.sty only
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\catcode`\@=11

\def\curraddr{\let\savedef@\curraddr
  \def\curraddr##1\endcurraddr{\let\curraddr\savedef@
  \toks@\expandafter\expandafter\expandafter{%
       \csname address\number\addresscount@\endcsname}%
  \toks@@{##1}%
  \expandafter\xdef\csname address\number\addresscount@\endcsname
  {\the\toks@\endgraf\noexpand\nobreak
    \indent{\noexpand\rm
    \frills@{{\noexpand\it Current address\noexpand\/}\colon@\space}%
    \def\noexpand\usualspace{\space}\the\toks@@\unskip}}}%
  \nofrillscheck\curraddr}

\def\email{\let\savedef@\email
  \def\email##1\endemail{\let\email\savedef@
  \toks@{\def\usualspace{{\it\enspace}}\endgraf\indent\eightpoint}%
  \toks@@{##1\par}%
  \expandafter\xdef\csname email\number\addresscount@\endcsname
  {\the\toks@\frills@{{\noexpand\it E-mail address\noexpand\/}\colon@
     \noexpand\enspace}\the\toks@@}}%
  \nofrillscheck\email}

\catcode`\@=13
