[latex3-commits] [git/LaTeX3-latex3-latex2e] gh22: guard against repeated use (a7905795)
Frank Mittelbach
frank.mittelbach at latex-project.org
Tue Apr 7 16:32:29 CEST 2020
Repository : https://github.com/latex3/latex2e
On branch : gh22
Link : https://github.com/latex3/latex2e/commit/a7905795881be0c7f0e676e1da79bb8081d4939a
>---------------------------------------------------------------
commit a7905795881be0c7f0e676e1da79bb8081d4939a
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Tue Apr 7 16:32:29 2020 +0200
guard against repeated use
>---------------------------------------------------------------
a7905795881be0c7f0e676e1da79bb8081d4939a
base/ltclass.dtx | 13 ++++--
base/testfiles/github-0022.lvt | 2 +-
base/testfiles/github-0022.tlg | 98 +++---------------------------------------
3 files changed, 16 insertions(+), 97 deletions(-)
diff --git a/base/ltclass.dtx b/base/ltclass.dtx
index 485c0a92..96514482 100644
--- a/base/ltclass.dtx
+++ b/base/ltclass.dtx
@@ -1082,7 +1082,7 @@
% \begin{macrocode}
\let\CurrentOption\@empty
\let\@fileswith at pti@ns\@@fileswith at pti@ns
- \AtEndOfPackage{\@drop at unprocessoptions}}
+ \AtEndOfPackage{\@drop at unprocessedoptions}}
\@onlypreamble\@process at pti@ns
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
@@ -1282,20 +1282,25 @@
% \changes{v1.3k}{2020/04/07}{Use different method to ignore
% unprocessed options (gh/22)}
% \begin{macrocode}
- \AtEndOfPackage{\@drop at unprocessoptions}%
+ \AtEndOfPackage{\@drop at unprocessedoptions}%
\@loadwithoptions\@pkgextension\RequirePackage}
\@onlypreamble\RequirePackageWithOptions
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\@drop at unprocessoptions}
+% \begin{macro}{\@drop at unprocessedoptions}
% Kind of a longish \cs{expandafter}. We skip ahead the re-add what
% we scanned but drop \cs{@unprocessedoptions}.
% \changes{v1.3k}{2020/04/07}{Use different method to ignore
% unprocessed options (gh/22)}
% \begin{macrocode}
-\long\def\@drop at unprocessoptions#1\@undefined\@unprocessedoptions{#1\@undefined}
+\long\def\@@drop at unprocessedoptions#1\@undefined\@unprocessedoptions{%
+ \let\@drop at unprocessedoptions\relax
+ #1\@undefined
+ \let\@drop at unprocessedoptions\@@drop at unprocessedoptions
+}
+\let\@drop at unprocessedoptions\@@drop at unprocessedoptions
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
diff --git a/base/testfiles/github-0022.lvt b/base/testfiles/github-0022.lvt
index 6040f123..a70c34ca 100644
--- a/base/testfiles/github-0022.lvt
+++ b/base/testfiles/github-0022.lvt
@@ -14,7 +14,7 @@
\usepackage[TEST]{bezier} % empty package without \ProcessOptions
-\usepackage[TEST]{doc} % non-empty package without \ProcessOptions
+\usepackage[TEST]{trace} % non-empty package without \ProcessOptions
\usepackage[TEST]{\jobname}
diff --git a/base/testfiles/github-0022.tlg b/base/testfiles/github-0022.tlg
index 9ece90a0..27cce941 100644
--- a/base/testfiles/github-0022.tlg
+++ b/base/testfiles/github-0022.tlg
@@ -8,102 +8,16 @@ Type H <return> for immediate help.
l. ...
The option `TEST' was not declared in package `bezier', perhaps you
misspelled its name. Try typing <return> to proceed.
-(doc.sty
-Package: doc ....-..-.. v... Standard LaTeX documentation package (FMi)
-\c at StandardModuleDepth=\count...
-\guard at level=\count...
-\MacrocodeTopsep=\skip...
-\MacroIndent=\dimen...
-\macro at cnt=\count...
-\MacroTopsep=\skip...
-\index at excludelist=\toks...
-(multicol.sty
-Package: multicol ....-..-.. v... multicolumn formatting (FMi)
-\c at tracingmulticols=\count...
-\mult at box=\box...
-\multicol at leftmargin=\dimen...
-\c at unbalance=\count...
-\c at collectmore=\count...
-\doublecol at number=\count...
-\multicoltolerance=\count...
-\multicolpretolerance=\count...
-\full at width=\dimen...
-\page at free=\dimen...
-\premulticols=\dimen...
-\postmulticols=\dimen...
-\multicolsep=\skip...
-\multicolbaselineskip=\skip...
-\partial at page=\box...
-\last at line=\box...
-\maxbalancingoverflow=\dimen...
-\mult at rightbox=\box...
-\mult at grightbox=\box...
-\mult at gfirstbox=\box...
-\mult at firstbox=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\@tempa=\box...
-\c at minrows=\count...
-\c at columnbadness=\count...
-\c at finalcolumnbadness=\count...
-\last at try=\dimen...
-\multicolovershoot=\dimen...
-\multicolundershoot=\dimen...
-\mult at nat@firstbox=\box...
-\colbreak at box=\box...
-\mc at col@check at num=\count...
-)
-\IndexMin=\dimen...
-\c at IndexColumns=\count...
-\GlossaryMin=\dimen...
-\c at GlossaryColumns=\count...
-\check at sum=\count...
-\bslash at cnt=\count...
-\wrong at table=\toks...
-\c at CodelineNo=\count...
-)
-! LaTeX Error: Unknown option `TEST' for package `doc'.
+(trace.sty
+Package: trace ....-..-.. v... trace LaTeX code
+! LaTeX Error: Unknown option `TEST' for package `trace'.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
-l. ...
-The option `TEST' was not declared in package `doc', perhaps you
+l. ...\ProcessOptions\relax
+The option `TEST' was not declared in package `trace', perhaps you
misspelled its name. Try typing <return> to proceed.
-(github-0022.sty
+) (github-0022.sty
*** TEST OPTION ***
) (alltt.sty
Package: alltt ....-..-.. v... defines alltt environment
More information about the latex3-commits
mailing list.