[latex3-commits] [git/LaTeX3-latex3-latex3] morechk: fix box checking, chk001 now good (f108d98)
Will Robertson
wspr81 at gmail.com
Mon Apr 15 16:03:29 CEST 2019
Repository : https://github.com/latex3/latex3
On branch : morechk
Link : https://github.com/latex3/latex3/commit/f108d98a23098050a134f0c00c496b57e510e90b
>---------------------------------------------------------------
commit f108d98a23098050a134f0c00c496b57e510e90b
Author: Will Robertson <wspr81 at gmail.com>
Date: Mon Apr 15 23:33:29 2019 +0930
fix box checking, chk001 now good
>---------------------------------------------------------------
f108d98a23098050a134f0c00c496b57e510e90b
l3kernel/l3basics.dtx | 13 ++++-
l3kernel/l3box.dtx | 4 +-
l3kernel/testfiles/m3chk001.luatex.tlg | 100 ++++----------------------------
l3kernel/testfiles/m3chk001.tlg | 100 ++++----------------------------
4 files changed, 32 insertions(+), 185 deletions(-)
diff --git a/l3kernel/l3basics.dtx b/l3kernel/l3basics.dtx
index acf50b3..fdea41f 100644
--- a/l3kernel/l3basics.dtx
+++ b/l3kernel/l3basics.dtx
@@ -1787,7 +1787,7 @@
%
% \begin{macro}
% {\@@_check-declarations_on:, \@@_check-declarations_off:}
-% \begin{macro}{\__kernel_chk_var_exist:N,\__kernel_chk_var_exist:c, \__kernel_chk_var_exist:NT}
+% \begin{macro}{\__kernel_chk_var_exist:N,\__kernel_chk_var_exist:c}
% \begin{macro}{\__kernel_chk_cs_exist:N, \__kernel_chk_cs_exist:c}
% \begin{macro}{\__kernel_chk_var_local:N, \__kernel_chk_var_global:N}
% \begin{macro}{\__kernel_chk_var_scope:NN}
@@ -1806,15 +1806,21 @@
{
\exp_args:Nc \cs_set_protected:Npn { @@_check-declarations_on: }
{
- \cs_set_protected:Npn \__kernel_chk_var_exist:N ##1
+ \cs_set_protected:Npn \__kernel_chk_var_exist:NF ##1 ##2
{
\@@_suspended:T \use_none:nnn
\cs_if_exist:NF ##1
{
\__kernel_msg_error:nnx { kernel } { non-declared-variable }
{ \token_to_str:N ##1 }
+ ##2
}
}
+ \cs_set:Npn \__kernel_chk_var_exist:N ##1
+ {
+ \__kernel_chk_var_exist:NF ##1 { }
+ }
+
\cs_set_protected:Npn \__kernel_chk_cs_exist:N ##1
{
\@@_suspended:T \use_none:nnn
@@ -1892,7 +1898,8 @@
}
\exp_args:Nc \cs_set_protected:Npn { @@_check-declarations_off: }
{
- \cs_set_protected:Npn \__kernel_chk_var_exist:N ##1 { }
+ \cs_set_protected:Npn \__kernel_chk_var_exist:N ##1 { }
+ \cs_set_protected:Npn \__kernel_chk_var_exist:NF ##1##2 { }
\cs_set_protected:Npn \__kernel_chk_cs_exist:N ##1 { }
\cs_set:Npn \__kernel_chk_exp_cs_exist:N ##1 { }
\cs_set:Npn \__kernel_chk_exp_cs_exist:NT ##1##2 { ##2 }
diff --git a/l3kernel/l3box.dtx b/l3kernel/l3box.dtx
index 8d4f6b4..718c8ca 100644
--- a/l3kernel/l3box.dtx
+++ b/l3kernel/l3box.dtx
@@ -1133,12 +1133,12 @@
{
\cs_new_protected:Npn \box_use_drop:N #1
{
- \__kernel_chk_var_exist:N #1
+ \__kernel_chk_var_exist:NF #1 { \use_none:nn }
\tex_box:D #1
}
\cs_new_protected:Npn \box_use:N #1
{
- \__kernel_chk_var_exist:N #1
+ \__kernel_chk_var_exist:NF #1 { \use_none:nn }
\tex_copy:D #1
}
}
diff --git a/l3kernel/testfiles/m3chk001.luatex.tlg b/l3kernel/testfiles/m3chk001.luatex.tlg
index 704e262..6a7456d 100644
--- a/l3kernel/testfiles/m3chk001.luatex.tlg
+++ b/l3kernel/testfiles/m3chk001.luatex.tlg
@@ -35,15 +35,7 @@ TEST 2: Use variables (undefined)
CS
! Undefined control sequence.
<argument> \LaTeX3 error:
- Control sequence \cs_bbb: undefined or invalid.
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> \cs_bbb:
+ Control sequence \cs_bbb: undefined.
l. ... }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
@@ -53,7 +45,7 @@ and I'll forget about whatever was undefined.
============================================================
! Undefined control sequence.
<argument> \LaTeX3 error:
- Control sequence \cs_bbb: undefined or invalid.
+ Control sequence \cs_bbb: undefined.
l. ... }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
@@ -71,14 +63,6 @@ of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> \l_B_tl
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
============================================================
! Undefined control sequence.
<argument> \LaTeX3 error:
@@ -100,14 +84,6 @@ of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> \l_B_str
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
============================================================
! Undefined control sequence.
<argument> \LaTeX3 error:
@@ -121,19 +97,14 @@ and I'll forget about whatever was undefined.
============================================================
INT
! Undefined control sequence.
-<argument> ...elax \SEPARATOR \TYPE {INT}\int_use:N \l_B_int
- \relax \SEPARATOR \int_use...
+<argument> \LaTeX3 error:
+ Variable \l_B_int undefined.
l. ... }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
-! You can't use `\relax' after \the.
-<argument> ...EPARATOR \TYPE {INT}\int_use:N \l_B_int \relax
- \SEPARATOR \int_use:c {l_B...
-l. ... }
-I'm forgetting what you said and using zero instead.
============================================================
! Undefined control sequence.
<argument> \LaTeX3 error:
@@ -147,19 +118,14 @@ and I'll forget about whatever was undefined.
============================================================
DIM
! Undefined control sequence.
-<argument> ...elax \SEPARATOR \TYPE {DIM}\dim_use:N \l_B_dim
- \relax \SEPARATOR \dim_use...
+<argument> \LaTeX3 error:
+ Variable \l_B_dim undefined.
l. ... }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
-! You can't use `\relax' after \the.
-<argument> ...EPARATOR \TYPE {DIM}\dim_use:N \l_B_dim \relax
- \SEPARATOR \dim_use:c {l_B...
-l. ... }
-I'm forgetting what you said and using zero instead.
============================================================
! Undefined control sequence.
<argument> \LaTeX3 error:
@@ -173,19 +139,14 @@ and I'll forget about whatever was undefined.
============================================================
SKIP
! Undefined control sequence.
-<argument> ...x \SEPARATOR \TYPE {SKIP}\skip_use:N \l_B_skip
- \relax \SEPARATOR \skip_us...
+<argument> \LaTeX3 error:
+ Variable \l_B_skip undefined.
l. ... }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
-! You can't use `\relax' after \the.
-<argument> ...RATOR \TYPE {SKIP}\skip_use:N \l_B_skip \relax
- \SEPARATOR \skip_use:c {l_...
-l. ... }
-I'm forgetting what you said and using zero instead.
============================================================
! Undefined control sequence.
<argument> \LaTeX3 error:
@@ -199,19 +160,14 @@ and I'll forget about whatever was undefined.
============================================================
MUSKIP
! Undefined control sequence.
-<argument> ...ARATOR \TYPE {MUSKIP}\muskip_use:N \l_B_muskip
- \relax \SEPARATOR \muskip_...
+<argument> \LaTeX3 error:
+ Variable \l_B_muskip undefined.
l. ... }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
-! You can't use `\relax' after \the.
-<argument> ...\TYPE {MUSKIP}\muskip_use:N \l_B_muskip \relax
- \SEPARATOR \muskip_use:c {...
-l. ... }
-I'm forgetting what you said and using zero instead.
============================================================
! Undefined control sequence.
<argument> \LaTeX3 error:
@@ -234,21 +190,6 @@ Checking is active, and you have tried do so something like:
without first having:
\tl_new:N \l_B_box
LaTeX will create the variable and continue.
-! Undefined control sequence.
-<argument> \l_B_box
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Missing number, treated as zero.
-<to be read again>
-\relax
-l. ... }
-A number should have been here; I inserted `0'.
-(If you can't figure out why I needed to see a number,
-look up `weird error' in the index to The TeXbook.)
============================================================
! LaTeX3 Error: The variable \l_B_box has not been declared on line ....
For immediate help type H <return>.
@@ -260,13 +201,6 @@ Checking is active, and you have tried do so something like:
without first having:
\tl_new:N \l_B_box
LaTeX will create the variable and continue.
-! Missing number, treated as zero.
-<to be read again>
-\l_B_box
-l. ... }
-A number should have been here; I inserted `0'.
-(If you can't figure out why I needed to see a number,
-look up `weird error' in the index to The TeXbook.)
============================================================
BOX
! LaTeX3 Error: The variable \l_B_box has not been declared on line ....
@@ -279,13 +213,6 @@ Checking is active, and you have tried do so something like:
without first having:
\tl_new:N \l_B_box
LaTeX will create the variable and continue.
-! Missing number, treated as zero.
-<to be read again>
-\l_B_box
-l. ... }
-A number should have been here; I inserted `0'.
-(If you can't figure out why I needed to see a number,
-look up `weird error' in the index to The TeXbook.)
============================================================
! LaTeX3 Error: The variable \l_B_box has not been declared on line ....
For immediate help type H <return>.
@@ -297,13 +224,6 @@ Checking is active, and you have tried do so something like:
without first having:
\tl_new:N \l_B_box
LaTeX will create the variable and continue.
-! Missing number, treated as zero.
-<to be read again>
-\l_B_box
-l. ... }
-A number should have been here; I inserted `0'.
-(If you can't figure out why I needed to see a number,
-look up `weird error' in the index to The TeXbook.)
============================================================
SEQ
! Undefined control sequence.
diff --git a/l3kernel/testfiles/m3chk001.tlg b/l3kernel/testfiles/m3chk001.tlg
index 4d85573..bd26aec 100644
--- a/l3kernel/testfiles/m3chk001.tlg
+++ b/l3kernel/testfiles/m3chk001.tlg
@@ -35,15 +35,7 @@ TEST 2: Use variables (undefined)
CS
! Undefined control sequence.
<argument> \LaTeX3 error:
- Control sequence \cs_bbb: undefined or invalid.
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> \cs_bbb:
+ Control sequence \cs_bbb: undefined.
l. ... }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
@@ -53,7 +45,7 @@ and I'll forget about whatever was undefined.
============================================================
! Undefined control sequence.
<argument> \LaTeX3 error:
- Control sequence \cs_bbb: undefined or invalid.
+ Control sequence \cs_bbb: undefined.
l. ... }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
@@ -71,14 +63,6 @@ of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> \l_B_tl
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
============================================================
! Undefined control sequence.
<argument> \LaTeX3 error:
@@ -100,14 +84,6 @@ of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> \l_B_str
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
============================================================
! Undefined control sequence.
<argument> \LaTeX3 error:
@@ -121,19 +97,14 @@ and I'll forget about whatever was undefined.
============================================================
INT
! Undefined control sequence.
-<argument> ...ATOR \TYPE {INT}\int_use:N \l_B_int
- \relax \SEPARATOR \int_use...
+<argument> \LaTeX3 error:
+ Variable \l_B_int undefined.
l. ... }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
-! You can't use `\relax' after \the.
-<argument> ...YPE {INT}\int_use:N \l_B_int \relax
- \SEPARATOR \int_use:c {l_B...
-l. ... }
-I'm forgetting what you said and using zero instead.
============================================================
! Undefined control sequence.
<argument> \LaTeX3 error:
@@ -147,19 +118,14 @@ and I'll forget about whatever was undefined.
============================================================
DIM
! Undefined control sequence.
-<argument> ...ATOR \TYPE {DIM}\dim_use:N \l_B_dim
- \relax \SEPARATOR \dim_use...
+<argument> \LaTeX3 error:
+ Variable \l_B_dim undefined.
l. ... }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
-! You can't use `\relax' after \the.
-<argument> ...YPE {DIM}\dim_use:N \l_B_dim \relax
- \SEPARATOR \dim_use:c {l_B...
-l. ... }
-I'm forgetting what you said and using zero instead.
============================================================
! Undefined control sequence.
<argument> \LaTeX3 error:
@@ -173,19 +139,14 @@ and I'll forget about whatever was undefined.
============================================================
SKIP
! Undefined control sequence.
-<argument> ...R \TYPE {SKIP}\skip_use:N \l_B_skip
- \relax \SEPARATOR \skip_us...
+<argument> \LaTeX3 error:
+ Variable \l_B_skip undefined.
l. ... }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
-! You can't use `\relax' after \the.
-<argument> ... {SKIP}\skip_use:N \l_B_skip \relax
- \SEPARATOR \skip_use:c {l_...
-l. ... }
-I'm forgetting what you said and using zero instead.
============================================================
! Undefined control sequence.
<argument> \LaTeX3 error:
@@ -199,19 +160,14 @@ and I'll forget about whatever was undefined.
============================================================
MUSKIP
! Undefined control sequence.
-<argument> ...E {MUSKIP}\muskip_use:N \l_B_muskip
- \relax \SEPARATOR \muskip_...
+<argument> \LaTeX3 error:
+ Variable \l_B_muskip undefined.
l. ... }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
-! You can't use `\relax' after \the.
-<argument> ...IP}\muskip_use:N \l_B_muskip \relax
- \SEPARATOR \muskip_use:c {...
-l. ... }
-I'm forgetting what you said and using zero instead.
============================================================
! Undefined control sequence.
<argument> \LaTeX3 error:
@@ -234,21 +190,6 @@ Checking is active, and you have tried do so something like:
without first having:
\tl_new:N \l_B_box
LaTeX will create the variable and continue.
-! Undefined control sequence.
-<argument> \l_B_box
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Missing number, treated as zero.
-<to be read again>
- \relax
-l. ... }
-A number should have been here; I inserted `0'.
-(If you can't figure out why I needed to see a number,
-look up `weird error' in the index to The TeXbook.)
============================================================
! LaTeX3 Error: The variable \l_B_box has not been declared on line ....
For immediate help type H <return>.
@@ -260,13 +201,6 @@ Checking is active, and you have tried do so something like:
without first having:
\tl_new:N \l_B_box
LaTeX will create the variable and continue.
-! Missing number, treated as zero.
-<to be read again>
- \l_B_box
-l. ... }
-A number should have been here; I inserted `0'.
-(If you can't figure out why I needed to see a number,
-look up `weird error' in the index to The TeXbook.)
============================================================
BOX
! LaTeX3 Error: The variable \l_B_box has not been declared on line ....
@@ -279,13 +213,6 @@ Checking is active, and you have tried do so something like:
without first having:
\tl_new:N \l_B_box
LaTeX will create the variable and continue.
-! Missing number, treated as zero.
-<to be read again>
- \l_B_box
-l. ... }
-A number should have been here; I inserted `0'.
-(If you can't figure out why I needed to see a number,
-look up `weird error' in the index to The TeXbook.)
============================================================
! LaTeX3 Error: The variable \l_B_box has not been declared on line ....
For immediate help type H <return>.
@@ -297,13 +224,6 @@ Checking is active, and you have tried do so something like:
without first having:
\tl_new:N \l_B_box
LaTeX will create the variable and continue.
-! Missing number, treated as zero.
-<to be read again>
- \l_B_box
-l. ... }
-A number should have been here; I inserted `0'.
-(If you can't figure out why I needed to see a number,
-look up `weird error' in the index to The TeXbook.)
============================================================
SEQ
! Undefined control sequence.
More information about the latex3-commits
mailing list