[latex3-commits] [l3svn] r7366 - Add \debug_log_functions_on/off: and \debug_check_declarations_on/off:

noreply at latex-project.org noreply at latex-project.org
Sat Jul 15 06:46:19 CEST 2017


Author: bruno
Date: 2017-07-15 06:46:19 +0200 (Sat, 15 Jul 2017)
New Revision: 7366

Modified:
   trunk/l3kernel/expl3.dtx
   trunk/l3kernel/l3basics.dtx
   trunk/l3kernel/l3candidates.dtx
   trunk/l3kernel/l3coffins.dtx
   trunk/l3kernel/l3expan.dtx
   trunk/l3kernel/l3flag.dtx
   trunk/l3kernel/l3keys.dtx
   trunk/l3kernel/l3msg.dtx
   trunk/l3kernel/l3prg.dtx
   trunk/l3kernel/l3tl.dtx
   trunk/l3kernel/testfiles/m3expan001.tlg
   trunk/l3kernel/testfiles/m3expan002.tlg
   trunk/l3kernel/testfiles/m3expl001.luatex.tlg
   trunk/l3kernel/testfiles/m3expl001.ptex.tlg
   trunk/l3kernel/testfiles/m3expl001.tlg
   trunk/l3kernel/testfiles/m3expl001.uptex.tlg
   trunk/l3kernel/testfiles/m3expl001.xetex.tlg
   trunk/l3kernel/testfiles/m3expl003.luatex.tlg
   trunk/l3kernel/testfiles/m3expl003.ptex.tlg
   trunk/l3kernel/testfiles/m3expl003.tlg
   trunk/l3kernel/testfiles/m3expl003.uptex.tlg
   trunk/l3kernel/testfiles/m3expl003.xetex.tlg
Log:
Add \debug_log_functions_on/off: and \debug_check_declarations_on/off:

These functions apply the eponymous options of expl3 locally.  They can
only be used if expl3 is loaded with the new option "enable-debug", or
with "check-declarations" or "log-functions".  This is the only way to
avoid impacting performance for people who do not care about such checking.
The commit also applies \__debug_patch:nnNw in a few more places.


Modified: trunk/l3kernel/expl3.dtx
===================================================================
--- trunk/l3kernel/expl3.dtx	2017-07-15 02:31:42 UTC (rev 7365)
+++ trunk/l3kernel/expl3.dtx	2017-07-15 04:46:19 UTC (rev 7366)
@@ -462,7 +462,7 @@
 %   behaviour}. The \LaTeX3 coding convention is that all variables must
 % be declared before use.
 %
-% The \pkg{expl3} package can be loaded with the |check-declarations|
+% The \pkg{expl3} package can be loaded with the \texttt{check-declarations}
 % option to verify that all variables are declared before use. This has
 % a performance implication and is therefore intended for testing during
 % development and not for use in production documents.
@@ -920,15 +920,24 @@
 % which are constructed using macros as the underlying storage system. The
 % \texttt{check-declarations} option enables checking for all variable
 % assignments, issuing an error if any variables are assigned without being
-% initialised.
+% initialised.  See also the function \cs{debug_check_declarations_on:}.
 %
 % \DescribeOption{log-functions}
 % The \texttt{log-functions} option is used to enable recording of every new
 % function name in the \texttt{.log} file. This is useful for debugging
 % purposes, as it means that there is a complete list of all functions
 % created by each module loaded (with the exceptions of a very small number
-% required by the bootstrap code for \LaTeX3).
+% required by the bootstrap code for \LaTeX3).  See also the function
+% \cs{debug_log_functions_on:}.
 %
+% \DescribeOption{enable-debug}
+% To allow more localized checking and logging than provided by
+% \texttt{check-declarations} and \texttt{log-functions}, \pkg{expl3}
+% provides a few \cs[no-index]{debug_\ldots{}} functions (described
+% elsewhere) that turn on the corresponding checks within a group.
+% These functions can only be used if \pkg{expl3} is loaded with the
+% \texttt{enable-debug} option.
+%
 % \DescribeOption{driver}
 % Selects the driver to be used for color, graphics and related operations that
 % are driver-dependent. Options available are
@@ -1174,31 +1183,34 @@
 % \begin{macro}[aux]{\expl at create@bool at option}
 % \begin{variable}[int]
 %   {
-%     \l at expl@debug at bool ,
 %     \l at expl@check at declarations@bool ,
-%     \l at expl@log at functions@bool
+%     \l at expl@log at functions@bool ,
+%     \l at expl@enable at debug@bool
 %   }
 % \begin{variable}[int]{\l at expl@options at clist}
