Skip to content

Commit

Permalink
Define \begin as engine-protected
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwright committed Oct 13, 2024
1 parent 7db95fb commit e642f0b
Show file tree
Hide file tree
Showing 38 changed files with 18 additions and 47 deletions.
4 changes: 4 additions & 0 deletions base/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ to completeness or accuracy and it contains some references to files that are
not part of the distribution.
================================================================================

2024-10-12 Joseph Wright <Joseph.Wright@latex-project.org>
* ltmiscen.dtx
Define \being as an engine-protected macro

2024-10-07 Joseph Wright <Joseph.Wright@latex-project.org>
* lttemplates.dtx
Correct passing of token list content using \KeyValue
Expand Down
5 changes: 3 additions & 2 deletions base/ltmiscen.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltmiscen.dtx}
[2024/07/10 v1.2e LaTeX Kernel (Misc. Environments)]
[2024/10/12 v1.2f LaTeX Kernel (Misc. Environments)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltmiscen.dtx}
Expand Down Expand Up @@ -748,12 +748,13 @@
% \changes{v1.1p}{2019/08/27}{Make command robust}
% \changes{v1.2d}{2024/06/23}{Separate \cs{begin} and \cs{end} definitions
% for individual rollback}
% \changes{v1.2f}{2024/10/12}{Make \cs{begin} engine-protected}
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
%<latexrelease>\IncludeInRelease{2020/10/01}%
%<latexrelease> {\begin}{Use hook system}%
\DeclareRobustCommand*\begin[1]{%
\protected\def\begin#1{%
\UseHook{env/#1/before}%
\@ifundefined{#1}%
{\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
Expand Down
1 change: 0 additions & 1 deletion base/testfiles-lthooks/lthooks-rollback-args.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ Applying: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
2 changes: 1 addition & 1 deletion base/testfiles/github-0354.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
Runaway argument?
{quote) qqq \end {quote}
! Paragraph ended before \begin was complete.
! Paragraph ended before \begin was complete.
<to be read again>
\par
l. ...
Expand Down
1 change: 0 additions & 1 deletion base/testfiles/github-0479-often.luatex.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,6 @@ Applying: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
1 change: 0 additions & 1 deletion base/testfiles/github-0479-often.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ Applying: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
1 change: 0 additions & 1 deletion base/testfiles/github-0479-often.xetex.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ Applying: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
4 changes: 2 additions & 2 deletions base/testfiles/github-0548.luatex.tlg
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
> \@tempa=macro:
->\protect \begin {tabular}{c}a\\b\protect \end {tabular}.
->\begin {tabular}{c}a\\b\protect \end {tabular}.
l. ......in{tabular}{c}a\\b\end{tabular}}\show\@tempa
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <7> on input line ....
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line ....
> \@tempa=macro:
->\protect \begin {tabular}{c}a\\b\protect \end {tabular}.
->\begin {tabular}{c}a\\b\protect \end {tabular}.
l. ......in{tabular}{c}a\\b\end{tabular}}\show\@tempa
> \@tempa=macro:
->\protect \shortstack {c}{a\\b}.
Expand Down
4 changes: 2 additions & 2 deletions base/testfiles/github-0548.tlg
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
> \@tempa=macro:
->\protect \begin {tabular}{c}a\\b\protect \end {tabular}.
->\begin {tabular}{c}a\\b\protect \end {tabular}.
l. ......{tabular}{c}a\\b\end{tabular}}\show\@tempa
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <7> on input line ....
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line ....
> \@tempa=macro:
->\protect \begin {tabular}{c}a\\b\protect \end {tabular}.
->\begin {tabular}{c}a\\b\protect \end {tabular}.
l. ......{tabular}{c}a\\b\end{tabular}}\show\@tempa
> \@tempa=macro:
->\protect \shortstack {c}{a\\b}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,6 @@ Applying: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
1 change: 0 additions & 1 deletion base/testfiles/tlb-latexrelease-rollback-2020-10-01.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ Applying: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ Applying: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,6 @@ Already applied: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
1 change: 0 additions & 1 deletion base/testfiles/tlb-latexrelease-rollback-2021-06-01.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ Already applied: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ Already applied: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,6 @@ Already applied: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
1 change: 0 additions & 1 deletion base/testfiles/tlb-latexrelease-rollback-2021-11-15.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ Already applied: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ Already applied: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,6 @@ Already applied: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
1 change: 0 additions & 1 deletion base/testfiles/tlb-latexrelease-rollback-2022-06-01.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ Already applied: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ Already applied: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,6 @@ Already applied: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
1 change: 0 additions & 1 deletion base/testfiles/tlb-latexrelease-rollback-2022-11-01.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ Already applied: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ Already applied: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,6 @@ Already applied: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
1 change: 0 additions & 1 deletion base/testfiles/tlb-latexrelease-rollback-2023-06-01.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ Already applied: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ Already applied: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,6 @@ Already applied: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
1 change: 0 additions & 1 deletion base/testfiles/tlb-latexrelease-rollback-2023-11-01.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ Already applied: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ Already applied: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,6 @@ Already applied: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
1 change: 0 additions & 1 deletion base/testfiles/tlb-latexrelease-rollback-2024-06-01.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ Already applied: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ Already applied: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
1 change: 0 additions & 1 deletion base/testfiles/tlb-rollback-005.luatex.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,6 @@ Applying: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
1 change: 0 additions & 1 deletion base/testfiles/tlb-rollback-005.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,6 @@ Applying: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
1 change: 0 additions & 1 deletion base/testfiles/tlb-rollback-005.xetex.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,6 @@ Applying: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Use hook system on input line ....
LaTeX Info: Redefining \begin on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Already applied: [....-..-..] Making \begin /\end robust on input line ....
Applying: [....-..-..] Making \begin /\end robust on input line ....
Expand Down
3 changes: 3 additions & 0 deletions required/latex-lab/changes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2024-10-04 Joseph Wright <Joseph.Wright@latex-project.org>
* latex-lab-math.dtx: Sync with protected-begin status

2024-10-11 Frank Mittelbach <Frank.Mittelbach@latex-project.org>

* latex-lab-block.dtx (subsubsection{verse environment}):
Expand Down
Loading

0 comments on commit e642f0b

Please sign in to comment.