[latex3-commits] [latex3/latex3] flag-N-type: Reimplementat n-type flags in terms of N-type flags (22e0399a4)

github at latex-project.org github at latex-project.org
Fri Jan 12 15:04:45 CET 2024


Repository : https://github.com/latex3/latex3
On branch  : flag-N-type
Link       : https://github.com/latex3/latex3/commit/22e0399a4e83912cb24a6c183eaa889e6d91218a

>---------------------------------------------------------------

commit 22e0399a4e83912cb24a6c183eaa889e6d91218a
Author: Bruno Le Floch <blflatex at gmail.com>
Date:   Fri Jan 12 15:04:45 2024 +0100

    Reimplementat n-type flags in terms of N-type flags
    
    This is necessary in order to switch other packages over to the new
    N-type flags, so for instance the public fp_overflow is equivalent to
    \l_fp_overflow_flag.


>---------------------------------------------------------------

22e0399a4e83912cb24a6c183eaa889e6d91218a
 l3kernel/l3debug.dtx             |  47 ++++++----
 l3kernel/l3flag.dtx              | 150 ++++++-------------------------
 l3kernel/testfiles/m3flag001.lvt |  10 +--
 l3kernel/testfiles/m3flag001.tlg |  64 ++++++++------
 l3kernel/testfiles/m3flag002.tlg | 184 +++++++++++++++++----------------------
 5 files changed, 180 insertions(+), 275 deletions(-)

diff --git a/l3kernel/l3debug.dtx b/l3kernel/l3debug.dtx
index 67be77707..194db616a 100644
--- a/l3kernel/l3debug.dtx
+++ b/l3kernel/l3debug.dtx
@@ -99,13 +99,16 @@
 %   different.
 % \end{function}
 %
-% \begin{function}[EXP]{\__kernel_chk_flag_exist:n}
+% \begin{function}[EXP]{\__kernel_chk_flag_exist:NN}
 %   \begin{syntax}
-%     \cs{__kernel_chk_flag_exist:n} \Arg{flag}
+%     \cs{__kernel_chk_flag_exist:NN}
+%     \meta{function} \meta{flag}
 %   \end{syntax}
 %   This function is only created if debugging is enabled.  It checks
 %   that the \meta{flag} is defined according to the criterion for
-%   \cs{flag_if_exist_p:n}, and if not raises a kernel-level error.
+%   \cs{flag_if_exist_p:N}, and if not raises a kernel-level error and
+%   calls the function with the argument \cs{l_tmpa_flag} to proceed
+%   somehow without producing too many errors.
 % \end{function}
 %
 % \begin{function}{\__kernel_debug_log:e}
@@ -241,7 +244,7 @@
 %     \__kernel_chk_cs_exist:N,
 %     \__kernel_chk_cs_exist:c
 %   }
-% \begin{macro}[EXP]{\__kernel_chk_flag_exist:n}
+% \begin{macro}[EXP]{\__kernel_chk_flag_exist:NN}
 % \begin{macro}{\__kernel_chk_var_local:N, \__kernel_chk_var_global:N}
 % \begin{macro}{\__kernel_chk_var_scope:NN}
 %   When debugging is enabled these two functions set up functions that
@@ -258,7 +261,7 @@
 \cs_new_protected:Npn \__kernel_chk_var_exist:N #1 { }
 \cs_new_protected:Npn \__kernel_chk_cs_exist:N #1 { }
 \cs_generate_variant:Nn \__kernel_chk_cs_exist:N { c }
-\cs_new:Npn \__kernel_chk_flag_exist:n #1 { }
+\cs_new:Npn \__kernel_chk_flag_exist:NN { }
 \cs_new_protected:Npn \__kernel_chk_var_local:N #1 { }
 \cs_new_protected:Npn \__kernel_chk_var_global:N #1 { }
 \cs_new_protected:Npn \__kernel_chk_var_scope:NN #1#2 { }
@@ -282,13 +285,14 @@
               { \token_to_str:N ##1 }
           }
       }
