[latex3-commits] [latex3/latex3] develop: Fix inconsistent local/global assignments in l3doc (25e407eeb)
github at latex-project.org
github at latex-project.org
Thu Oct 3 10:00:56 CEST 2024
Repository : https://github.com/latex3/latex3
On branch : develop
Link : https://github.com/latex3/latex3/commit/25e407eeb2cfe363597db537764059b57d1fa5cd
>---------------------------------------------------------------
commit 25e407eeb2cfe363597db537764059b57d1fa5cd
Author: Yukai Chou <muzimuzhi at gmail.com>
Date: Fri Sep 27 11:37:28 2024 +0800
Fix inconsistent local/global assignments in l3doc
see #1593
>---------------------------------------------------------------
25e407eeb2cfe363597db537764059b57d1fa5cd
l3kernel/CHANGELOG.md | 2 +-
l3kernel/l3doc.dtx | 4 ++--
l3kernel/testfiles-l3doc/test.lvt | 26 +++++++++++++++++++++++++-
l3kernel/testfiles-l3doc/test.tlg | 21 +++++++++++++++++++++
4 files changed, 49 insertions(+), 4 deletions(-)
diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index d20a686ff..31dee9c4f 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -12,7 +12,7 @@ this project uses date-based 'snapshot' version identifiers.
### Fixed
- Use TU-encoding with lualatex and xelatex in `l3doc`
-- Global booleans were set locally in `l3doc`
+- Inconsistent local/global assignments in `l3doc` (see \#1593)
## [2024-09-10]
diff --git a/l3kernel/l3doc.dtx b/l3kernel/l3doc.dtx
index 85af29108..1e1241148 100644
--- a/l3kernel/l3doc.dtx
+++ b/l3kernel/l3doc.dtx
@@ -3734,7 +3734,7 @@ and all files in that bundle must be distributed together.
{
\clist_map_inline:nn {#1}
{
- \clist_put_right:Nn \g_docinput_clist {##1}
+ \clist_gput_right:Nn \g_docinput_clist {##1}
\@@_input:n {##1}
}
}
@@ -3859,7 +3859,7 @@ and all files in that bundle must be distributed together.
{ MMMMV - \filesep \int_use:N \c at CodelineNo }
}
}
-\tl_gclear:N \filesep
+\tl_clear_new:N \filesep
\cs_new_protected:Npn \@@_index_page_hc:nn #1#2
{
\protected at write \@indexfile {}
diff --git a/l3kernel/testfiles-l3doc/test.lvt b/l3kernel/testfiles-l3doc/test.lvt
index 4f7b8ad66..efec6ddca 100644
--- a/l3kernel/testfiles-l3doc/test.lvt
+++ b/l3kernel/testfiles-l3doc/test.lvt
@@ -3,15 +3,39 @@
%
\input regression-test.tex
+\ExplSyntaxOn
+\debug_on:n { check-declarations, deprecation }
+
+% omit all log lines written by l3doc dependencies
+\int_new:N \g_level_int
+\int_gincr:N \g_level_int % l3doc.cls has level 1
+\cs_new_protected:Npn \level_gincr:
+ {
+ \int_compare:nNnT { \g_level_int } = { 2 } { \OMIT }
+ \int_gincr:N \g_level_int
+ }
+\cs_new_protected:Npn \level_gdecr:
+ {
+ \int_gdecr:N \g_level_int
+ \int_compare:nNnT { \g_level_int } = { 2 } { \TIMO }
+ }
+\hook_gput_code:nnn {class/before} {.} { \level_gincr: }
+\hook_gput_code:nnn {class/after} {.} { \level_gdecr: }
+\hook_gput_code:nnn {package/before} {.} { \level_gincr: }
+\hook_gput_code:nnn {package/after} {.} { \level_gdecr: }
+\ExplSyntaxOff
+
+\START
\documentclass{l3doc}
\CodelineIndex
+\OMIT
\begin{document}
+\TIMO
\ExplSyntaxOn
\tl_gset:Nn \g__codedoc_module_name_tl {foo}
\ExplSyntaxOff
\showoutput
-\START
\begin{function}{\foo}
This is a test.
\end{function}
diff --git a/l3kernel/testfiles-l3doc/test.tlg b/l3kernel/testfiles-l3doc/test.tlg
index 46d2b3004..18e899747 100644
--- a/l3kernel/testfiles-l3doc/test.tlg
+++ b/l3kernel/testfiles-l3doc/test.tlg
@@ -1,5 +1,26 @@
This is a generated file for the LaTeX (2e + expl3) validation system.
Don't change this file in any respect.
+(l3doc.cls
+Document Class: l3doc ....-..-.. L3 Experimental documentation class
+\l__codedoc_output_coffin=\box...
+\l__codedoc_functions_coffin=\box...
+\l__codedoc_descr_coffin=\box...
+\l__codedoc_syntax_coffin=\box...
+\g__codedoc_syntax_box=\box...
+\l__codedoc_trial_width_dim=\dimen...
+\l__codedoc_nested_macro_int=\count...
+\l__codedoc_tmpa_int=\count...
+\l__codedoc_tmpa_seq=\count...
+\l__codedoc_macro_box=\box...
+\l__codedoc_macro_index_box=\box...
+\l__codedoc_macro_int=\count...
+LaTeX Font Info: Trying to load font information for T1+lmtt on input line ....
+\l__codedoc_syntax_dim=\dimen...
+\@glossaryfile=\write...
+Writing glossary file test.glo
+\@indexfile=\write...
+Writing index file test.idx
+)
LaTeX Font Info: Trying to load font information for OT1+lmr on input line ....
LaTeX Font Info: Trying to load font information for OML+lmm on input line ....
LaTeX Font Info: Trying to load font information for OMS+lmsy on input line ....
More information about the latex3-commits
mailing list.