-%   Options to be set up.
-%   These have to be done by hand as there is no \pkg{expl3} yet: the logging
-%   option is needed before loading \pkg{l3basics}! Only a minimal set of
-%   options are handled here: others are left for a proper key--value approach
-%   once the kernel is loaded.  Both |check-declarations| and
-%   |log-functions| turn on a |debug| boolean that tells later code to
-%   include the needed checking functions.
+%   Options to be set up.  These have to be done by hand as there is no
+%   \pkg{expl3} yet: the logging option is needed before loading
+%   \pkg{l3basics}! Only a minimal set of options are handled here:
+%   others are left for a proper key--value approach once the kernel is
+%   loaded.  After processing the options we set the
+%   \texttt{enable-debug} boolean so that the options
+%   \texttt{check-declarations} and \texttt{log-functions} imply
+%   \texttt{enable-debug}: otherwise the necessary debugging code would
+%   not be set up properly.
 %    \begin{macrocode}
 \newcommand\expl at create@bool at option[2]%
   {%
-    \DeclareOption{#1}{\chardef #2=1 \chardef\l at expl@debug at bool=1 }%
-    \DeclareOption{#1=true}{\chardef #2=1 \chardef\l at expl@debug at bool=1 }%
+    \DeclareOption{#1}{\chardef #2=1 }%
+    \DeclareOption{#1=true}{\chardef #2=1 }%
     \DeclareOption{#1=false}{\chardef #2=0 }%
     \newcommand*#2{}%
     \chardef #2=0 %
   }
 \expl at create@bool at option{check-declarations}\l at expl@check at declarations@bool
 \expl at create@bool at option{log-functions}\l at expl@log at functions@bool
+\expl at create@bool at option{enable-debug}\l at expl@enable at debug@bool
 \let\expl at create@bool at option\@undefined
-\chardef\l at expl@debug at bool=0 %
+\chardef\l at expl@enable at debug@bool=0 %
 \newcommand*\l at expl@options at clist{}
 \DeclareOption*
   {%
@@ -1212,6 +1224,12 @@
     \fi
   }
 \ProcessOptions\relax
+\ifodd\l at expl@check at declarations@bool
+  \chardef\l at expl@enable at debug@bool=1 %
+\fi
+\ifodd\l at expl@log at functions@bool
+  \chardef\l at expl@enable at debug@bool=1 %
+\fi
 %    \end{macrocode}
 % \end{variable}
 % \end{variable}
@@ -1642,17 +1660,17 @@
 %
 % \begin{variable}[int]
 %   {
-%     \l at expl@debug at bool ,
 %     \l at expl@check at declarations@bool ,
-%     \l at expl@log at functions@bool
+%     \l at expl@log at functions@bool ,
+%     \l at expl@enable at debug@bool
 %   }
 %  In generic mode, there is no convenient option handling and so instead
 %  the two variables are defined to do nothing.
 %  Appropriate value before input of the loader.
 %    \begin{macrocode}
-\chardef \l at expl@debug at bool = 0 %
 \chardef \l at expl@check at declarations@bool = 0 %
 \chardef \l at expl@log at functions@bool = 0 %
+\chardef \l at expl@enable at debug@bool = 0 %
 %    \end{macrocode}
 % \end{variable}
 %

Modified: trunk/l3kernel/l3basics.dtx
===================================================================
--- trunk/l3kernel/l3basics.dtx	2017-07-15 02:31:42 UTC (rev 7365)
+++ trunk/l3kernel/l3basics.dtx	2017-07-15 04:46:19 UTC (rev 7366)
@@ -1177,23 +1177,41 @@
 %   \texttt{check-declarations} is active.
 % \end{function}
 %
-% \begin{function}{\__chk_log:x}
+% \begin{function}{\__debug_log:x}
 %   \begin{syntax}
-%     \cs{__chk_log:x} \Arg{message text}
+%     \cs{__debug_log:x} \Arg{message text}
 %   \end{syntax}
-%   If the \texttt{log-functions} option is active, this function writes
-%   the \meta{message text} to the log file using \cs{iow_log:x}.
-%   Otherwise, the \meta{message text} is ignored using \cs{use_none:n}.
+%   Only defined when debugging is enabled (hence only in package mode
+%   with the right options).  If the \texttt{log-functions} option is
+%   active, this function writes the \meta{message text} to the log file
+%   using \cs{iow_log:x}.  Otherwise, the \meta{message text} is ignored
+%   using \cs{use_none:n}.
 % \end{function}
 %
-% \begin{function}{\__chk_suspend_log:, \__chk_resume_log:}
+% \begin{function}{\__debug_suspend_log:, \__debug_resume_log:}
 %   \begin{syntax}
-%     \cs{__chk_suspend_log:} \ldots{} \cs{__chk_log:x} \ldots{} \cs{__chk_resume_log:}
+%     \cs{__debug_suspend_log:} \ldots{} \cs{__debug_log:x} \ldots{} \cs{__debug_resume_log:}
 %   \end{syntax}
-%   Any \cs{__chk_log:x} command between \cs{__chk_suspend_log:} and
-%   \cs{__chk_resume_log:} is suppressed.  These commands can be nested.
+%   Any \cs{__debug_log:x} command between \cs{__debug_suspend_log:} and
+%   \cs{__debug_resume_log:} is suppressed.  These two commands can be
+%   nested and do nothing when debugging is disabled.
 % \end{function}
 %
+% \begin{function}{\__debug_patch:nnNw}
+%   \begin{syntax}
+%     \cs{__debug_patch:nnNw} \Arg{before} \Arg{after} \meta{definition} \ldots{}
+%   \end{syntax}
+%   If debugging is enabled (by one of few \pkg{expl3} options that
+%   imply \texttt{enable-debug}), adds the \meta{before} and
+%   \meta{after} tokens (which can involve |#1| and so on) in the
+%   \meta{definition} that follows.  Otherwise ignore the \meta{before}
+%   and \meta{after} code and perform the \meta{definition} with no
+%   patching.  The \meta{definition} must start with \cs{cs_new:Npn} or
+%   \cs{cs_set:Npn} or \cs{cs_gset:Npn} or \cs{prg_new_conditional:Npnn}
+%   or their protected counterparts.  Other cases could be added as
+%   needed.
+% \end{function}
+%
 % \begin{function}[EXP]{\__cs_count_signature:N, \__cs_count_signature:c}
 %   \begin{syntax}
 %     \cs{__cs_count_signature:N} \meta{function}
@@ -2260,7 +2278,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{Defining and checking (new) functions}
+% \subsection{Checking and patching (new) functions}
 %
 %    We provide two kinds of functions that can be used to define
 %    control sequences. On the one hand we have functions that check
@@ -2268,63 +2286,10 @@
 %    |\..._new|. The second type of defining functions doesn't check
 %    if the argument is already defined.
 %
-%    Before we can define them, we need some auxiliary macros that
-%    allow us to generate error messages. The definitions here are
+%    Before we can define them, we need some auxiliary macros that allow
+%    us to generate error messages. The next few definitions here are
 %    only temporary, they will be redefined later on.
 %
-% \begin{macro}[documented-as=\iow_log:n]{\iow_log:x, \iow_term:x}
-%    We define a routine to write only to the log file. And a
-%    similar one for writing to both the log file and the terminal.
-%    These will be redefined later by \pkg{l3io}.
-%    \begin{macrocode}
-\cs_set_protected:Npn \iow_log:x
-  { \tex_immediate:D \tex_write:D -1 }
-\cs_set_protected:Npn \iow_term:x
-  { \tex_immediate:D \tex_write:D 16 }
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[int]{\__chk_log:x, \__chk_suspend_log:, \__chk_resume_log:}
-%   This function is used to write some information to the \texttt{log}
-%   file in case the |log-function| option is set.  Otherwise its
-%   argument is ignored.  Using this function rather than directly using
-%   \cs{iow_log:x} allows for \cs{__chk_suspend_log:} which disables
-%   such messages until the matching \cs{__chk_resume_log:}.  These two
-%   commands are used to improve the logging for complicated datatypes.
-%   They should come in pairs, which can be nested.  The function
-%   \cs{exp_not:o} is defined in \pkg{l3expan} later on but
-%   \cs{__chk_suspend_log:} and \cs{__chk_resume_log:} are not used
-%   before that point.
-%    \begin{macrocode}
-%<*initex>
-\cs_set_protected:Npn \__chk_log:x { \use_none:n }
-\cs_set_protected:Npn \__chk_suspend_log: { }
-\cs_set_protected:Npn \__chk_resume_log: { }
-%</initex>
-%<*package>
-\tex_ifodd:D \l at expl@log at functions@bool
-  \cs_set_protected:Npn \__chk_log:x { \iow_log:x }
-  \cs_set_protected:Npn \__chk_suspend_log:
-    {
-      \cs_set_protected:Npx \__chk_resume_log:
-        {
-          \cs_set_protected:Npn \__chk_resume_log:
-            { \exp_not:o { \__chk_resume_log: } }
-          \cs_set_protected:Npn \__chk_log:x
-            { \exp_not:o { \__chk_log:x } }
-        }
-      \cs_set_protected:Npn \__chk_log:x { \use_none:n }
-    }
-  \cs_set_protected:Npn \__chk_resume_log: { }
-\else:
-  \cs_set_protected:Npn \__chk_log:x { \use_none:n }
-  \cs_set_protected:Npn \__chk_suspend_log: { }
-  \cs_set_protected:Npn \__chk_resume_log: { }
-\fi:
-%</package>
-%    \end{macrocode}
-% \end{macro}
-%
 % \begin{macro}[int]
 %   {\__msg_kernel_error:nnxx, \__msg_kernel_error:nnx, \__msg_kernel_error:nn}
 %   If an internal error occurs before \LaTeX3 has loaded \pkg{l3msg} then
@@ -2361,47 +2326,136 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}[documented-as=\iow_log:n]{\iow_log:x, \iow_term:x}
+%    We define a routine to write only to the log file. And a
+%    similar one for writing to both the log file and the terminal.
+%    These will be redefined later by \pkg{l3io}.
+%    \begin{macrocode}
+\cs_set_protected:Npn \iow_log:x
+  { \tex_immediate:D \tex_write:D -1 }
+\cs_set_protected:Npn \iow_term:x
+  { \tex_immediate:D \tex_write:D 16 }
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\debug_log_functions_on:, \debug_log_functions_off:}
+% \begin{macro}[int]{\__debug_log:x, \__debug_suspend_log:, \__debug_resume_log:}
+%   When debugging is not enabled at all (including in the format), the
+%   \cs[index=debug_log_functions_on:]{debug_log_functions_on/off:}
+%   functions simply produce errors, while \cs{__debug_suspend_log:} and
+%   \cs{__debug_resume_log:} do nothing.
+%    \begin{macrocode}
+\cs_set_protected:Npn \debug_log_functions_on:
+  {
+    \__msg_kernel_error:nnx { kernel } { enable-debug }
+      { \token_to_str:N \debug_log_functions_on: }
+  }
+\cs_set_protected:Npn \debug_log_functions_off:
+  {
+    \__msg_kernel_error:nnx { kernel } { enable-debug }
+      { \token_to_str:N \debug_log_functions_off: }
+  }
+\cs_set_protected:Npn \__debug_suspend_log: { }
+\cs_set_protected:Npn \__debug_resume_log: { }
+%    \end{macrocode}
+%   Otherwise, they set up \cs{__debug_log:x},
+%   \cs{__debug_suspend_log:}, and \cs{__debug_resume_log:} to have the
+%   following behaviour.  The function \cs{__debug_log:x} is used to
+%   write some information to the \texttt{log} file in case the
+%   \texttt{log-function} option is active and to otherwise ignore its
+%   argument.  Using this function rather than directly using
+%   \cs{iow_log:x} allows for \cs{__debug_suspend_log:} which disables
+%   such messages until the matching \cs{__debug_resume_log:}.  These
+%   two commands are used to improve the logging for datatypes with
+%   multiple parts (currently only coffins).  They should come in pairs,
+%   which can be nested.  The function \cs{exp_not:o} is defined in
+%   \pkg{l3expan} later on but \cs{__debug_suspend_log:} and
+%   \cs{__debug_resume_log:} are not used before that point.  Once
+%   everything is defined, turn logging on or off depending on what
+%   option was given.
+%    \begin{macrocode}
+%<*package>
+\tex_ifodd:D \l at expl@enable at debug@bool
+  \cs_set_protected:Npn \debug_log_functions_on:
+    {
+      \cs_set_protected:Npn \__debug_log:x { \iow_log:x }
+      \cs_set_protected:Npn \__debug_suspend_log:
+        {
+          \cs_set_protected:Npx \__debug_resume_log:
+            {
+              \cs_set_protected:Npn \__debug_resume_log:
+                { \exp_not:o { \__debug_resume_log: } }
+              \cs_set_protected:Npn \__debug_log:x
+                { \exp_not:o { \__debug_log:x } }
+            }
+          \cs_set_protected:Npn \__debug_log:x { \use_none:n }
+        }
+      \cs_set_protected:Npn \__debug_resume_log: { }
+    }
+  \cs_set_protected:Npn \debug_log_functions_off:
+    {
+      \cs_set_protected:Npn \__debug_log:x { \use_none:n }
+      \cs_set_protected:Npn \__debug_suspend_log: { }
+      \cs_set_protected:Npn \__debug_resume_log: { }
+    }
+  \tex_ifodd:D \l at expl@log at functions@bool
+    \debug_log_functions_on:
+  \else:
+    \debug_log_functions_off:
+  \fi:
+\fi:
+%</package>
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
 % \begin{macro}[int]{\__debug_patch:nnNw}
 % \begin{macro}[aux]
 %   {
-%     \__debug_patch_param:w,
+%     \__debug_patch_param:NNnnNnp,
 %     \__debug_patch_new:nnNNnn,
 %     \__debug_patch_new_conditional:nnNNnnn
 %   }
+%   When debugging is not enabled, \cs{__debug_patch:nnNw} throws the
+%   patch away.  Otherwise it can be followed by \cs{cs_new:Npn} or
+%   \cs{prg_new_conditional:Npnn} or their protected counterparts.  In
+%   each case, grab the name of the function to be defined and its
+%   parameters using \cs{__debug_patch_param:w} then insert tokens
+%   before and after the definition.  Of course for a conditional one
+%   should likely not insert anything after the code.
 %    \begin{macrocode}
+\cs_set_protected:Npn \__debug_patch:nnNw #1#2 { }
 %<*package>
-\tex_ifodd:D \l at expl@debug at bool
+\tex_ifodd:D \l at expl@enable at debug@bool
   \cs_set_protected:Npn \__debug_patch:nnNw #1#2#3
     {
-      \if_meaning:w #3 \cs_new_protected:Npn
-        \__debug_patch_param:w \__debug_patch_new:nnNNnn
+      \tex_ifcase:D
+        \if_meaning:w #3 \cs_new_protected:Npn  1~ \fi:
+        \if_meaning:w #3 \cs_new:Npn            1~ \fi:
+        \if_meaning:w #3 \cs_set_protected:Npn  1~ \fi:
+        \if_meaning:w #3 \cs_set:Npn            1~ \fi:
+        \if_meaning:w #3 \cs_gset_protected:Npn 1~ \fi:
+        \if_meaning:w #3 \cs_gset:Npn           1~ \fi:
+        \if_meaning:w #3 \prg_new_protected_conditional:Npnn 2~ \fi:
+        \if_meaning:w #3 \prg_new_conditional:Npnn           2~ \fi:
+        \__msg_kernel_error:nnx { kernel } { debug-unpatchable }
+          { \token_to_str:N #3 }
+      \or:
+        \exp_after:wN \__debug_patch_param:NNnnNnp
+        \exp_after:wN \__debug_patch_new:nnNNnn
+      \else:
+        \exp_after:wN \__debug_patch_param:NNnnNnp
+        \exp_after:wN \__debug_patch_new_conditional:nnNNnnn
       \fi:
-      \if_meaning:w #3 \cs_new:Npn
-        \__debug_patch_param:w \__debug_patch_new:nnNNnn
-      \fi:
-      \if_meaning:w #3 \prg_new_protected_conditional:Npnn
-        \__debug_patch_param:w \__debug_patch_new_conditional:nnNNnnn
-      \fi:
-      \if_meaning:w #3 \prg_new_conditional:Npnn
-        \__debug_patch_param:w \__debug_patch_new_conditional:nnNNnnn
-      \fi:
-      \__msg_kernel_error:nnx { kernel } { debug-unpatchable }
-        { \token_to_str:N #3 }
       \use_none:nn {#1} {#2} #3
     }
-  \cs_set_protected:Npn \__debug_patch_param:w
-      #1#2#3 \use_none:nn #4#5#6#7#8#
-    {
-      #2
-      #1 {#4} {#5} #6 #7 {#8}
-    }
+  \cs_set_protected:Npn \__debug_patch_param:NNnnNnp #1#2#3#4#5#6#7#
+    { #1 {#3} {#4} #5 #6 {#7} }
   \cs_set_protected:Npn \__debug_patch_new:nnNNnn #1#2#3#4#5#6
     { #3 #4 #5 { #1 #6 #2 } }
   \cs_set_protected:Npn \__debug_patch_new_conditional:nnNNnnn
       #1#2#3#4#5#6#7
     { #3 #4 #5 {#6} { #1 #7 #2 } }
-\else:
-  \cs_set_protected:Npn \__debug_patch:nnNw #1#2 { }
 \fi:
 %</package>
 %    \end{macrocode}
@@ -2417,6 +2471,8 @@
 %   issued. We have to make sure we don't put the argument into the
 %   conditional processing since it may be an |\if...| type function!
 %    \begin{macrocode}
+\__debug_patch:nnNw { }
+  { \__debug_log:x { Defining~\token_to_str:N #1~ \msg_line_context: } }
 \cs_set_protected:Npn \__chk_if_free_cs:N #1
   {
     \cs_if_free:NF #1
@@ -2425,46 +2481,53 @@
           { \token_to_str:N #1 } { \token_to_meaning:N #1 }
       }
   }
-%<*package>
-\tex_ifodd:D \l at expl@log at functions@bool
-  \cs_set_protected:Npn \__chk_if_free_cs:N #1
-    {
-      \cs_if_free:NF #1
-        {
-          \__msg_kernel_error:nnxx { kernel } { command-already-defined }
-            { \token_to_str:N #1 } { \token_to_meaning:N #1 }
-        }
-      \__chk_log:x { Defining~\token_to_str:N #1~ \msg_line_context: }
-    }
-\fi:
-%</package>
 \cs_set_protected:Npn \__chk_if_free_cs:c
   { \exp_args:Nc \__chk_if_free_cs:N }
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\debug_check_declarations_on:, \debug_check_declarations_off:}
 % \begin{macro}[int]{\__chk_if_exist_var:N}
-%   Create the checking function for variable definitions when the option
-%   is set.
+%   When debugging is not active these two user functions produce an
+%   error.  Otherwise they set up \cs{__chk_if_exist_var:N}, a function
+%   which when \texttt{check-declarations} is active tests that a given
+%   variable is defined.
 %    \begin{macrocode}
+\cs_set_protected:Npn \debug_check_declarations_on:
+  {
+    \__msg_kernel_error:nnx { kernel } { enable-debug }
+      { \token_to_str:N \debug_check_declarations_on: }
+  }
+\cs_set_protected:Npn \debug_check_declarations_off:
+  {
+    \__msg_kernel_error:nnx { kernel } { enable-debug }
+      { \token_to_str:N \debug_check_declarations_off: }
+  }
 %<*package>
-\tex_ifodd:D \l at expl@check at declarations@bool
-  \cs_set_protected:Npn \__chk_if_exist_var:N #1
+\tex_ifodd:D \l at expl@enable at debug@bool
+  \cs_set_protected:Npn \debug_check_declarations_on:
     {
-      \cs_if_exist:NF #1
+      \cs_set_protected:Npn \__chk_if_exist_var:N ##1
         {
-          \__msg_kernel_error:nnx { check } { non-declared-variable }
-            { \token_to_str:N #1 }
+          \cs_if_exist:NF ##1
+            {
+              \__msg_kernel_error:nnx { check } { non-declared-variable }
+                { \token_to_str:N ##1 }
+            }
         }
     }
-\else:
-  \tex_ifodd:D \l at expl@debug at bool
-    \cs_set_protected:Npn \__chk_if_exist_var:N #1 { }
+  \cs_set_protected:Npn \debug_check_declarations_off:
+    { \cs_set_protected:Npn \__chk_if_exist_var:N ##1 { } }
+  \tex_ifodd:D \l at expl@check at declarations@bool
+    \debug_check_declarations_on:
+  \else:
+    \debug_check_declarations_off:
   \fi:
 \fi:
 %</package>
 %    \end{macrocode}
 % \end{macro}
+% \end{macro}
 %
 % \begin{macro}[int]{\__chk_if_exist_cs:N, \__chk_if_exist_cs:c}
 %    This function issues an error message when the control sequence
@@ -2483,7 +2546,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{More new definitions}
+% \subsection{Defining new functions}
 %
 % \begin{macro}
 %   {

Modified: trunk/l3kernel/l3candidates.dtx
===================================================================
--- trunk/l3kernel/l3candidates.dtx	2017-07-15 02:31:42 UTC (rev 7365)
+++ trunk/l3kernel/l3candidates.dtx	2017-07-15 04:46:19 UTC (rev 7366)
@@ -84,6 +84,33 @@
 %
 % \section{Additions to \pkg{l3basics}}
 %
+% \begin{function}[added = 2017-07-14]
+%   {\debug_check_declarations_on:, \debug_check_declarations_off:}
+%   \begin{syntax}
+%     \cs{debug_check_declarations_on:}
+%     \cs{debug_check_declarations_off:}
+%   \end{syntax}
+%   Turn on and off within a group the code that checks that all
+%   \pkg{expl3} variables used were previously declared, as done
+%   globally by the \texttt{check-declarations} option.  This can only
+%   be used if \pkg{expl3} is loaded with one of the options
+%   \texttt{check-declarations}, \texttt{log-functions}, or
+%   \texttt{enable-debug}.
+% \end{function}
+%
+% \begin{function}[added = 2017-07-14]
+%   {\debug_log_functions_on:, \debug_log_functions_off:}
+%   \begin{syntax}
+%     \cs{debug_log_functions_on:}
+%     \cs{debug_log_functions_off:}
+%   \end{syntax}
+%   Turn on and off within a group the code that logs function
+%   definitions, as done globally by the \texttt{log-functions} option.
+%   This can only be used if \pkg{expl3} is loaded with one of the
+%   options \texttt{check-declarations}, \texttt{log-functions}, or
+%   \texttt{enable-debug}.
+% \end{function}
+%
 % \begin{function}[added = 2017-07-04]{\mode_leave_vertical:}
 %   \begin{syntax}
 %     \cs{mode_leave_vertical:}

Modified: trunk/l3kernel/l3coffins.dtx
===================================================================
--- trunk/l3kernel/l3coffins.dtx	2017-07-15 02:31:42 UTC (rev 7365)
+++ trunk/l3kernel/l3coffins.dtx	2017-07-15 04:46:19 UTC (rev 7366)
@@ -512,14 +512,14 @@
 \cs_new_protected:Npn \coffin_new:N #1
   {
     \box_new:N #1
-    \__chk_suspend_log:
+    \__debug_suspend_log:
     \prop_clear_new:c { l_@@_corners_ \__int_value:w #1 _prop }
     \prop_clear_new:c { l_@@_poles_   \__int_value:w #1 _prop }
     \prop_gset_eq:cN { l_@@_corners_ \__int_value:w #1 _prop }
       \c_@@_corners_prop
     \prop_gset_eq:cN { l_@@_poles_ \__int_value:w #1 _prop }
       \c_@@_poles_prop
-    \__chk_resume_log:
+    \__debug_resume_log:
   }
 \cs_generate_variant:Nn \coffin_new:N { c }
 %    \end{macrocode}

Modified: trunk/l3kernel/l3expan.dtx
===================================================================
--- trunk/l3kernel/l3expan.dtx	2017-07-15 02:31:42 UTC (rev 7365)
+++ trunk/l3kernel/l3expan.dtx	2017-07-15 04:46:19 UTC (rev 7366)
@@ -1610,7 +1610,7 @@
 %       signature} \cs{q_mark} \meta{errors} \cs{q_stop} \meta{base
 %       function} \meta{new function}.  If all went well, \meta{errors}
 %     is empty; otherwise, it is a kernel error message, followed by
-%     some clean-up code (\cs{use_none:nnnn}).
+%     some clean-up code (\cs{use_none:nnn}).
 %
 %     Note the space after |#3| and after the following brace group.
 %     Those are ignored by \TeX{} when fetching the last argument for
@@ -1735,7 +1735,7 @@
         \q_mark
         \__msg_kernel_error:nnxx { kernel } { variant-too-long }
           {#5} { \token_to_str:N #3 }
-        \use_none:nnnn
+        \use_none:nnn
         \q_stop
         #3
         #3
@@ -1750,7 +1750,7 @@
         \q_mark
         \__msg_kernel_error:nnxxxx { kernel } { invalid-variant }
           {#7} { \token_to_str:N #5 } {#1} {#2}
-        \use_none:nnnn
+        \use_none:nnn
         \q_stop
         #5
         #5
@@ -1781,30 +1781,36 @@
 % \end{macro}
 %
 % \begin{macro}[aux]{\@@_generate_variant:wwNN}
-%   If the variant form has already been defined, log its existence.
+%   If the variant form has already been defined, log its existence
+%   (provided \texttt{log-functions} is active).
 %   Otherwise, make sure that the |\exp_args:N #3| form is defined, and
 %   if it contains |x|, change \cs{@@_tmp:w} locally to
 %   \cs{cs_new_protected:Npx}.  Then define the variant by
 %   combining the |\exp_args:N #3| variant and the base function.
 %    \begin{macrocode}
+\__debug_patch:nnNw
+  {
+    \cs_if_free:NF #4
+      {
+        \__debug_log:x
+          {
+            Variant~\token_to_str:N #4~%
+            already~defined;~ not~ changing~ it~ \msg_line_context:
+          }
+      }
+  }
+  { }
 \cs_new_protected:Npn \@@_generate_variant:wwNN
     #1 \q_mark #2 \q_stop #3#4
   {
     #2
-    \cs_if_free:NTF #4
+    \cs_if_free:NT #4
       {
         \group_begin:
           \@@_generate_internal_variant:n {#1}
           \@@_tmp:w #4 { \exp_not:c { exp_args:N #1 } \exp_not:N #3 }
         \group_end:
       }
-      {
-        \__chk_log:x
-          {
-            Variant~\token_to_str:N #4~%
-            already~defined;~ not~ changing~ it~ \msg_line_context:
-          }
-      }
   }
 %    \end{macrocode}
 % \end{macro}

Modified: trunk/l3kernel/l3flag.dtx
===================================================================
--- trunk/l3kernel/l3flag.dtx	2017-07-15 02:31:42 UTC (rev 7365)
+++ trunk/l3kernel/l3flag.dtx	2017-07-15 04:46:19 UTC (rev 7366)
@@ -193,7 +193,7 @@
 %   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 |check-declarations| is used, check for the
+%   When the option \texttt{check-declarations} is used, check for the
 %   function defined by \cs{flag_new:n}.
 %    \begin{macrocode}
 \__debug_patch:nnNw
@@ -246,8 +246,8 @@
 %   to be patched since some are defined in terms of others.
 %    \begin{macrocode}
 %<*package>
-\tex_ifodd:D \l at expl@debug at bool
-  \cs_set:Npn \@@_chk_exist:n #1
+\tex_ifodd:D \l at expl@enable at debug@bool
+  \cs_new:Npn \@@_chk_exist:n #1
     {
       \flag_if_exist:nF {#1}
         {

Modified: trunk/l3kernel/l3keys.dtx
===================================================================
--- trunk/l3kernel/l3keys.dtx	2017-07-15 02:31:42 UTC (rev 7365)
+++ trunk/l3kernel/l3keys.dtx	2017-07-15 04:46:19 UTC (rev 7366)
@@ -1511,15 +1511,17 @@
 %
 % \begin{macro}[int]
 %   {\@@_cmd_set:nn, \@@_cmd_set:nx, \@@_cmd_set:Vn, \@@_cmd_set:Vo}
-%   Setting the code for a key first checks that the basic data structures
-%   exist, then saves the code.
+%   Setting the code for a key first logs if appropriate that we are
+%   defining a new key, then saves the code.
 %    \begin{macrocode}
-\cs_new_protected:Npn \@@_cmd_set:nn #1#2
+\__debug_patch:nnNw
   {
     \cs_if_exist:cF { \c_@@_code_root_tl #1 }
-      { \__chk_log:x { Defining~key~#1~\msg_line_context: } }
-    \cs_set_protected:cpn { \c_@@_code_root_tl #1 } ##1 {#2}
+      { \__debug_log:x { Defining~key~#1~\msg_line_context: } }
   }
+  { }
+\cs_new_protected:Npn \@@_cmd_set:nn #1#2
+  { \cs_set_protected:cpn { \c_@@_code_root_tl #1 } ##1 {#2} }
 \cs_generate_variant:Nn \@@_cmd_set:nn { nx , Vn , Vo }
 %    \end{macrocode}
 % \end{macro}

Modified: trunk/l3kernel/l3msg.dtx
===================================================================
--- trunk/l3kernel/l3msg.dtx	2017-07-15 02:31:42 UTC (rev 7365)
+++ trunk/l3kernel/l3msg.dtx	2017-07-15 04:46:19 UTC (rev 7366)
@@ -831,11 +831,10 @@
 %
 % \begin{macro}[aux]{\__chk_if_free_msg:nn}
 %   This auxiliary is similar to \cs{__chk_if_free_cs:N}, and is used when
-%   defining messages with \cs{msg_new:nnnn}. It could be inlined in
-%   \cs{msg_new:nnnn}, but the experimental \pkg{l3trace} module needs
-%   to disable this check when reloading a package with the extra
-%   tracing information.
+%   defining messages with \cs{msg_new:nnnn}.
 %    \begin{macrocode}
+\__debug_patch:nnNw { }
+  { \__debug_log:x { Defining~message~ #1 / #2 ~\msg_line_context: } }
 \cs_new_protected:Npn \__chk_if_free_msg:nn #1#2
   {
     \msg_if_exist:nnT {#1} {#2}
@@ -844,19 +843,6 @@
           {#1} {#2}
       }
   }
-%<*package>
-\if_bool:N \l at expl@log at functions@bool
-  \cs_gset_protected:Npn \__chk_if_free_msg:nn #1#2
-    {
-      \msg_if_exist:nnT {#1} {#2}
-        {
-          \@@_kernel_error:nnxx { kernel } { message-already-defined }
-            {#1} {#2}
-        }
-      \__chk_log:x { Defining~message~ #1 / #2 ~\msg_line_context: }
-    }
-\fi:
-%</package>
 %    \end{macrocode}
 % \end{macro}
 %
@@ -1863,13 +1849,6 @@
     LaTeX~has~been~asked~to~use~a~control~sequence~'#1':\\
     this~has~not~been~defined~yet.
   }
-%<*package>
-\bool_if:NT \l at expl@debug at bool
-  {
-    \@@_kernel_new:nnn { kernel } { debug-unpatchable }
-      { Only~some~definitions~can~be~patched;~'#3'~cannot. }
-  }
-%</package>
 \@@_kernel_new:nnn { kernel } { deprecated-command }
   {
     The~deprecated~command~'#2'~has~been~or~will~be~removed~on~#1.
@@ -1933,21 +1912,6 @@
     LaTeX~has~been~asked~to~define~the~conditional~form~'#1'~of~
     the~function~'#2',~but~only~'TF',~'T',~'F',~and~'p'~forms~exist.
   }
-%<*package>
-\bool_if:NT \l at expl@check at declarations@bool
-  {
-    \@@_kernel_new:nnnn { check } { non-declared-variable }
-      { The~variable~#1~has~not~been~declared~\msg_line_context:. }
-      {
-        Checking~is~active,~and~you~have~tried~do~so~something~like: \\
-        \ \ \tl_set:Nn ~ #1 ~ \{ ~ ... ~ \} \\
-        without~first~having: \\
-        \ \ \tl_new:N ~ #1  \\
-        \\
-        LaTeX~will~create~the~variable~and~continue.
-      }
-  }
-%</package>
 \@@_kernel_new:nnnn { kernel } { scanmark-already-defined }
   { Scan~mark~#1~already~defined. }
   {
@@ -1980,6 +1944,52 @@
   }
 %    \end{macrocode}
 %
+% Some errors are only needed in package mode if debugging is enabled by
+% one of the options \texttt{enable-debug}, \texttt{check-declarations},
+% \texttt{log-functions}, or on the contrary if debugging is turned off.
+% In format mode the error is somewhat different.
+%    \begin{macrocode}
+%<*package>
+\bool_if:NTF \l at expl@enable at debug@bool
+  {
+    \@@_kernel_new:nnn { kernel } { debug-unpatchable }
+      { Only~some~definitions~can~be~patched;~'#3'~cannot. }
+    \@@_kernel_new:nnnn { check } { non-declared-variable }
+      { The~variable~#1~has~not~been~declared~\msg_line_context:. }
+      {
+        Checking~is~active,~and~you~have~tried~do~so~something~like: \\
+        \ \ \tl_set:Nn ~ #1 ~ \{ ~ ... ~ \} \\
+        without~first~having: \\
+        \ \ \tl_new:N ~ #1  \\
+        \\
+        LaTeX~will~create~the~variable~and~continue.
+      }
+  }
+  {
+    \@@_kernel_new:nnnn { kernel } { enable-debug }
+      { To~use~'#1'~load~expl3~with~the~'enable-debug'~option. }
+      {
+        The~function~'#1'~will~be~ignored~because~it~can~only~work~if~
+        some~internal~functions~in~expl3~have~been~appropriately~
+        defined.~This~only~happens~if~one~of~the~options~
+        'enable-debug',~'check-declarations'~or~'log-functions'~was~
+        given~when~loading~expl3.
+      }
+  }
+%</package>
+%<*initex>
+\@@_kernel_new:nnnn { kernel } { enable-debug }
+  { '#1'~cannot~be~used~in~format~mode. }
+  {
+    The~function~'#1'~will~be~ignored~because~it~can~only~work~if~
+    some~internal~functions~in~expl3~have~been~appropriately~
+    defined.~This~only~happens~in~package~mode~(and~only~if~one~of~
+    the~options~'enable-debug',~'check-declarations'~or~'log-functions'~
+    was~given~when~loading~expl3.
+  }
+%</initex>
+%    \end{macrocode}
+%
 % Some errors only appear in expandable settings,
 % hence don't need a \enquote{more-text} argument.
 %    \begin{macrocode}

Modified: trunk/l3kernel/l3prg.dtx
===================================================================
--- trunk/l3kernel/l3prg.dtx	2017-07-15 02:31:42 UTC (rev 7365)
+++ trunk/l3kernel/l3prg.dtx	2017-07-15 04:46:19 UTC (rev 7366)
@@ -804,7 +804,7 @@
 %   }
 % \UnitTested
 %   Setting is already pretty easy.
-%   When |check-declarations| is active, the definitions are patched to
+%   When \texttt{check-declarations} is active, the definitions are patched to
 %   make sure the boolean exists.  This is needed because booleans are
 %   not based on token lists nor on \TeX{} registers.
 %    \begin{macrocode}

Modified: trunk/l3kernel/l3tl.dtx
===================================================================
--- trunk/l3kernel/l3tl.dtx	2017-07-15 02:31:42 UTC (rev 7365)
+++ trunk/l3kernel/l3tl.dtx	2017-07-15 04:46:19 UTC (rev 7366)
@@ -1157,7 +1157,7 @@
 %   For setting token list variables equal to each other.  When checking
 %   is turned on, make sure both variables exist.
 %    \begin{macrocode}
-\tex_ifodd:D \l at expl@debug at bool
+\tex_ifodd:D \l at expl@enable at debug@bool
   \cs_new_protected:Npn \tl_set_eq:NN #1#2
     {
       \__chk_if_exist_var:N #1

Modified: trunk/l3kernel/testfiles/m3expan001.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expan001.tlg	2017-07-15 02:31:42 UTC (rev 7365)
+++ trunk/l3kernel/testfiles/m3expan001.tlg	2017-07-15 04:46:19 UTC (rev 7366)
@@ -86,6 +86,7 @@
 | with a signature starting with 'ooo', but that is longer than the signature
 | (part after the colon) of '\undefined:nn'.
 |...............................................
+Variant \undefined:on already defined; not changing it on line ...
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 !
 ! LaTeX error: "kernel/invalid-variant"

Modified: trunk/l3kernel/testfiles/m3expan002.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expan002.tlg	2017-07-15 02:31:42 UTC (rev 7365)
+++ trunk/l3kernel/testfiles/m3expan002.tlg	2017-07-15 04:46:19 UTC (rev 7366)
@@ -12,6 +12,7 @@
 Defining \foo:onoNc on line ...
 Defining \exp_args:Nnonc on line ...
 Defining \foo:noncN on line ...
+Variant \foo:nnnNN already defined; not changing it on line ...
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 !
 ! LaTeX error: "kernel/variant-too-long"
@@ -45,6 +46,7 @@
 Defining \exp_args:NnNx on line ...
 Defining \foo:oNxTF on line ...
 Defining \foo:ocnTF on line ...
+Variant \foo:oNnTF already defined; not changing it on line ...
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 !
 ! LaTeX error: "kernel/invalid-variant"
@@ -63,6 +65,7 @@
 | signature starting with 'xNn', but cannot change an argument from type 'o'
 | to type 'x'.
 |...............................................
+Variant \foo:oNnTF already defined; not changing it on line ...
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 !
 ! LaTeX error: "kernel/invalid-variant"
@@ -81,6 +84,7 @@
 | signature starting with 'n', but cannot change an argument from type 'o' to
 | type 'n'.
 |...............................................
+Variant \foo:oNnTF already defined; not changing it on line ...
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 !
 ! LaTeX error: "kernel/variant-too-long"
@@ -122,6 +126,7 @@
 Defining \foo_bar:wF on line ...
 undefined
 \long macro:#1;->\prg_return_true: \exp_end: {}
+Variant \cs_new:Npn already defined; not changing it on line ...
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 !
 ! LaTeX error: "kernel/invalid-variant"

Modified: trunk/l3kernel/testfiles/m3expl001.luatex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.luatex.tlg	2017-07-15 02:31:42 UTC (rev 7365)
+++ trunk/l3kernel/testfiles/m3expl001.luatex.tlg	2017-07-15 04:46:19 UTC (rev 7366)
@@ -1683,6 +1683,7 @@
 Defining \flag_clear_new:n on line ...
 Defining \flag_show:n on line ...
 Defining \flag_log:n on line ...
+Defining \__flag_chk_exist:n on line ...
 Defining \flag_if_exist_p:n on line ...
 Defining \flag_if_exist:nT on line ...
 Defining \flag_if_exist:nF on line ...
@@ -2791,7 +2792,6 @@
 Defining message LaTeX/kernel/char-space on line ...
 Defining message LaTeX/kernel/command-already-defined on line ...
 Defining message LaTeX/kernel/command-not-defined on line ...
-Defining message LaTeX/kernel/debug-unpatchable on line ...
 Defining message LaTeX/kernel/deprecated-command on line ...
 Defining message LaTeX/kernel/empty-search-pattern on line ...
 Defining message LaTeX/kernel/out-of-registers on line ...
@@ -2805,6 +2805,8 @@
 Defining message LaTeX/kernel/variable-not-defined on line ...
 Defining message LaTeX/kernel/variant-too-long on line ...
 Defining message LaTeX/kernel/invalid-variant on line ...
+Defining message LaTeX/kernel/debug-unpatchable on line ...
+Defining message LaTeX/check/non-declared-variable on line ...
 Defining message LaTeX/kernel/bad-variable on line ...
 Defining message LaTeX/kernel/misused-sequence on line ...
 Defining message LaTeX/kernel/misused-prop on line ...

Modified: trunk/l3kernel/testfiles/m3expl001.ptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.ptex.tlg	2017-07-15 02:31:42 UTC (rev 7365)
+++ trunk/l3kernel/testfiles/m3expl001.ptex.tlg	2017-07-15 04:46:19 UTC (rev 7366)
@@ -1415,6 +1415,7 @@
 Defining \flag_clear_new:n on line ...
 Defining \flag_show:n on line ...
 Defining \flag_log:n on line ...
+Defining \__flag_chk_exist:n on line ...
 Defining \flag_if_exist_p:n on line ...
 Defining \flag_if_exist:nT on line ...
 Defining \flag_if_exist:nF on line ...
@@ -2779,7 +2780,6 @@
 Defining message LaTeX/kernel/char-space on line ...
 Defining message LaTeX/kernel/command-already-defined on line ...
 Defining message LaTeX/kernel/command-not-defined on line ...
-Defining message LaTeX/kernel/debug-unpatchable on line ...
 Defining message LaTeX/kernel/deprecated-command on line ...
 Defining message LaTeX/kernel/empty-search-pattern on line ...
 Defining message LaTeX/kernel/out-of-registers on line ...
@@ -2793,6 +2793,8 @@
 Defining message LaTeX/kernel/variable-not-defined on line ...
 Defining message LaTeX/kernel/variant-too-long on line ...
 Defining message LaTeX/kernel/invalid-variant on line ...
+Defining message LaTeX/kernel/debug-unpatchable on line ...
+Defining message LaTeX/check/non-declared-variable on line ...
 Defining message LaTeX/kernel/bad-variable on line ...
 Defining message LaTeX/kernel/misused-sequence on line ...
 Defining message LaTeX/kernel/misused-prop on line ...

Modified: trunk/l3kernel/testfiles/m3expl001.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.tlg	2017-07-15 02:31:42 UTC (rev 7365)
+++ trunk/l3kernel/testfiles/m3expl001.tlg	2017-07-15 04:46:19 UTC (rev 7366)
@@ -1415,6 +1415,7 @@
 Defining \flag_clear_new:n on line ...
 Defining \flag_show:n on line ...
 Defining \flag_log:n on line ...
+Defining \__flag_chk_exist:n on line ...
 Defining \flag_if_exist_p:n on line ...
 Defining \flag_if_exist:nT on line ...
 Defining \flag_if_exist:nF on line ...
@@ -2779,7 +2780,6 @@
 Defining message LaTeX/kernel/char-space on line ...
 Defining message LaTeX/kernel/command-already-defined on line ...
 Defining message LaTeX/kernel/command-not-defined on line ...
-Defining message LaTeX/kernel/debug-unpatchable on line ...
 Defining message LaTeX/kernel/deprecated-command on line ...
 Defining message LaTeX/kernel/empty-search-pattern on line ...
 Defining message LaTeX/kernel/out-of-registers on line ...
@@ -2793,6 +2793,8 @@
 Defining message LaTeX/kernel/variable-not-defined on line ...
 Defining message LaTeX/kernel/variant-too-long on line ...
 Defining message LaTeX/kernel/invalid-variant on line ...
+Defining message LaTeX/kernel/debug-unpatchable on line ...
+Defining message LaTeX/check/non-declared-variable on line ...
 Defining message LaTeX/kernel/bad-variable on line ...
 Defining message LaTeX/kernel/misused-sequence on line ...
 Defining message LaTeX/kernel/misused-prop on line ...

Modified: trunk/l3kernel/testfiles/m3expl001.uptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.uptex.tlg	2017-07-15 02:31:42 UTC (rev 7365)
+++ trunk/l3kernel/testfiles/m3expl001.uptex.tlg	2017-07-15 04:46:19 UTC (rev 7366)
@@ -1415,6 +1415,7 @@
 Defining \flag_clear_new:n on line ...
 Defining \flag_show:n on line ...
 Defining \flag_log:n on line ...
+Defining \__flag_chk_exist:n on line ...
 Defining \flag_if_exist_p:n on line ...
 Defining \flag_if_exist:nT on line ...
 Defining \flag_if_exist:nF on line ...
@@ -2779,7 +2780,6 @@
 Defining message LaTeX/kernel/char-space on line ...
 Defining message LaTeX/kernel/command-already-defined on line ...
 Defining message LaTeX/kernel/command-not-defined on line ...
-Defining message LaTeX/kernel/debug-unpatchable on line ...
 Defining message LaTeX/kernel/deprecated-command on line ...
 Defining message LaTeX/kernel/empty-search-pattern on line ...
 Defining message LaTeX/kernel/out-of-registers on line ...
@@ -2793,6 +2793,8 @@
 Defining message LaTeX/kernel/variable-not-defined on line ...
 Defining message LaTeX/kernel/variant-too-long on line ...
 Defining message LaTeX/kernel/invalid-variant on line ...
+Defining message LaTeX/kernel/debug-unpatchable on line ...
+Defining message LaTeX/check/non-declared-variable on line ...
 Defining message LaTeX/kernel/bad-variable on line ...
 Defining message LaTeX/kernel/misused-sequence on line ...
 Defining message LaTeX/kernel/misused-prop on line ...

Modified: trunk/l3kernel/testfiles/m3expl001.xetex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.xetex.tlg	2017-07-15 02:31:42 UTC (rev 7365)
+++ trunk/l3kernel/testfiles/m3expl001.xetex.tlg	2017-07-15 04:46:19 UTC (rev 7366)
@@ -1681,6 +1681,7 @@
 Defining \flag_clear_new:n on line ...
 Defining \flag_show:n on line ...
 Defining \flag_log:n on line ...
+Defining \__flag_chk_exist:n on line ...
 Defining \flag_if_exist_p:n on line ...
 Defining \flag_if_exist:nT on line ...
 Defining \flag_if_exist:nF on line ...
@@ -2789,7 +2790,6 @@
 Defining message LaTeX/kernel/char-space on line ...
 Defining message LaTeX/kernel/command-already-defined on line ...
 Defining message LaTeX/kernel/command-not-defined on line ...
-Defining message LaTeX/kernel/debug-unpatchable on line ...
 Defining message LaTeX/kernel/deprecated-command on line ...
 Defining message LaTeX/kernel/empty-search-pattern on line ...
 Defining message LaTeX/kernel/out-of-registers on line ...
@@ -2803,6 +2803,8 @@
 Defining message LaTeX/kernel/variable-not-defined on line ...
 Defining message LaTeX/kernel/variant-too-long on line ...
 Defining message LaTeX/kernel/invalid-variant on line ...
+Defining message LaTeX/kernel/debug-unpatchable on line ...
+Defining message LaTeX/check/non-declared-variable on line ...
 Defining message LaTeX/kernel/bad-variable on line ...
 Defining message LaTeX/kernel/misused-sequence on line ...
 Defining message LaTeX/kernel/misused-prop on line ...

Modified: trunk/l3kernel/testfiles/m3expl003.luatex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.luatex.tlg	2017-07-15 02:31:42 UTC (rev 7365)
+++ trunk/l3kernel/testfiles/m3expl003.luatex.tlg	2017-07-15 04:46:19 UTC (rev 7366)
@@ -1683,6 +1683,7 @@
 Defining \flag_clear_new:n on line ...
 Defining \flag_show:n on line ...
 Defining \flag_log:n on line ...
+Defining \__flag_chk_exist:n on line ...
 Defining \flag_if_exist_p:n on line ...
 Defining \flag_if_exist:nT on line ...
 Defining \flag_if_exist:nF on line ...
@@ -2791,7 +2792,6 @@
 Defining message LaTeX/kernel/char-space on line ...
 Defining message LaTeX/kernel/command-already-defined on line ...
 Defining message LaTeX/kernel/command-not-defined on line ...
-Defining message LaTeX/kernel/debug-unpatchable on line ...
 Defining message LaTeX/kernel/deprecated-command on line ...
 Defining message LaTeX/kernel/empty-search-pattern on line ...
 Defining message LaTeX/kernel/out-of-registers on line ...
@@ -2801,11 +2801,12 @@
 Defining message LaTeX/kernel/out-of-bounds on line ...
 Defining message LaTeX/kernel/protected-predicate on line ...
 Defining message LaTeX/kernel/conditional-form-unknown on line ...
-Defining message LaTeX/check/non-declared-variable on line ...
 Defining message LaTeX/kernel/scanmark-already-defined on line ...
 Defining message LaTeX/kernel/variable-not-defined on line ...
 Defining message LaTeX/kernel/variant-too-long on line ...
 Defining message LaTeX/kernel/invalid-variant on line ...
+Defining message LaTeX/kernel/debug-unpatchable on line ...
+Defining message LaTeX/check/non-declared-variable on line ...
 Defining message LaTeX/kernel/bad-variable on line ...
 Defining message LaTeX/kernel/misused-sequence on line ...
 Defining message LaTeX/kernel/misused-prop on line ...

Modified: trunk/l3kernel/testfiles/m3expl003.ptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.ptex.tlg	2017-07-15 02:31:42 UTC (rev 7365)
+++ trunk/l3kernel/testfiles/m3expl003.ptex.tlg	2017-07-15 04:46:19 UTC (rev 7366)
@@ -1415,6 +1415,7 @@
 Defining \flag_clear_new:n on line ...
 Defining \flag_show:n on line ...
 Defining \flag_log:n on line ...
+Defining \__flag_chk_exist:n on line ...
 Defining \flag_if_exist_p:n on line ...
 Defining \flag_if_exist:nT on line ...
 Defining \flag_if_exist:nF on line ...
@@ -2779,7 +2780,6 @@
 Defining message LaTeX/kernel/char-space on line ...
 Defining message LaTeX/kernel/command-already-defined on line ...
 Defining message LaTeX/kernel/command-not-defined on line ...
-Defining message LaTeX/kernel/debug-unpatchable on line ...
 Defining message LaTeX/kernel/deprecated-command on line ...
 Defining message LaTeX/kernel/empty-search-pattern on line ...
 Defining message LaTeX/kernel/out-of-registers on line ...
@@ -2789,11 +2789,12 @@
 Defining message LaTeX/kernel/out-of-bounds on line ...
 Defining message LaTeX/kernel/protected-predicate on line ...
 Defining message LaTeX/kernel/conditional-form-unknown on line ...
-Defining message LaTeX/check/non-declared-variable on line ...
 Defining message LaTeX/kernel/scanmark-already-defined on line ...
 Defining message LaTeX/kernel/variable-not-defined on line ...
 Defining message LaTeX/kernel/variant-too-long on line ...
 Defining message LaTeX/kernel/invalid-variant on line ...
+Defining message LaTeX/kernel/debug-unpatchable on line ...
+Defining message LaTeX/check/non-declared-variable on line ...
 Defining message LaTeX/kernel/bad-variable on line ...
 Defining message LaTeX/kernel/misused-sequence on line ...
 Defining message LaTeX/kernel/misused-prop on line ...

Modified: trunk/l3kernel/testfiles/m3expl003.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.tlg	2017-07-15 02:31:42 UTC (rev 7365)
+++ trunk/l3kernel/testfiles/m3expl003.tlg	2017-07-15 04:46:19 UTC (rev 7366)
@@ -1415,6 +1415,7 @@
 Defining \flag_clear_new:n on line ...
 Defining \flag_show:n on line ...
 Defining \flag_log:n on line ...
+Defining \__flag_chk_exist:n on line ...
 Defining \flag_if_exist_p:n on line ...
 Defining \flag_if_exist:nT on line ...
 Defining \flag_if_exist:nF on line ...
@@ -2779,7 +2780,6 @@
 Defining message LaTeX/kernel/char-space on line ...
 Defining message LaTeX/kernel/command-already-defined on line ...
 Defining message LaTeX/kernel/command-not-defined on line ...
-Defining message LaTeX/kernel/debug-unpatchable on line ...
 Defining message LaTeX/kernel/deprecated-command on line ...
 Defining message LaTeX/kernel/empty-search-pattern on line ...
 Defining message LaTeX/kernel/out-of-registers on line ...
@@ -2789,11 +2789,12 @@
 Defining message LaTeX/kernel/out-of-bounds on line ...
 Defining message LaTeX/kernel/protected-predicate on line ...
 Defining message LaTeX/kernel/conditional-form-unknown on line ...
-Defining message LaTeX/check/non-declared-variable on line ...
 Defining message LaTeX/kernel/scanmark-already-defined on line ...
 Defining message LaTeX/kernel/variable-not-defined on line ...
 Defining message LaTeX/kernel/variant-too-long on line ...
 Defining message LaTeX/kernel/invalid-variant on line ...
+Defining message LaTeX/kernel/debug-unpatchable on line ...
+Defining message LaTeX/check/non-declared-variable on line ...
 Defining message LaTeX/kernel/bad-variable on line ...
 Defining message LaTeX/kernel/misused-sequence on line ...
 Defining message LaTeX/kernel/misused-prop on line ...

Modified: trunk/l3kernel/testfiles/m3expl003.uptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.uptex.tlg	2017-07-15 02:31:42 UTC (rev 7365)
+++ trunk/l3kernel/testfiles/m3expl003.uptex.tlg	2017-07-15 04:46:19 UTC (rev 7366)
@@ -1415,6 +1415,7 @@
 Defining \flag_clear_new:n on line ...
 Defining \flag_show:n on line ...
 Defining \flag_log:n on line ...
+Defining \__flag_chk_exist:n on line ...
 Defining \flag_if_exist_p:n on line ...
 Defining \flag_if_exist:nT on line ...
 Defining \flag_if_exist:nF on line ...
@@ -2779,7 +2780,6 @@
 Defining message LaTeX/kernel/char-space on line ...
 Defining message LaTeX/kernel/command-already-defined on line ...
 Defining message LaTeX/kernel/command-not-defined on line ...
-Defining message LaTeX/kernel/debug-unpatchable on line ...
 Defining message LaTeX/kernel/deprecated-command on line ...
 Defining message LaTeX/kernel/empty-search-pattern on line ...
 Defining message LaTeX/kernel/out-of-registers on line ...
@@ -2789,11 +2789,12 @@
 Defining message LaTeX/kernel/out-of-bounds on line ...
 Defining message LaTeX/kernel/protected-predicate on line ...
 Defining message LaTeX/kernel/conditional-form-unknown on line ...
-Defining message LaTeX/check/non-declared-variable on line ...
 Defining message LaTeX/kernel/scanmark-already-defined on line ...
 Defining message LaTeX/kernel/variable-not-defined on line ...
 Defining message LaTeX/kernel/variant-too-long on line ...
 Defining message LaTeX/kernel/invalid-variant on line ...
+Defining message LaTeX/kernel/debug-unpatchable on line ...
+Defining message LaTeX/check/non-declared-variable on line ...
 Defining message LaTeX/kernel/bad-variable on line ...
 Defining message LaTeX/kernel/misused-sequence on line ...
 Defining message LaTeX/kernel/misused-prop on line ...

Modified: trunk/l3kernel/testfiles/m3expl003.xetex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.xetex.tlg	2017-07-15 02:31:42 UTC (rev 7365)
+++ trunk/l3kernel/testfiles/m3expl003.xetex.tlg	2017-07-15 04:46:19 UTC (rev 7366)
@@ -1681,6 +1681,7 @@
 Defining \flag_clear_new:n on line ...
 Defining \flag_show:n on line ...
 Defining \flag_log:n on line ...
+Defining \__flag_chk_exist:n on line ...
 Defining \flag_if_exist_p:n on line ...
 Defining \flag_if_exist:nT on line ...
 Defining \flag_if_exist:nF on line ...
@@ -2789,7 +2790,6 @@
 Defining message LaTeX/kernel/char-space on line ...
 Defining message LaTeX/kernel/command-already-defined on line ...
 Defining message LaTeX/kernel/command-not-defined on line ...
-Defining message LaTeX/kernel/debug-unpatchable on line ...
 Defining message LaTeX/kernel/deprecated-command on line ...
 Defining message LaTeX/kernel/empty-search-pattern on line ...
 Defining message LaTeX/kernel/out-of-registers on line ...
@@ -2799,11 +2799,12 @@
 Defining message LaTeX/kernel/out-of-bounds on line ...
 Defining message LaTeX/kernel/protected-predicate on line ...
 Defining message LaTeX/kernel/conditional-form-unknown on line ...
-Defining message LaTeX/check/non-declared-variable on line ...
 Defining message LaTeX/kernel/scanmark-already-defined on line ...
 Defining message LaTeX/kernel/variable-not-defined on line ...
 Defining message LaTeX/kernel/variant-too-long on line ...
 Defining message LaTeX/kernel/invalid-variant on line ...
+Defining message LaTeX/kernel/debug-unpatchable on line ...
+Defining message LaTeX/check/non-declared-variable on line ...
 Defining message LaTeX/kernel/bad-variable on line ...
 Defining message LaTeX/kernel/misused-sequence on line ...
 Defining message LaTeX/kernel/misused-prop on line ...



More information about the latex3-commits mailing list