[latex3-commits] [git/LaTeX3-latex3-latex3] master: Ease turning on all debugging code: with \debug_on:n { all } (24d475d)

Bruno Le Floch bruno at le-floch.fr
Sat May 5 18:09:09 CEST 2018


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/24d475daae0b087ba42775ffb2025d30776ea4ac

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

commit 24d475daae0b087ba42775ffb2025d30776ea4ac
Author: Bruno Le Floch <bruno at le-floch.fr>
Date:   Sat May 5 18:08:22 2018 +0200

    Ease turning on all debugging code: with \debug_on:n { all }


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

24d475daae0b087ba42775ffb2025d30776ea4ac
 l3kernel/expl3.dtx        |    8 ++++----
 l3kernel/l3basics.dtx     |   22 +++++++++++++++++++++-
 l3kernel/l3candidates.dtx |    1 +
 l3kernel/l3file.dtx       |    2 +-
 l3kernel/l3int.dtx        |    5 +++--
 5 files changed, 30 insertions(+), 8 deletions(-)

diff --git a/l3kernel/expl3.dtx b/l3kernel/expl3.dtx
index 9754bbe..0a2f582 100644
--- a/l3kernel/expl3.dtx
+++ b/l3kernel/expl3.dtx
@@ -921,16 +921,16 @@
 % 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.
-% See also \cs{debug_on:n} \texttt{\{check-declarations\}} for finer control.
+% initialised.  See also \cs{debug_on:n} \texttt{\{check-declarations\}}
+% in \pkg{l3candidates} for finer control.
 %
 % \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).
-% See also \cs{debug_on:n} \texttt{\{log-functions\}} for finer control.
+% required by the bootstrap code for \LaTeX3).  See also \cs{debug_on:n}
+% \texttt{\{log-functions\}} in \pkg{l3candidates} for finer control.
 %
 % \DescribeOption{enable-debug}
 % To allow more localized checking and logging than provided by
diff --git a/l3kernel/l3basics.dtx b/l3kernel/l3basics.dtx
index 20fa478..4161cc8 100644
--- a/l3kernel/l3basics.dtx
+++ b/l3kernel/l3basics.dtx
@@ -1592,7 +1592,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\debug_on:n, \debug_off:n}
+% \begin{macro}{\debug_on:n, \debug_off:n, \@@_all_on:, \@@_all_off:}
 %
 %    \begin{macrocode}
 \__kernel_if_debug:TF
@@ -1613,6 +1613,26 @@
               { \__kernel_msg_error:nnn { kernel } { debug } {##1} }
           }
       }
+    \cs_set_protected:Npn \@@_all_on:
+      {
+        \debug_on:n
+          {
+            check-declarations ,
+            check-expressions ,
+            deprecation ,
+            log-functions ,
+          }
+      }
+    \cs_set_protected:Npn \@@_all_off:
+      {
+        \debug_off:n
+          {
+            check-declarations ,
+            check-expressions ,
+            deprecation ,
+            log-functions ,
+          }
+      }
   }
   {
     \cs_set_protected:Npn \debug_on:n #1
diff --git a/l3kernel/l3candidates.dtx b/l3kernel/l3candidates.dtx
index d2958ec..74a7203 100644
--- a/l3kernel/l3candidates.dtx
+++ b/l3kernel/l3candidates.dtx
@@ -101,6 +101,7 @@
 %       skip, and muskip expressions are not terminated prematurely;
 %     \item \texttt{deprecation} that makes soon-to-be-deprecated commands produce errors;
 %     \item \texttt{log-functions} that logs function definitions;
+%     \item \texttt{all} that does all of the above.
 %   \end{itemize}
 %   Providing these as switches rather than options allows testing code
 %   even if it relies on other packages: load all other packages, call
diff --git a/l3kernel/l3file.dtx b/l3kernel/l3file.dtx
index 87a9643..832a524 100644
--- a/l3kernel/l3file.dtx
+++ b/l3kernel/l3file.dtx
@@ -2349,7 +2349,7 @@
 %   Contrarily to most other deprecated commands this is expandable
 %   so we need to put code by hand in two token lists.  We use
 %   \cs{tex_def:D} directly because \cs{g_file_current_name_tl} is made
-%   outer by \cs{debug_deprecation_on:}.
+%   outer by \cs{debug_on:n} \texttt{\{deprecation\}}.
 %    \begin{macrocode}
 \tl_new:N \g_file_current_name_tl
 \tl_gset:Nn \g_file_current_name_tl { \g_file_curr_name_str }
diff --git a/l3kernel/l3int.dtx b/l3kernel/l3int.dtx
index d10c7a4..bfff6b4 100644
--- a/l3kernel/l3int.dtx
+++ b/l3kernel/l3int.dtx
@@ -2605,11 +2605,12 @@
 %   The actual allocation mechanism is in \pkg{l3alloc}; it requires
 %   \cs{c_one} to be defined.  In package mode, reuse \tn{m at ne}.
 %   We also store in two global token lists some code for
-%   \cs{debug_deprecation_on:} and \cs{debug_deprecation_off:}.  For the
+%   \cs{debug_on:n} \texttt{\{deprecation\}} and \cs{debug_off:n}
+%   \texttt{\{deprecation\}}.  For the
 %   latter, we need to locally set \cs{c_minus_one} back to the constant
 %   hence use a private name.  We use \cs{tex_let:D} directly because
 %   \cs{c_minus_one} (as all deprecated commands) is made outer by
-%   \cs{debug_deprecation_on:}.
+%   \cs{debug_on:n} \texttt{\{deprecation\}}.
 %    \begin{macrocode}
 %<package>\cs_gset_eq:NN \c_@@_minus_one \m at ne
 %<initex>\int_const:Nn \c_@@_minus_one { -1 }





More information about the latex3-commits mailing list