Skip to content

Commit

Permalink
restrict detokenize to within csname #932
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcarlisle committed Oct 22, 2022
1 parent 34e697b commit f970508
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions base/ltclass.dtx
Expand Up @@ -1521,8 +1521,7 @@
\ifx\@classoptionslist\relax\else
\@for\CurrentOption:=\@classoptionslist\do{%
\ifx\CurrentOption\@empty\else
\edef\CurrentOption{\detokenize\expandafter{\CurrentOption}}%
\@ifundefined{ds@\CurrentOption}{}{%
\@ifundefined{ds@\detokenize\expandafter{\CurrentOption}}{}{%
\@use@ption
\expandafter\let\csname ds@\CurrentOption\endcsname\@empty
}%
Expand Down Expand Up @@ -1567,8 +1566,7 @@
%<latexrelease> {\@process@pti@ns}{Unused options issue}%
\def\@process@pti@ns{%
\@for\CurrentOption:=\@curroptions\do{%
\edef\CurrentOption{\detokenize\expandafter{\CurrentOption}}%
\@ifundefined{ds@\CurrentOption}%
\@ifundefined{ds@\detokenize\expandafter{\CurrentOption}}%
{\@use@ption
\default@ds}%
% \end{macrocode}
Expand Down Expand Up @@ -1636,6 +1634,7 @@
% \changes{v1.0e}{1994/05/17}
% {Execute option after removing from list, not before}
% \changes{v1.3x}{2021/02/18}{filter out =value from unused option list (gh/85)}
% \changes{v1.5e}{2022/10/22}{Use \cs{detokenize}}
% \begin{macrocode}
%</2ekernel>
%<latexrelease>\IncludeInRelease{2021/06/01}%
Expand All @@ -1645,7 +1644,7 @@
\@expandtwoargs\@removeelement
{\expandafter\@remove@eq@value\CurrentOption=\@nil}%
\@unusedoptionlist\@unusedoptionlist
\csname ds@\CurrentOption\endcsname}
\csname ds@\detokenize\expandafter{\CurrentOption}\endcsname}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}%
Expand Down

0 comments on commit f970508

Please sign in to comment.