-    \cs_set:Npn \__kernel_chk_flag_exist:n ##1
+    \cs_set:Npn \__kernel_chk_flag_exist:NN ##1##2
       {
-        \@@_suspended:T \use_none:nnn
-        \flag_if_exist:nF {##1}
+        \@@_suspended:T \use_iii:nnnn
+        \flag_if_exist:NTF ##2
+          { ##1 ##2 }
           {
-            \msg_expandable_error:nnn
-              { kernel } { bad-variable } { flag~##1~ }
+            \msg_expandable_error:nnn { kernel } { bad-variable } {##2}
+            ##1 \l_tmpa_flag
           }
       }
     \cs_set_protected:Npn \__kernel_chk_var_scope:NN
@@ -313,7 +317,7 @@
   {
     \cs_set_protected:Npn \__kernel_chk_var_exist:N ##1 { }
     \cs_set_protected:Npn \__kernel_chk_cs_exist:N ##1 { }
-    \cs_set:Npn \__kernel_chk_flag_exist:N ##1 { }
+    \cs_set:Npn \__kernel_chk_flag_exist:NN { }
     \cs_set_protected:Npn \__kernel_chk_var_local:N ##1 { }
     \cs_set_protected:Npn \__kernel_chk_var_global:N ##1 { }
     \cs_set_protected:Npn \__kernel_chk_var_scope:NN ##1##2 { }
@@ -957,16 +961,17 @@
 % Flag functions.
 %    \begin{macrocode}
   \__kernel_patch:nnn
-    { \__kernel_chk_flag_exist:n {#1} }
+    { \__kernel_chk_flag_exist:NN }
     { }
     {
-      \flag_if_raised:nT
-      \flag_if_raised:nF
-      \flag_if_raised:nTF
-      \flag_if_raised_p:n
-      \flag_height:n
-      \flag_ensure_raised:n
-      \flag_clear:n
+      \flag_clear:N
+      \flag_ensure_raised:N
+      \flag_height:N
+      \flag_if_raised:NT
+      \flag_if_raised:NF
+      \flag_if_raised:NTF
+      \flag_if_raised_p:N
+      \flag_raise:N
     }
 %    \end{macrocode}
 %
@@ -980,6 +985,10 @@
     { \__kernel_chk_var_scope:NN g #1 }
     { }
     { \cctab_new:N }
+  \__kernel_patch:nnn
+    { \__kernel_chk_var_scope:NN l #1 }
+    { }
+    { \flag_new:N }
   \__kernel_patch:nnn
     { \__kernel_chk_var_scope:NN g #1 }
     { }
diff --git a/l3kernel/l3flag.dtx b/l3kernel/l3flag.dtx
index 5946e0596..2cb58a357 100644
--- a/l3kernel/l3flag.dtx
+++ b/l3kernel/l3flag.dtx
@@ -79,7 +79,11 @@
 % \meta{flag name} such as \texttt{fp_overflow}, used as part of
 % \cs{use:c} constructions.  All of the commands described below have
 % \texttt{n}-type analogues that can still appear in old code, but the
-% \texttt{N}-type commands are to be preferred moving forward.
+% \texttt{N}-type commands are to be preferred moving forward.  The
+% \texttt{n}-type \meta{flag name} is simply mapped to
+% \cs[no-index]{l_\meta{flag name}_flag}, which makes it easier for
+% packages using public flags (such as \pkg{l3fp}) to retain backwards
+% compatibility.
 %
 % \section{Setting up flags}
 %
@@ -338,73 +342,43 @@
 %
 % \subsection{Old \texttt{n}-type flag commands}
 %
-% Here we keep the old flag commands unchanged since our policy is to no
-% longer delete depecrated functions.
+% Here we keep the old flag commands since our policy is to no longer
+% delete deprecated functions.  The idea is to simply map \meta{flag
+% name} to \cs[no-index]{l_\meta{flag name}_flag}.  When the debugging
+% code is activated, it checks existence of the \texttt{N}-type flag
+% variables that result.
 %
-% The height $h$ of a flag (initially zero) is stored by setting control
-% sequences of the form \cs[no-index]{flag \meta{name} \meta{integer}}
-% to \tn{relax} for $0\leq\meta{integer}<h$.  When a flag is raised, a
-% \enquote{trap} function \cs[no-index]{flag \meta{name}} is called.
-% The existence of this function is also used to test for the existence
-% of a flag.
-%
-% \begin{macro}{\flag_new:n}
-%   For each flag, we define a \enquote{trap} function, which by default
-%   simply increases the flag by $1$ by letting the appropriate control
-%   sequence to \tn{relax}.  This can be done expandably!
+% \begin{macro}{\flag_new:n, \flag_clear:n, \flag_clear_new:n}
+% \begin{macro}[EXP, pTF]{\flag_if_exist:n, \flag_if_raised:n}
+% \begin{macro}[EXP]{\flag_height:n, \flag_raise:n, \flag_ensure_raised:n}
 %   \begin{macrocode}
-\cs_new_protected:Npn \flag_new:n #1
-  {
-    \cs_new:cpn { flag~#1 } ##1 ;
-      { \exp_after:wN \use_none:n \cs:w flag~#1~##1 \cs_end: }
-  }
+\cs_new_protected:Npn \flag_new:n #1 { \flag_new:c { l_#1_flag } }
+\cs_new_protected:Npn \flag_clear:n #1 { \flag_clear:c { l_#1_flag } }
+\cs_new_protected:Npn \flag_clear_new:n #1 { \flag_clear_new:c { l_#1_flag } }
+\cs_new:Npn \flag_if_exist_p:n #1 { \flag_if_exist_p:c { l_#1_flag } }
+\cs_new:Npn \flag_if_exist:nT #1 { \flag_if_exist:cT { l_#1_flag } }
+\cs_new:Npn \flag_if_exist:nF #1 { \flag_if_exist:cF { l_#1_flag } }
+\cs_new:Npn \flag_if_exist:nTF #1 { \flag_if_exist:cTF { l_#1_flag } }
+\cs_new:Npn \flag_if_raised_p:n #1 { \flag_if_raised_p:c { l_#1_flag } }
+\cs_new:Npn \flag_if_raised:nT #1 { \flag_if_raised:cT { l_#1_flag } }
+\cs_new:Npn \flag_if_raised:nF #1 { \flag_if_raised:cF { l_#1_flag } }
+\cs_new:Npn \flag_if_raised:nTF #1 { \flag_if_raised:cTF { l_#1_flag } }
+\cs_new:Npn \flag_height:n #1 { \flag_height:c { l_#1_flag } }
+\cs_new:Npn \flag_raise:n #1 { \flag_raise:c { l_#1_flag } }
+\cs_new:Npn \flag_ensure_raised:n #1 { \flag_ensure_raised:c { l_#1_flag } }
 %    \end{macrocode}
 % \end{macro}
-%
-% \begin{macro}{\flag_clear:n}
-% \begin{macro}{\@@_clear:wn}
-%   Undefine control sequences, starting from the |0| flag, upwards,
-%   until reaching an undefined control sequence.  We don't use
-%   \cs{cs_undefine:c} because that would act globally.
-%   When the option \texttt{check-declarations} is used, check for the
-%   function defined by \cs{flag_new:n}.
-%    \begin{macrocode}
-\cs_new_protected:Npn \flag_clear:n #1 { \@@_clear:wn 0 ; {#1} }
-\cs_new_protected:Npn \@@_clear:wn #1 ; #2
-  {
-    \if_cs_exist:w flag~#2~#1 \cs_end:
-      \exp_after:wN \use:n
-    \else:
-      \exp_after:wN \use_none:n
-    \fi:
-    {
-      \cs_set_eq:cN { flag~#2~#1 } \tex_undefined:D
-      \exp_after:wN \@@_clear:wn
-      \int_value:w \int_eval:w 1 + #1 ; {#2}
-    }
-  }
-%    \end{macrocode}
 % \end{macro}
 % \end{macro}
 %
-% \begin{macro}{\flag_clear_new:n}
-%   As for other datatypes, clear the \meta{flag} or create a new one,
-%   as appropriate.
-%    \begin{macrocode}
-\cs_new_protected:Npn \flag_clear_new:n #1
-  { \flag_if_exist:nTF {#1} { \flag_clear:n } { \flag_new:n } {#1} }
-%    \end{macrocode}
-% \end{macro}
-%
 % \begin{macro}{\flag_show:n, \flag_log:n, \@@_show:Nn}
-%   Show the height (terminal or log file) using appropriate \pkg{l3msg}
-%   auxiliaries.
+%   To avoid changing the output here we mostly keep the old code.
 %    \begin{macrocode}
 \cs_new_protected:Npn \flag_show:n { \@@_show:Nn \tl_show:n }
 \cs_new_protected:Npn \flag_log:n { \@@_show:Nn \tl_log:n }
 \cs_new_protected:Npn \@@_show:Nn #1#2
   {
-    \exp_args:Nc \__kernel_chk_defined:NT { flag~#2 }
+    \exp_args:Nc \__kernel_chk_defined:NT { l_#2_flag }
       {
         \exp_args:Ne #1
           { \tl_to_str:n { flag~#2~height } = \flag_height:n {#2} }
@@ -413,72 +387,6 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}[EXP, pTF]{\flag_if_exist:n}
-%   A flag exist if the corresponding trap \cs[no-index]{flag \meta{flag
-%   name}:n} is defined.
-%    \begin{macrocode}
-\prg_new_conditional:Npnn \flag_if_exist:n #1 { p , T , F , TF }
-  {
-    \cs_if_exist:cTF { flag~#1 }
-      { \prg_return_true: } { \prg_return_false: }
-  }
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[EXP, pTF]{\flag_if_raised:n}
-%   Test if the flag has a non-zero height, by checking the |0| control sequence.
-%    \begin{macrocode}
-\prg_new_conditional:Npnn \flag_if_raised:n #1 { p , T , F , TF }
-  {
-    \if_cs_exist:w flag~#1~0 \cs_end:
-      \prg_return_true:
-    \else:
-      \prg_return_false:
-    \fi:
-  }
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[EXP]{\flag_height:n}
-% \begin{macro}[EXP]{\@@_height_loop:wn, \@@_height_end:wn}
-%   Extract the value of the flag by going through all of the
-%   control sequences starting from |0|.
-%    \begin{macrocode}
-\cs_new:Npn \flag_height:n #1 { \@@_height_loop:wn 0; {#1} }
-\cs_new:Npn \@@_height_loop:wn #1 ; #2
-  {
-    \if_cs_exist:w flag~#2~#1 \cs_end:
-      \exp_after:wN \@@_height_loop:wn \int_value:w \int_eval:w 1 +
-    \else:
-      \exp_after:wN \@@_height_end:wn
-    \fi:
-    #1 ; {#2}
-  }
-\cs_new:Npn \@@_height_end:wn #1 ; #2 {#1}
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[EXP]{\flag_raise:n}
-%   Simply apply the trap to the height, after expanding the latter.
-%    \begin{macrocode}
-\cs_new:Npn \flag_raise:n #1
-  {
-    \cs:w flag~#1 \exp_after:wN \cs_end:
-    \int_value:w \flag_height:n {#1} ;
-  }
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[EXP]{\flag_ensure_raised:n}
-%   It is simplest to just call the \enquote{trap} function in all
-%   cases.
-%    \begin{macrocode}
-\cs_new:Npn \flag_ensure_raised:n #1
-  { \cs:w flag~#1 \cs_end: 0 ; }
-%    \end{macrocode}
-% \end{macro}
-%
 %    \begin{macrocode}
 %</package>
 %    \end{macrocode}
diff --git a/l3kernel/testfiles/m3flag001.lvt b/l3kernel/testfiles/m3flag001.lvt
index 8f4b95287..02da473dc 100644
--- a/l3kernel/testfiles/m3flag001.lvt
+++ b/l3kernel/testfiles/m3flag001.lvt
@@ -25,10 +25,10 @@
     {
       \flag_if_exist:nT {A} { \ERROR }
       \flag_new:n {A}
-      \TYPE { \cs_meaning:c { flag~A } }
+      \TYPE { \cs_meaning:N \l_A_flag }
     }
     \flag_if_exist:nF {A} { \ERROR }
-    \TYPE { \cs_meaning:c { flag~A } }
+    \TYPE { \cs_meaning:N \l_A_flag }
     \flag_new:n {A}
     \flag_new:n {B}
   }
@@ -40,9 +40,9 @@
   {
     \flag_if_raised:nTF { C } { T } { F } ~
     \flag_height:n { C } ~
-    \cs_meaning:c { flag~C~0 } ~
-    \cs_meaning:c { flag~C~1 } ~
-    \cs_meaning:c { flag~C~2 } ~ \NEWLINE
+    \cs_meaning:c { l_C_flag 0 } ~
+    \cs_meaning:c { l_C_flag 1 } ~
+    \cs_meaning:c { l_C_flag 2 } ~ \NEWLINE
   }
 \TIMO
 
diff --git a/l3kernel/testfiles/m3flag001.tlg b/l3kernel/testfiles/m3flag001.tlg
index 6a9d91af8..9f9cfbf62 100644
--- a/l3kernel/testfiles/m3flag001.tlg
+++ b/l3kernel/testfiles/m3flag001.tlg
@@ -4,20 +4,20 @@ Author: Bruno Le Floch
 ============================================================
 TEST 1: flag_new
 ============================================================
-Defining \flag A on line ...
-\long macro:#1;->\exp_after:wN \use_none:n \cs:w flag A #1\cs_end: 
-\long macro:#1;->\exp_after:wN \use_none:n \cs:w flag A #1\cs_end: 
-! LaTeX Error: Control sequence \flag A already defined.
+Defining \l_A_flag on line ...
+\protected\long macro:->l_A_flag
+\protected\long macro:->l_A_flag
+! LaTeX Error: Control sequence \l_A_flag already defined.
 For immediate help type H <return>.
  ...                                              
 l. ...  }
 This is a coding error.
-LaTeX has been asked to create a new control sequence '\flag A' but this name
-has already been used elsewhere.
+LaTeX has been asked to create a new control sequence '\l_A_flag' but this
+name has already been used elsewhere.
 The current meaning is:
-  \long macro:#1;->\exp_after:wN \use_none:n \cs:w flag A #1\cs_end: 
-Defining \flag A on line ...
-Defining \flag B on line ...
+  \protected\long macro:->l_A_flag
+Defining \l_A_flag on line ...
+Defining \l_B_flag on line ...
 ============================================================
 ============================================================
 TEST 2: raise, test, height
@@ -43,20 +43,30 @@ TEST 4: show, log
 <recently read> }
 l. ...  }
 > flag C height=3.
-! LaTeX Error: Variable \flag other undefined.
+! LaTeX Error: Variable \l_other_flag undefined.
 For immediate help type H <return>.
  ...                                              
 l. ...  }
 This is a coding error.
-LaTeX has been asked to show a variable \flag other, but this has not been
+LaTeX has been asked to show a variable \l_other_flag, but this has not been
 defined yet.
 ============================================================
 ============================================================
 TEST 5: undefined
 ============================================================
+! LaTeX Error: The variable \l_other_flag has not been declared on line ...
+For immediate help type H <return>.
+ ...                                              
+l. ...  }
+This is a coding error.
+Checking is active, and you have tried do so something like:
+  \tl_set:Nn \l_other_flag { ... }
+without first having:
+  \tl_new:N \l_other_flag
+LaTeX will create the variable and continue.
 ! Use of \??? doesn't match its definition.
 <argument> \???  
-                 ! LaTeX Error: Erroneous variable flag other used!
+                 ! LaTeX Error: Erroneous variable \l_other_flag used!
 l. ...  }
 If you say, e.g., `\def\a1{...}', then you must always
 put `1' after `\a', since control sequence names are
@@ -64,7 +74,7 @@ made up of letters only. The macro here has not been
 followed by the required stuff, so I'm ignoring it.
 ! Use of \??? doesn't match its definition.
 <argument> \???  
-                 ! LaTeX Error: Erroneous variable flag other used!
+                 ! LaTeX Error: Erroneous variable \l_other_flag used!
 l. ...  }
 If you say, e.g., `\def\a1{...}', then you must always
 put `1' after `\a', since control sequence names are
@@ -72,65 +82,65 @@ made up of letters only. The macro here has not been
 followed by the required stuff, so I'm ignoring it.
 ! Use of \??? doesn't match its definition.
 <argument> \???  
-                 ! LaTeX Error: Erroneous variable flag other used!
+                 ! LaTeX Error: Erroneous variable \l_other_flag used!
 l. ...  }
 If you say, e.g., `\def\a1{...}', then you must always
 put `1' after `\a', since control sequence names are
 made up of letters only. The macro here has not been
 followed by the required stuff, so I'm ignoring it.
-|\flag other 0;|
+||
 ! Use of \??? doesn't match its definition.
 <argument> \???  
-                 ! LaTeX Error: Erroneous variable flag other used!
+                 ! LaTeX Error: Erroneous variable \l_other_flag used!
 l. ...  }
 If you say, e.g., `\def\a1{...}', then you must always
 put `1' after `\a', since control sequence names are
 made up of letters only. The macro here has not been
 followed by the required stuff, so I'm ignoring it.
-|\flag other 0;|
+||
 ! Use of \??? doesn't match its definition.
 <argument> \???  
-                 ! LaTeX Error: Erroneous variable flag other used!
+                 ! LaTeX Error: Erroneous variable \l_other_flag used!
 l. ...  }
 If you say, e.g., `\def\a1{...}', then you must always
 put `1' after `\a', since control sequence names are
 made up of letters only. The macro here has not been
 followed by the required stuff, so I'm ignoring it.
-|0|
+|1|
 ! Use of \??? doesn't match its definition.
 <argument> \???  
-                 ! LaTeX Error: Erroneous variable flag other used!
+                 ! LaTeX Error: Erroneous variable \l_other_flag used!
 l. ...  }
 If you say, e.g., `\def\a1{...}', then you must always
 put `1' after `\a', since control sequence names are
 made up of letters only. The macro here has not been
 followed by the required stuff, so I'm ignoring it.
-|F|
+|T|
 ! Use of \??? doesn't match its definition.
 <argument> \???  
-                 ! LaTeX Error: Erroneous variable flag other used!
+                 ! LaTeX Error: Erroneous variable \l_other_flag used!
 l. ...  }
 If you say, e.g., `\def\a1{...}', then you must always
 put `1' after `\a', since control sequence names are
 made up of letters only. The macro here has not been
 followed by the required stuff, so I'm ignoring it.
-||
+|T|
 ! Use of \??? doesn't match its definition.
 <argument> \???  
-                 ! LaTeX Error: Erroneous variable flag other used!
+                 ! LaTeX Error: Erroneous variable \l_other_flag used!
 l. ...  }
 If you say, e.g., `\def\a1{...}', then you must always
 put `1' after `\a', since control sequence names are
 made up of letters only. The macro here has not been
 followed by the required stuff, so I'm ignoring it.
-|F|
+||
 ! Use of \??? doesn't match its definition.
 <argument> \???  
-                 ! LaTeX Error: Erroneous variable flag other used!
+                 ! LaTeX Error: Erroneous variable \l_other_flag used!
 l. ...  }
 If you say, e.g., `\def\a1{...}', then you must always
 put `1' after `\a', since control sequence names are
 made up of letters only. The macro here has not been
 followed by the required stuff, so I'm ignoring it.
-|F|
+|T|
 ============================================================
diff --git a/l3kernel/testfiles/m3flag002.tlg b/l3kernel/testfiles/m3flag002.tlg
index 7b61eeb42..fe368e782 100644
--- a/l3kernel/testfiles/m3flag002.tlg
+++ b/l3kernel/testfiles/m3flag002.tlg
@@ -54,116 +54,94 @@ defined yet.
 ============================================================
 TEST 5: undefined
 ============================================================
-! Undefined control sequence.
-<argument> \l_other_flag 
-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> \l_other_flag 
-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> \l_other_flag 
-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> \l_other_flag 
-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> \l_other_flag 
-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> \l_other_flag 
+! LaTeX Error: The variable \l_other_flag has not been declared on line ...
+For immediate help type H <return>.
+ ...                                              
 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.
+This is a coding error.
+Checking is active, and you have tried do so something like:
+  \tl_set:Nn \l_other_flag { ... }
+without first having:
+  \tl_new:N \l_other_flag
+LaTeX will create the variable and continue.
+! Use of \??? doesn't match its definition.
+<argument> \???  
+                 ! LaTeX Error: Erroneous variable \l_other_flag used!
+l. ...  }
+If you say, e.g., `\def\a1{...}', then you must always
+put `1' after `\a', since control sequence names are
+made up of letters only. The macro here has not been
+followed by the required stuff, so I'm ignoring it.
+! Use of \??? doesn't match its definition.
+<argument> \???  
+                 ! LaTeX Error: Erroneous variable \l_other_flag used!
+l. ...  }
+If you say, e.g., `\def\a1{...}', then you must always
+put `1' after `\a', since control sequence names are
+made up of letters only. The macro here has not been
+followed by the required stuff, so I'm ignoring it.
+! Use of \??? doesn't match its definition.
+<argument> \???  
+                 ! LaTeX Error: Erroneous variable \l_other_flag used!
+l. ...  }
+If you say, e.g., `\def\a1{...}', then you must always
+put `1' after `\a', since control sequence names are
+made up of letters only. The macro here has not been
+followed by the required stuff, so I'm ignoring it.
 ||
-! Undefined control sequence.
-<argument> \l_other_flag 
-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.
+! Use of \??? doesn't match its definition.
+<argument> \???  
+                 ! LaTeX Error: Erroneous variable \l_other_flag used!
+l. ...  }
+If you say, e.g., `\def\a1{...}', then you must always
+put `1' after `\a', since control sequence names are
+made up of letters only. The macro here has not been
+followed by the required stuff, so I'm ignoring it.
 ||
-! Undefined control sequence.
-<argument> \l_other_flag 
-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> \l_other_flag 
-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.
+! Use of \??? doesn't match its definition.
+<argument> \???  
+                 ! LaTeX Error: Erroneous variable \l_other_flag used!
+l. ...  }
+If you say, e.g., `\def\a1{...}', then you must always
+put `1' after `\a', since control sequence names are
+made up of letters only. The macro here has not been
+followed by the required stuff, so I'm ignoring it.
 |1|
-! Undefined control sequence.
-<argument> \l_other_flag 
-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.
+! Use of \??? doesn't match its definition.
+<argument> \???  
+                 ! LaTeX Error: Erroneous variable \l_other_flag used!
+l. ...  }
+If you say, e.g., `\def\a1{...}', then you must always
+put `1' after `\a', since control sequence names are
+made up of letters only. The macro here has not been
+followed by the required stuff, so I'm ignoring it.
 |T|
-! Undefined control sequence.
-<argument> \l_other_flag 
-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.
+! Use of \??? doesn't match its definition.
+<argument> \???  
+                 ! LaTeX Error: Erroneous variable \l_other_flag used!
+l. ...  }
+If you say, e.g., `\def\a1{...}', then you must always
+put `1' after `\a', since control sequence names are
+made up of letters only. The macro here has not been
+followed by the required stuff, so I'm ignoring it.
 |T|
-! Undefined control sequence.
-<argument> \l_other_flag 
-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.
+! Use of \??? doesn't match its definition.
+<argument> \???  
+                 ! LaTeX Error: Erroneous variable \l_other_flag used!
+l. ...  }
+If you say, e.g., `\def\a1{...}', then you must always
+put `1' after `\a', since control sequence names are
+made up of letters only. The macro here has not been
+followed by the required stuff, so I'm ignoring it.
 ||
-! Undefined control sequence.
-<argument> \l_other_flag 
-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.
+! Use of \??? doesn't match its definition.
+<argument> \???  
+                 ! LaTeX Error: Erroneous variable \l_other_flag used!
+l. ...  }
+If you say, e.g., `\def\a1{...}', then you must always
+put `1' after `\a', since control sequence names are
+made up of letters only. The macro here has not been
+followed by the required stuff, so I'm ignoring it.
 |T|
 ============================================================
 ============================================================





More information about the latex3-commits mailing list.