Skip to content

Commit

Permalink
revert to 066ad1d and re-apply 3c68c56 (#1541)
Browse files Browse the repository at this point in the history
* revert to 066ad1d and re-apply 3c68c56

* remove test file for #1448

* today's date and changes.txt entry

* Update date/version

---------

Co-authored-by: Joseph Wright <[email protected]>
  • Loading branch information
davidcarlisle and josephwright authored Nov 5, 2024
1 parent 858c4ac commit d4fc584
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 421 deletions.
66 changes: 5 additions & 61 deletions required/amsmath/amsmath.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \begin{macrocode}
\DeclareRelease{}{1994-06-01}{amsmath-2018-12-01.sty}
\DeclareRelease{}{2018-12-01}{amsmath-2018-12-01.sty}
\DeclareCurrentRelease{}{2024-10-30}
\DeclareCurrentRelease{}{2019-04-01}
% \end{macrocode}
%
% \begin{macrocode}
\ProvidesPackage{amsmath}[2024/10/30 v2.17s AMS math features]
\ProvidesPackage{amsmath}[2024/11/05 v2.17t AMS math features]
% \end{macrocode}
%
% \section{Catcode defenses}
Expand Down Expand Up @@ -1002,10 +1002,6 @@ Foreign command \@backslashchar#1;\MessageBreak
\let\DOTSI\relax
\let\DOTSB\relax
\let\DOTSX\relax
% \end{macrocode}
% In the definitions below, special \cs{uccode}s are used to generate macros
% with arguments delimited by catcode 12 letters as returned by \cs{meaning}.
% \begin{macrocode}
{\uccode`7=`\\ \uccode`8=`m \uccode`9=`a \uccode`0=`t \uccode`!=`h
\uppercase{%
\gdef\math@#1#2#3#4#5#6\math@{\gtest@false\ifx 7#1\ifx 8#2%
Expand Down Expand Up @@ -1043,13 +1039,6 @@ Foreign command \@backslashchar#1;\MessageBreak
}
\fi
% \end{macrocode}
% \changes{v2.17s}{2024/10/30}{guard against primitive if (gh/1448)}
% \begin{macrocode}
{\uccode`7=`\\ \uccode`(=`i \uccode`)=`f
\uppercase{\gdef\testif@#1#2#3#4\testif@{%
\ifx7#1\ifx(#2\ifx)#3\@tempswafalse\fi\fi\fi}
}}
% \end{macrocode}
% \begin{macrocode}
\newcount\classnum@
\def\getmathch@#1.#2\getmathch@{\classnum@#1 \divide\classnum@4096
Expand Down Expand Up @@ -1098,14 +1087,6 @@ Foreign command \@backslashchar#1;\MessageBreak
\ifx9#2 \@xp\@xp\@xp\zap@to@space\fi}}}
\def\zap@to@space#1 {}
% \end{macrocode}
%
% \changes{v2.17r}{2024/06/29}{macro added to strip \cs{protected} (gh/1265)}
% \begin{macrocode}
{\uccode`9=`\p %
\uppercase{\gdef\stripprotected@#1#2#3\relax{%
\ifx9#2 \@xp\@xp\@xp\zap@to@space\fi}}}
% \end{macrocode}
%
% \begin{macrocode}
\def\keybin@{\gtest@true
\ifx\@let@token+\else\ifx\@let@token=\else
Expand Down Expand Up @@ -1158,43 +1139,15 @@ Foreign command \@backslashchar#1;\MessageBreak
\gdef\thedots@{\dotsb@}%
\else
% \end{macrocode}
% In case \cs{@let@token} is a robust \LaTeXe{} command, i.e.,
% expands to \cs{protect}
% \verb*=\somename =, we save the \cs{meaning} of
% \verb*=\somename = in \cs{meaning@} (possibly followed by some dots that have
% not been consumed as arguments during the expansion).
% Otherwise, we save the
% \cs{meaning} of \cs{@let@token} in \cs{meaning@}. The dots at the end
% as well as the space are
% used in later parts of the checking (this could probably be cleaned up a bit).
% \changes{v2.15d}{2016/06/28}{Add space token to prevent runaway
% argument error}
% \changes{v2.17r}{2024/06/29}{Drop \cs{protect} if present (gh/1265)}
% \changes{v2.17s}{2024/10/30}{skip protect testif detect primitive if (gh/1448)}
% \changes{v2.15d}{2016/06/28}{Add space token to prevent runaway argument error}
% \begin{macrocode}
\xdef\meaning@{\meaning\@let@token. .........}%
\@tempswatrue
\@xp\testif@\meaning@....\testif@
\if@tempswa
\begingroup
\def\protect{\protect}% % make it a quark
\xdef\meaning@{\@xp\stripprotect@\@let@token.........\stripprotect@. .........}%
\endgroup
\fi
% \end{macrocode}
% In previous versions \verb|\long| macros were not seen by the lookahead.
% \end{macrocode}
% In previous versions \verb|\long| macros were not seen by the lokkahead.
% That was bad as this file uses \verb|\(re)newcommand| for \verb|\implies| etc.
% \begin{macrocode}
\xdef\meaning@@{\@xp\striplong@\meaning@\relax\meaning@}%
% \end{macrocode}
% Until now \cs{protected} macros also stopped the lookahead, e.g.,
% $\cong$ wasn't recognized correctly for that reason.
%
% \changes{v2.17r}{2024/06/29}{Handle \cs{protected} macros in
% lookahead for dots (gh/1265)}
% \begin{macrocode}
\xdef\meaning@@{\@xp\stripprotected@\meaning@@\relax\meaning@@}%
% \end{macrocode}
% \begin{macrocode}
\@xp\math@\meaning@\math@
\ifgtest@ % if \mathxxx test
Expand Down Expand Up @@ -1255,15 +1208,6 @@ Foreign command \@backslashchar#1;\MessageBreak
\thedots@}
% \end{macrocode}
%
% The helper to generate the meaning of \cs{\@let@token}, or of its
% first-level expansion with \cs{protect} removed.
% \changes{v2.17r}{2024/06/29}{Drop \cs{protect} if present (gh/1265)}
% \begin{macrocode}
\def\stripprotect@#1#2\stripprotect@{\ifx#1\protect
\meaning#2\else \meaning\@let@token \fi}

% \end{macrocode}
%
% The \qc{\=} character is necessary in the two \cs{let} assignments
% in \cs{boldsymboldots@}, because the symbol we are making
% bold might be an \qc{\=} sign.
Expand Down
5 changes: 5 additions & 0 deletions required/amsmath/changes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2024-11-05 David Carlisle <[email protected]>

* amsmath.dtx
Revert last \dots change (gh/1448)

================================================================================
All changes above are only part of the development branch for the next release.
================================================================================
Expand Down
178 changes: 0 additions & 178 deletions required/amsmath/testfiles/github-1448.luatex.tlg

This file was deleted.

34 changes: 0 additions & 34 deletions required/amsmath/testfiles/github-1448.lvt

This file was deleted.

Loading

0 comments on commit d4fc584

Please sign in to comment.