summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-05-25 20:48:22 +0000
committerKarl Berry <karl@freefriends.org>2021-05-25 20:48:22 +0000
commit1764edc3b60a2c9fb210ca74b758f3e8e8a53692 (patch)
treeda1842e54bdea33c2b8d434860131cfa08c9444d /Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
parent4bf5956529386575d89874638bfd567040b9475c (diff)
l3kernel (25may21)
git-svn-id: svn://tug.org/texlive/trunk@59345 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3basics.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3basics.dtx50
1 files changed, 46 insertions, 4 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
index 47c746ee43f..7fe36b480c0 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-05-11}
+% \date{Released 2021-05-25}
%
% \maketitle
%
@@ -108,6 +108,18 @@
% |}| if standard category codes apply.
% \end{function}
%
+% \begin{function}[added = 2021-05-11]{\group_show_list:, \group_log_list:}
+% \begin{syntax}
+% \cs{group_show_list:}
+% \cs{group_log_list:}
+% \end{syntax}
+% Display (to the terminal or log file) a list of the groups that are
+% currently opened. This is intended for tracking down problems.
+% \begin{texnote}
+% This is a wrapper around the \tn{showgroups} primitive.
+% \end{texnote}
+% \end{function}
+%
% \section{Control sequences and functions}
%
% As \TeX{} is a macro language, creating new functions means
@@ -2941,11 +2953,12 @@
{
\bool_if:NTF #3
{
- \str_if_eq:eeF { }
+ \cs_set_nopar:Npx \@@_tmp:w
{ \tl_map_function:nN {#2} \@@_generate_from_signature:n }
+ \tl_if_empty:oF \@@_tmp:w
{
- \__kernel_msg_error:nnx { kernel } { non-base-function }
- { \token_to_str:N #5 }
+ \__kernel_msg_error:nnxxx { kernel } { non-base-function }
+ { \token_to_str:N #5 } {#2} { \@@_tmp:w }
}
\cs_generate_from_arg_count:NNnn
#5 #4 { \tl_count:n {#2} } {#6}
@@ -3152,6 +3165,35 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\group_show_list:, \group_log_list:, \@@_group_show:NN}
+% Wrapper around \tn{showgroups}. Getting \TeX{} to write to the log
+% without interruption the run is done by altering the interaction
+% mode.
+% \begin{macrocode}
+\cs_new_protected:Npn \group_show_list:
+ { \@@_group_show:NN \use_none:n 1 }
+\cs_new_protected:Npn \group_log_list:
+ { \@@_group_show:NN \int_zero:N 0 }
+\cs_new_protected:Npn \@@_group_show:NN #1#2
+ {
+ \use:x
+ {
+ #1 \tex_interactionmode:D
+ \int_set:Nn \tex_tracingonline:D {#2}
+ \int_set:Nn \tex_errorcontextlines:D { -1 }
+ \exp_not:N \exp_after:wN \scan_stop:
+ \tex_showgroups:D
+ \int_set:Nn \tex_interactionmode:D
+ { \int_use:N \tex_interactionmode:D }
+ \int_set:Nn \tex_tracingonline:D
+ { \int_use:N \tex_tracingonline:D }
+ \int_set:Nn \tex_errorcontextlines:D
+ { \int_use:N \tex_errorcontextlines:D }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Decomposing a macro definition}
%
% \begin{macro}{\cs_prefix_spec:N}