diff options
author | Norbert Preining <norbert@preining.info> | 2021-05-26 03:05:34 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-05-26 03:05:34 +0000 |
commit | 8982c52e00ffb3fb5a913fc60913ebd9070f091a (patch) | |
tree | 6a395986e3502fefcf42364f8dd87519b45a2441 /macros/latex/contrib/l3kernel/l3basics.dtx | |
parent | 07dc96bc3bbd691fc52aca15a172eaf41a89d873 (diff) |
CTAN sync 202105260305
Diffstat (limited to 'macros/latex/contrib/l3kernel/l3basics.dtx')
-rw-r--r-- | macros/latex/contrib/l3kernel/l3basics.dtx | 50 |
1 files changed, 46 insertions, 4 deletions
diff --git a/macros/latex/contrib/l3kernel/l3basics.dtx b/macros/latex/contrib/l3kernel/l3basics.dtx index 47c746ee43..7fe36b480c 100644 --- a/macros/latex/contrib/l3kernel/l3basics.dtx +++ b/macros/latex/contrib/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} |