summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3cctab.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-04-30 20:03:09 +0000
committerKarl Berry <karl@freefriends.org>2024-04-30 20:03:09 +0000
commit753708379c1fbd17a96f1a6788c94ce1fa1208d7 (patch)
treed1bfa8c85ad78bf1312298d97eb72490baa44683 /Master/texmf-dist/source/latex/l3kernel/l3cctab.dtx
parent93ae2978eea5bd5c39e8e0ac208a658c4c0c2e05 (diff)
l3kernel (30apr24)
git-svn-id: svn://tug.org/texlive/trunk@71140 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3cctab.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3cctab.dtx33
1 files changed, 25 insertions, 8 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3cctab.dtx b/Master/texmf-dist/source/latex/l3kernel/l3cctab.dtx
index 5cdaa3dc920..dd35fb00a3d 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3cctab.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3cctab.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-03-14}
+% \date{Released 2024-04-11}
%
% \maketitle
%
@@ -286,15 +286,23 @@
% \end{macrocode}
% Now the case for other engines. Here, each table is an integer
% array. Following the \LuaTeX{} pattern, a new table starts with
-% \IniTeX{} codes. The index base is out-by-one, so we have an
+% \IniTeX{} codes. The \cs{debug_suspend:} and \cs{debug_resume:}
+% functions prevent errors and logging from \texttt{debug} commands
+% which are either duplicate or false when \cs{@@_new:N} is used
+% by \cs{cctab_new:N} or \cs{cctab_const:Nn}.
+% The index base is out-by-one, so we have an
% internal function to handle that. The \IniTeX{} \tn{endlinechar} is
% $13$.
% \begin{macrocode}
{
\cs_new_protected:Npn \@@_new:N #1
- { \intarray_new:Nn #1 { 257 } }
+ {
+ \debug_suspend:
+ \intarray_new:Nn #1 { 257 }
+ \debug_resume:
+ }
\cs_new_protected:Npn \@@_gstore:Nnn #1#2#3
- { \intarray_gset:Nnn #1 { \int_eval:n { #2 + 1 } } {#3} }
+ { \intarray_gset:Nnn #1 { #2 + 1 } {#3} }
\cs_new_protected:Npn \cctab_new:N #1
{
\__kernel_chk_if_free_cs:N #1
@@ -796,13 +804,22 @@
% \subsection{Constant category code tables}
%
% \begin{macro}{\cctab_const:Nn,\cctab_const:cn}
-% Creates a new \meta{cctab~var} then sets it with the current and
-% user-supplied codes.
+% Creates a new \meta{cctab~var} then sets it with the \IniTeX{} and
+% user-supplied codes. To avoid false \texttt{debug} errors, we write
+% out implementation of \cs{cctab_new:N} and \cs{cctab_gset:Nn}
+% instead of directly using them here. The initialization part in
+% \cs{cctab_new:N} in non-\LuaTeX{} is omitted as it's covered by
+% the \IniTeX{} settings.
% \begin{macrocode}
\cs_new_protected:Npn \cctab_const:Nn #1#2
{
- \cctab_new:N #1
- \cctab_gset:Nn #1 {#2}
+ \__kernel_chk_if_free_cs:N #1
+ \@@_new:N #1
+ \group_begin:
+ \cctab_select:N \c_initex_cctab
+ #2 \scan_stop:
+ \@@_gset:n {#1}
+ \group_end:
}
\cs_generate_variant:Nn \cctab_const:Nn { c }
% \end{macrocode}