From 4b78809eade750289a5ab7838fdaddd07bb57f77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LAURENS=20J=C3=A9r=C3=B4me?= Date: Wed, 17 Jan 2024 06:23:19 +0100 Subject: [PATCH] lthooks-code: less overfull box In order to improve the documentation, we do not want to add new warnings. This is why we try to remove as many of them. Some code has been reformatted by - line breaking - removing spaces - reseting the indentation Overfull hboxes essentially come from docstrip's `` The documentation is not modified yet. Update lthooks.dtx 3947, 4138, 5809: no indent reset, replaced by line breaks 5785, 5812 semantic line breaking and format consistency --- base/lthooks.dtx | 280 +++++++++++++++++++++++++++++------------------ 1 file changed, 174 insertions(+), 106 deletions(-) diff --git a/base/lthooks.dtx b/base/lthooks.dtx index 1576cc5647..f75b3ddb2d 100644 --- a/base/lthooks.dtx +++ b/base/lthooks.dtx @@ -32,7 +32,7 @@ % % \begin{macrocode} \def\lthooksversion{v1.1g} -\def\lthooksdate{2024/01/16} +\def\lthooksdate{2024/01/17} % \end{macrocode} % %<*driver> @@ -3534,7 +3534,7 @@ \msg_error:nnnnn { hooks } { set-top-level } { for } { SetDefaultHookLabel } {#1} } - { \exp_args:Nx \@@_set_default_label:n { \@@_make_name:n {#1} } } + { \exp_args:Nx \@@_set_default_label:n { \@@_make_name:n {#1}}} } \cs_new_protected:Npn \@@_set_default_label:n #1 { @@ -3747,7 +3747,8 @@ %\IncludeInRelease{2020/10/01}{\hook_gput_code:nnn} % {Providing~hooks} %\cs_gset_protected:Npn \hook_gput_code:nnn #1 #2 -% { \@@_normalize_hook_args:Nnn \@@_gput_code:nnn {#1} {#2} } +% { \@@_normalize_hook_args:Nnn +% \@@_gput_code:nnn {#1} {#2} } %\cs_gset_protected:Npn \@@_gput_code:nnn #1 #2 #3 % { % \@@_if_execute_immediately:nTF {#1} @@ -3761,7 +3762,8 @@ % { % \@@_if_disabled:nTF {#1} % { \msg_error:nnn { hooks } { hook-disabled } {#1} } -% { \@@_try_declaring_generic_hook:nnn {#1} {#2} {#3} } +% { \@@_try_declaring_generic_hook:nnn +% {#1} {#2} {#3} } % } % } % } @@ -3773,7 +3775,8 @@ % \on@line\space <-~ \tl_to_str:n{#3}} } % \str_if_eq:nnTF {#2} { top-level } % { -% \str_if_eq:eeTF { top-level } { \@@_currname_or_default: } +% \str_if_eq:eeTF { top-level } +% { \@@_currname_or_default: } % { % \@@_init_structure:n {#1} % \@@_tl_gput_right:cn { @@_toplevel~#1 } {#3} @@ -3781,7 +3784,8 @@ % { \msg_error:nnn { hooks } { misused-top-level } {#1} } % } % { -% \prop_get:cnNTF { g_@@_#1_code_prop } {#2} \l_@@_return_tl +% \prop_get:cnNTF +% { g_@@_#1_code_prop } {#2} \l_@@_return_tl % { % \prop_gput:cno { g_@@_#1_code_prop } {#2} % { \l_@@_return_tl #3 } @@ -3865,7 +3869,8 @@ % \changes{v1.1d}{2023/05/21} % {Changes to allow support arguments in cmd hooks (cmd-args).} % \begin{macrocode} -%\IncludeInRelease{2023/06/01}{\@@_try_declaring_generic_hook:nnn} +%\IncludeInRelease{2023/06/01} +% {\@@_try_declaring_generic_hook:nnn} % {Hooks~with~args} \cs_new_protected:Npn \@@_try_declaring_generic_hook:nnn #1 { @@ -3882,31 +3887,36 @@ {#1} } %\EndIncludeInRelease -%\IncludeInRelease{2021/11/15}{\@@_try_declaring_generic_hook:nnn} +%\IncludeInRelease{2021/11/15} +% {\@@_try_declaring_generic_hook:nnn} % {Standardise~generic~hook~names} %\cs_gset_protected:Npn \@@_try_declaring_generic_hook:nnn #1 % { -% \@@_try_declaring_generic_hook:wnTF #1 / / / \scan_stop: {#1} +% \@@_try_declaring_generic_hook:wnTF #1 ///\scan_stop: {#1} % \hook_gput_code:nnn % \@@_gput_undeclared_hook:nnn % {#1} % } -%\cs_gset_protected:Npn \@@_try_declaring_generic_next_hook:nn #1 +%\cs_gset_protected:Npn +% \@@_try_declaring_generic_next_hook:nn #1 % { -% \@@_try_declaring_generic_hook:wnTF #1 / / / \scan_stop: {#1} +% \@@_try_declaring_generic_hook:wnTF #1 ///\scan_stop: {#1} % \hook_gput_next_code:nn % \@@_gput_next_do:nn % {#1} % } %\EndIncludeInRelease -%\IncludeInRelease{2020/10/01}{\@@_try_declaring_generic_hook:nnn} +%\IncludeInRelease{2020/10/01} +% {\@@_try_declaring_generic_hook:nnn} % {Standardise~generic~hook~names} -%\cs_new_protected:Npn \@@_try_declaring_generic_hook:nnn #1 +%\cs_new_protected:Npn +% \@@_try_declaring_generic_hook:nnn #1 % { % \@@_try_declaring_generic_hook:nNNnn {#1} % \hook_gput_code:nnn \@@_gput_undeclared_hook:nnn % } -%\cs_new_protected:Npn \@@_try_declaring_generic_next_hook:nn #1 +%\cs_new_protected:Npn +% \@@_try_declaring_generic_next_hook:nn #1 % { % \@@_try_declaring_generic_hook:nNNnn {#1} % \hook_gput_next_code:nn \@@_gput_next_do:nn @@ -3934,7 +3944,8 @@ % { % \@@_if_file_hook:wTF #1 / \s_@@_mark % { -% \exp_args:Ne \@@_try_declaring_generic_hook_split:nNNnn +% \exp_args:Ne +% \@@_try_declaring_generic_hook_split:nNNnn % { \exp_args:Ne \@@_file_hook_normalize:n {#1} } % } % { \@@_try_declaring_generic_hook_split:nNNnn {#1} } @@ -3942,9 +3953,10 @@ % \end{macrocode} % % \begin{macrocode} -%\cs_new_protected:Npn \@@_try_declaring_generic_hook_split:nNNnn #1 #2 #3 +%\cs_new_protected:Npn +% \@@_try_declaring_generic_hook_split:nNNnn #1 #2 #3 % { -% \@@_try_declaring_generic_hook:wnTF #1 / / / \scan_stop: {#1} +% \@@_try_declaring_generic_hook:wnTF #1 ///\scan_stop: {#1} % { #2 } % { #3 } {#1} % } @@ -3956,9 +3968,11 @@ % \changes{v1.1a}{2023/04/06} % {Changes to add hook arguments (hook-args).} % \begin{macrocode} -%\IncludeInRelease{2023/06/01}{\@@_try_declaring_generic_hook:wn} +%\IncludeInRelease{2023/06/01} +% {\@@_try_declaring_generic_hook:wn} % {Hooks~with~args} -\prg_new_protected_conditional:Npnn \@@_try_declaring_generic_hook:wn +\prg_new_protected_conditional:Npnn + \@@_try_declaring_generic_hook:wn #1 / #2 / #3 / #4 \scan_stop: #5 { TF } { \@@_if_generic:nTF {#5} @@ -4077,9 +4091,11 @@ % \end{macro} % % \begin{macrocode} -%\IncludeInRelease{2021/11/15}{\@@_try_declaring_generic_hook:wn} +%\IncludeInRelease{2021/11/15} +% {\@@_try_declaring_generic_hook:wn} % {Standardise~generic~hook~names} -%\prg_new_protected_conditional:Npnn \@@_try_declaring_generic_hook:wn +%\prg_new_protected_conditional:Npnn +% \@@_try_declaring_generic_hook:wn % #1 / #2 / #3 / #4 \scan_stop: #5 { TF } % { % \@@_if_generic:nTF {#5} @@ -4108,9 +4124,11 @@ % \end{macrocode} % % \begin{macrocode} -%\IncludeInRelease{2021/06/01}{\@@_try_declaring_generic_hook:wn} +%\IncludeInRelease{2021/06/01} +% {\@@_try_declaring_generic_hook:wn} % {Support~cmd~hooks} -%\prg_new_protected_conditional:Npnn \@@_try_declaring_generic_hook:wn +%\prg_new_protected_conditional:Npnn +% \@@_try_declaring_generic_hook:wn % #1 / #2 / #3 / #4 \scan_stop: #5 { TF } % { % \tl_if_empty:nTF {#2} @@ -4124,10 +4142,12 @@ % { \@@_try_put_cmd_hook:n {#5} } % \@@_make_usable:n {#5} % } -% \prop_if_in:NnTF \c_@@_generics_reversed_ii_prop {#2} +% \prop_if_in:NnTF +% \c_@@_generics_reversed_ii_prop {#2} % { \tl_gset:cn { g_@@_#5_reversed_tl } { - } } % { -% \prop_if_in:NnT \c_@@_generics_reversed_iii_prop {#3} +% \prop_if_in:NnT +% \c_@@_generics_reversed_iii_prop {#3} % { \tl_gset:cn { g_@@_#5_reversed_tl } { - } } % } % \prg_return_true: @@ -4139,9 +4159,11 @@ % \end{macrocode} % % \begin{macrocode} -%\IncludeInRelease{2020/10/01}{\@@_try_declaring_generic_hook:wn} +%\IncludeInRelease{2020/10/01} +% {\@@_try_declaring_generic_hook:wn} % {Support~cmd~hooks} -%\prg_new_protected_conditional:Npnn \@@_try_declaring_generic_hook:wn +%\prg_new_protected_conditional:Npnn +% \@@_try_declaring_generic_hook:wn % #1 / #2 / #3 / #4 \scan_stop: #5 { TF } % { % \tl_if_empty:nTF {#2} @@ -4149,14 +4171,14 @@ % { % \prop_if_in:NnTF \c_@@_generics_prop {#1} % { -% \@@_if_declared:nF {#5} { \hook_new:n {#5} } -% \prop_if_in:NnTF \c_@@_generics_reversed_ii_prop {#2} -% { \tl_gset:cn { g_@@_#5_reversed_tl } { - } } -% { -% \prop_if_in:NnT \c_@@_generics_reversed_iii_prop {#3} -% { \tl_gset:cn { g_@@_#5_reversed_tl } { - } } -% } -% \prg_return_true: +%\@@_if_declared:nF {#5} { \hook_new:n {#5} } +%\prop_if_in:NnTF \c_@@_generics_reversed_ii_prop {#2} +% { \tl_gset:cn { g_@@_#5_reversed_tl } { - } } +% { +% \prop_if_in:NnT \c_@@_generics_reversed_iii_prop {#3} +% { \tl_gset:cn { g_@@_#5_reversed_tl } { - } } +% } +%\prg_return_true: % } % { \prg_return_false: } % } @@ -4229,11 +4251,11 @@ % \changes{v1.0h}{2021/01/07}{Assume hook name has at least three % nonempty parts (gh/464)} % \begin{macrocode} -%\cs_new:Npn \@@_strip_double_slash:w #1/#2/#3 // #4 \s_@@_mark +%\cs_new:Npn \@@_strip_double_slash:w #1/#2/#3//#4\s_@@_mark % { % \tl_if_empty:nTF {#4} % { #1/#2/#3 } -% { \@@_strip_double_slash:w #1/#2/#3 / #4 \s_@@_mark } +% { \@@_strip_double_slash:w #1/#2/#3 /#4\s_@@_mark } % } %\EndIncludeInRelease % \end{macrocode} @@ -4312,9 +4334,12 @@ % \begin{macrocode} %\IncludeInRelease{2020/10/01}{\c_@@_generics_reversed_ii_prop} % {Standardise~generic~hook~names} -%\prop_const_from_keyval:Nn \c_@@_generics_reversed_ii_prop {after=,end=} -%\prop_const_from_keyval:Nn \c_@@_generics_reversed_iii_prop {after=} -%\prop_const_from_keyval:Nn \c_@@_generics_file_prop {before=,after=} +%\prop_const_from_keyval:Nn +% \c_@@_generics_reversed_ii_prop {after=,end=} +%\prop_const_from_keyval:Nn +% \c_@@_generics_reversed_iii_prop {after=} +%\prop_const_from_keyval:Nn +% \c_@@_generics_file_prop {before=,after=} %\EndIncludeInRelease % \end{macrocode} % \end{macro} @@ -4394,7 +4419,8 @@ \str_if_eq:nnTF {#2} { top-level } { \@@_toplevel_gset:nn {#1} { } } { - \prop_gpop:cnNF { g_@@_#1_code_prop } {#2} \l_@@_return_tl + \prop_gpop:cnNF { g_@@_#1_code_prop } + {#2} \l_@@_return_tl { \msg_warning:nnnn { hooks } { cannot-remove } {#1} {#2} } } } @@ -4412,7 +4438,8 @@ \@@_if_deprecated_generic:nTF {#1} { \@@_deprecated_generic_warn:n {#1} - \@@_do_deprecated_generic:Nn \@@_gremove_code:nn {#1} {#2} + \@@_do_deprecated_generic:Nn + \@@_gremove_code:nn {#1} {#2} } { \msg_warning:nnnn { hooks } { cannot-remove } {#1} {#2} } } @@ -4437,8 +4464,10 @@ % \str_if_eq:nnTF {#2} { top-level } % { \@@_tl_gclear:c { @@_toplevel~#1 } } % { -% \prop_gpop:cnNF { g_@@_#1_code_prop } {#2} \l_@@_return_tl -% { \msg_warning:nnnn { hooks } { cannot-remove } {#1} {#2} } +% \prop_gpop:cnNF { g_@@_#1_code_prop } +% {#2} \l_@@_return_tl +% { \msg_warning:nnnn { hooks } { cannot-remove } +% {#1} {#2} } % } % } % \@@_if_usable:nT {#1} @@ -4448,9 +4477,11 @@ % \@@_if_deprecated_generic:nTF {#1} % { % \@@_deprecated_generic_warn:n {#1} -% \@@_do_deprecated_generic:Nn \@@_gremove_code:nn {#1} {#2} +% \@@_do_deprecated_generic:Nn +% \@@_gremove_code:nn {#1} {#2} % } -% { \msg_warning:nnnn { hooks } { cannot-remove } {#1} {#2} } +% { \msg_warning:nnnn { hooks } { cannot-remove } +% {#1} {#2} } % } % } %\EndIncludeInRelease @@ -4492,7 +4523,8 @@ {#1} {#2} } \cs_new_protected:Npn \@@_cs_gput_right_fast:nnn #1 #2 #3 - { \cs_gset:cpx { @@#1~#2 } { \exp_not:v { @@#1~#2 } \exp_not:n {#3} } } + { \cs_gset:cpx { @@#1~#2 } + { \exp_not:v { @@#1~#2 } \exp_not:n {#3} } } \cs_new_protected:Npn \@@_cs_gput_right_slow:nnn #1 #2 #3 { % \end{macrocode} @@ -4718,7 +4750,8 @@ % \begin{macrocode} \exp_last_unbraced:NNf \cs_set:Npn \@@_tmp:w { \@@_parameter:n {#1} } { } - \tl_set:Ne \l_@@_tmpa_tl { \@@_braced_cs_parameter:n { @@_tmp:w } } + \tl_set:Ne \l_@@_tmpa_tl + { \@@_braced_cs_parameter:n { @@_tmp:w } } % \end{macrocode} % Now this function does the fun part. It is meant to be used with % \cs{prop_map_function:NN}, taking a label name in \verb|##1| and the @@ -5094,8 +5127,8 @@ % \@@_if_deprecated_generic:nT {#1} % { % \@@_deprecated_generic_warn:n {#1} -% \@@_do_deprecated_generic:Nn \@@_gset_rule:nnnn {#1} -% {#2} {#3} {#4} +% \@@_do_deprecated_generic:Nn \@@_gset_rule:nnnn +% {#1} {#2} {#3} {#4} % \exp_after:wN \use_none:nnnnnnnnn \use_none:n % } % \@@_init_structure:n {#1} @@ -5135,7 +5168,7 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_rule_before_gset:nnn #1#2#3 { - \@@_tl_gset:cx { g_@@_#1_rule_ \@@_label_pair:nn {#2} {#3} _tl } + \@@_tl_gset:cx { g_@@_#1_rule_ \@@_label_pair:nn {#2} {#3}_tl} { \@@_label_ordered:nnTF {#2} {#3} { < } { > } } } \cs_new_eq:cN { @@_rule_<_gset:nnn } \@@_rule_before_gset:nnn @@ -5144,7 +5177,7 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_rule_after_gset:nnn #1#2#3 { - \@@_tl_gset:cx { g_@@_#1_rule_ \@@_label_pair:nn {#3} {#2} _tl } + \@@_tl_gset:cx { g_@@_#1_rule_ \@@_label_pair:nn {#3} {#2}_tl} { \@@_label_ordered:nnTF {#3} {#2} { < } { > } } } \cs_new_eq:cN { @@_rule_>_gset:nnn } \@@_rule_after_gset:nnn @@ -5157,7 +5190,7 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_rule_voids_gset:nnn #1#2#3 { - \@@_tl_gset:cx { g_@@_#1_rule_ \@@_label_pair:nn {#2} {#3} _tl } + \@@_tl_gset:cx { g_@@_#1_rule_ \@@_label_pair:nn {#2} {#3}_tl} { \@@_label_ordered:nnTF {#2} {#3} { -> } { <- } } } % \end{macrocode} @@ -5171,10 +5204,10 @@ % together in hook |#1|. % \begin{macrocode} \cs_new_protected:cpn { @@_rule_incompatible-error_gset:nnn } #1#2#3 - { \@@_tl_gset:cn { g_@@_#1_rule_ \@@_label_pair:nn {#2} {#3} _tl } + { \@@_tl_gset:cn { g_@@_#1_rule_ \@@_label_pair:nn {#2} {#3}_tl} { xE } } \cs_new_protected:cpn { @@_rule_incompatible-warning_gset:nnn } #1#2#3 - { \@@_tl_gset:cn { g_@@_#1_rule_ \@@_label_pair:nn {#2} {#3} _tl } + { \@@_tl_gset:cn { g_@@_#1_rule_ \@@_label_pair:nn {#2} {#3}_tl} { xW } } % \end{macrocode} % \end{macro} @@ -5306,7 +5339,8 @@ % {Hooks~with~args} %\cs_gset_protected:Npn \@@_initialize_all: % { -% \cs_gset_eq:NN \@@_update_hook_code:n \@@_initialize_hook_code:n +% \cs_gset_eq:NN \@@_update_hook_code:n +% \@@_initialize_hook_code:n % \@@_debug:n { \prop_gclear:N \g_@@_used_prop } % \seq_map_inline:Nn \g_@@_all_seq % { \@@_update_hook_code:n {##1} } @@ -5316,7 +5350,8 @@ % \prop_map_inline:Nn \g_@@_used_prop % { % \iow_term:x -% { ^^J ~ ##1 ~ -> ~ \cs_replacement_spec:c { @@~##1 } ~ } +% { ^^J ~ ##1 ~ -> ~ +% \cs_replacement_spec:c { @@~##1 } ~ } % } % } % \cs_gset_eq:NN \hook_use:n \@@_use_initialized:n @@ -5375,8 +5410,10 @@ % after the \verb|_next| and \verb|_toplevel| macros, so that the % arguments passed to the hook are forwarded to them. % \begin{macrocode} - \exp_not:c { @@_toplevel~#1 } \@@_braced_parameter:n {#1} - \exp_not:c { @@_next~#1 } \@@_braced_parameter:n {#1} + \exp_not:c { @@_toplevel~#1 } + \@@_braced_parameter:n {#1} + \exp_not:c { @@_next~#1 } + \@@_braced_parameter:n {#1} } } { @@ -5425,7 +5462,8 @@ %\cs_gset_protected:Npn \@@_initialize_hook_code:n #1 % { % \@@_debug:n -% { \iow_term:x { ^^J Update~code~for~hook~'#1' \on@line :^^J } } +% { \iow_term:x { ^^J Update~code~for~hook~'#1' +% \on@line :^^J } } % \@@_include_legacy_code_chunk:n {#1} % \@@_if_usable:nT {#1} % { @@ -5439,15 +5477,21 @@ % } % { % \@@_if_reversed:nTF {#1} -% { \cs_set_eq:NN \@@_tl_gput:Nn \@@_tl_gput_left:Nn -% \cs_set_eq:NN \@@_clist_gput:NV \clist_gput_left:NV } -% { \cs_set_eq:NN \@@_tl_gput:Nn \@@_tl_gput_right:Nn -% \cs_set_eq:NN \@@_clist_gput:NV \clist_gput_right:NV } -% \prop_set_eq:Nc \l_@@_work_prop { g_@@_#1_code_prop } +% { \cs_set_eq:NN \@@_tl_gput:Nn +% \@@_tl_gput_left:Nn +% \cs_set_eq:NN \@@_clist_gput:NV +% \clist_gput_left:NV } +% { \cs_set_eq:NN \@@_tl_gput:Nn +% \@@_tl_gput_right:Nn +% \cs_set_eq:NN \@@_clist_gput:NV +% \clist_gput_right:NV } +% \prop_set_eq:Nc \l_@@_work_prop +% { g_@@_#1_code_prop } % \@@_initialize_single:ccn % { @@~#1 } { g_@@_#1_labels_clist } {#1} % \@@_debug:n -% { \exp_args:NNx \prop_gput:Nnn \g_@@_used_prop {#1} { } } +% { \exp_args:NNx \prop_gput:Nnn \g_@@_used_prop +% {#1} { } } % } % } % } @@ -5646,7 +5690,8 @@ \int_compare:nNnT { \cs:w \@@_tl_csname:n {##1} \cs_end: } = 0 { - \tl_set:cn { \@@_tl_csname:n { \l_@@_rear_tl } } {##1} + \tl_set:cn + { \@@_tl_csname:n { \l_@@_rear_tl } } {##1} \tl_set:Nn \l_@@_rear_tl {##1} } } @@ -5728,42 +5773,49 @@ % {#3} % } % } -% \@@_debug:n { \@@_debug_label_data:N \l_@@_work_prop } +% \@@_debug:n +% { \@@_debug_label_data:N \l_@@_work_prop } % \tl_set:Nn \l_@@_rear_tl { 0 } % \tl_set:cn { \@@_tl_csname:n { 0 } } { 0 } % \seq_map_inline:Nn \l_@@_labels_seq % { -% \int_compare:nNnT { \cs:w \@@_tl_csname:n {##1} \cs_end: } = 0 -% { -% \tl_set:cn { \@@_tl_csname:n { \l_@@_rear_tl } }{##1} -% \tl_set:Nn \l_@@_rear_tl {##1} -% } +% \int_compare:nNnT +% { \cs:w \@@_tl_csname:n {##1} \cs_end: } = 0 +% { +% \tl_set:cn { \@@_tl_csname:n +% { \l_@@_rear_tl } } {##1} +% \tl_set:Nn \l_@@_rear_tl {##1} +% } % } % \tl_set_eq:Nc \l_@@_front_tl { \@@_tl_csname:n { 0 } } % \@@_tl_gclear:N #1 % \clist_gclear:N #2 -% \bool_while_do:nn { ! \str_if_eq_p:Vn \l_@@_front_tl { 0 } } +% \bool_while_do:nn { ! \str_if_eq_p:Vn \l_@@_front_tl { 0 }} % { % \int_decr:N \l_@@_labels_int -% \prop_get:NVN \l_@@_work_prop \l_@@_front_tl \l_@@_return_tl +% \prop_get:NVN \l_@@_work_prop +% \l_@@_front_tl \l_@@_return_tl % \exp_args:NNV \@@_tl_gput:Nn #1 \l_@@_return_tl % \@@_clist_gput:NV #2 \l_@@_front_tl -% \@@_debug:n{ \iow_term:x{Handled~ code~ for~ \l_@@_front_tl} } -% \seq_map_inline:cn { \@@_seq_csname:n { \l_@@_front_tl } } +% \@@_debug:n{ \iow_term:x +% {Handled~ code~ for~ \l_@@_front_tl} } +% \seq_map_inline:cn +% { \@@_seq_csname:n { \l_@@_front_tl } } % { % \tl_set:cx { \@@_tl_csname:n {##1} } -% { \int_eval:n -% { \cs:w \@@_tl_csname:n {##1} \cs_end: - 1 } -% } +% { \int_eval:n +% { \cs:w \@@_tl_csname:n {##1} \cs_end: - 1 } +% } % \int_compare:nNnT -% { \cs:w \@@_tl_csname:n {##1} \cs_end: } = 0 -% { -% \tl_set:cn { \@@_tl_csname:n { \l_@@_rear_tl } } {##1} -% \tl_set:Nn \l_@@_rear_tl {##1} -% } +% { \cs:w \@@_tl_csname:n {##1} \cs_end: } = 0 +% { +% \tl_set:cn { \@@_tl_csname:n +% { \l_@@_rear_tl } } {##1} +% \tl_set:Nn \l_@@_rear_tl {##1} +% } % } % \tl_set_eq:Nc \l_@@_front_tl -% { \@@_tl_csname:n { \l_@@_front_tl } } +% { \@@_tl_csname:n { \l_@@_front_tl } } % } % \int_compare:nNnF \l_@@_labels_int = 0 % { @@ -5772,7 +5824,8 @@ % \@@_debug_label_data:N \l_@@_work_prop % \iow_term:x{====================} % } -% \exp_args:NNo \@@_tl_gput:Nn #1 { \cs:w @@_toplevel~#3 \cs_end: } +% \exp_args:NNo \@@_tl_gput:Nn #1 +% { \cs:w @@_toplevel~#3 \cs_end: } % \@@_tl_gput_right:No #1 { \cs:w @@_next~#3 \cs_end: } % } %\cs_generate_variant:Nn \@@_tl_gput_right:Nn { No } @@ -6191,7 +6244,8 @@ % } % \@@_preamble_hook:n {#1} % \@@_log_cmd:x -% { ^^J ->~The~ \@@_if_generic:nT {#1} { generic~ } hook~'#1': } +% { ^^J ->~The~ \@@_if_generic:nT +% {#1} { generic~ } hook~'#1': } % \@@_if_usable:nF {#1} % { \@@_log_line:x { The~hook~is~not~declared. } } % \@@_if_disabled:nT {#1} @@ -6204,26 +6258,30 @@ % { \@@_log_line_indent:x { --- } } % { % \prop_map_inline:cn { g_@@_#1_code_prop } -% { \@@_log_line_indent:x { ##1~->~\tl_to_str:n {##2} } } +% { \@@_log_line_indent:x +% { ##1~->~\tl_to_str:n {##2} } } % } % \@@_log_line:x % { % Document-level~(top-level)~code % \@@_if_usable:nT {#1} -% { ~(executed~\@@_if_reversed:nTF {#1} {first} {last} ) } : +% { ~(executed~ +% \@@_if_reversed:nTF {#1} {first} {last} ) } : % } % \@@_log_line_indent:x % { % \tl_if_empty:cTF { @@_toplevel~#1 } % { --- } -% { -> ~ \exp_args:Nv \tl_to_str:n { @@_toplevel~#1 } } +% { -> ~ \exp_args:Nv \tl_to_str:n +% { @@_toplevel~#1 } } % } % \@@_log_line:x { Extra~code~for~next~invocation: } % \@@_log_line_indent:x % { % \tl_if_empty:cTF { @@_next~#1 } % { --- } -% { ->~ \exp_args:Nv \@@_log_next_code:n { @@_next~#1 } } +% { ->~ \exp_args:Nv \@@_log_next_code:n +% { @@_next~#1 } } % } % \@@_log_line:x { Rules: } % \bool_set_true:N \l_@@_tmpa_bool @@ -6247,7 +6305,8 @@ % { % Execution~order % \bool_if:NTF \l_@@_tmpa_bool -% { \@@_if_reversed:nT {#1} { ~(after~reversal) } } +% { \@@_if_reversed:nT +% {#1}{ ~(after~reversal) } } % { ~(after~ % \@@_if_reversed:nT {#1} { reversal~and~ } % applying~rules) @@ -6258,16 +6317,19 @@ % \@spaces % \clist_if_empty:cTF { g_@@_#1_labels_clist } % { --- } -% { \clist_use:cn { g_@@_#1_labels_clist } { ,~ } } +% { \clist_use:cn +% { g_@@_#1_labels_clist } { ,~ } } % } % } % { % \@@_log_line:x { Execution~order: } % #2 % { -% \@spaces Not~set~because~the~hook~ \@@_if_usable:nTF {#1} +% \@spaces Not~set~because~the~hook~ +% \@@_if_usable:nTF {#1} % { code~pool~is~empty } -% { is~\@@_if_disabled:nTF {#1} {disabled} {undeclared} } +% { is~\@@_if_disabled:nTF +% {#1} {disabled} {undeclared} } % } % } % } @@ -6415,7 +6477,7 @@ %\IncludeInRelease{2020/10/01}{\hook_gput_next_code:nn} % {Hooks~with~args} %\cs_gset_protected:Npn \hook_gput_next_code:nn #1 -% { \@@_normalize_hook_args:Nn \@@_gput_next_code:nn {#1} } +% { \@@_normalize_hook_args:Nn \@@_gput_next_code:nn {#1}} %\cs_gset_protected:Npn \hook_gput_next_code_with_args:nn #1 #2 { } %\EndIncludeInRelease % \end{macrocode} @@ -6607,7 +6669,7 @@ % \fi: % \cs:w @@~#1 \@@_use_end: % } -%\cs_new:Npn \@@_use_undefined:w #1 #2 @@~#3 \@@_use_end: +%\cs_new:Npn \@@_use_undefined:w #1#2 @@~#3\@@_use_end: % { % #1 % fi % \@@_use:wn #3 / \s_@@_mark {#3} @@ -6715,7 +6777,8 @@ % \exp_args:Ne \@@_if_usable_use:n % { \exp_args:Ne \@@_file_hook_normalize:n {#1} } % } -% { \@@_if_usable_use:n {#1} } % file/ generic hook (e.g. file/before) +% { \@@_if_usable_use:n {#1} } +% % file/ generic hook (e.g. file/before) % } % \end{macrocode} % @@ -6753,12 +6816,14 @@ \cs_new_protected:Npn \hook_use_once:n #1 { \@@_if_execute_immediately:nF {#1} - { \@@_normalize_hook_args:Nn \@@_use_once:nn { \use:n {#1} } { 0 } } + { \@@_normalize_hook_args:Nn \@@_use_once:nn + { \use:n {#1} } { 0 } } } \cs_new_protected:Npn \hook_use_once:nnw #1 #2 { \@@_if_execute_immediately:nF {#1} - { \@@_normalize_hook_args:Nn \@@_use_once:nn { \use:n {#1} } {#2} } + { \@@_normalize_hook_args:Nn \@@_use_once:nn + { \use:n {#1} } {#2} } } %\EndIncludeInRelease % \end{macrocode} @@ -6770,7 +6835,8 @@ %\cs_gset_protected:Npn \hook_use_once:n #1 % { % \@@_if_execute_immediately:nF {#1} -% { \@@_normalize_hook_args:Nn \@@_use_once:n { \use:n {#1} } } +% { \@@_normalize_hook_args:Nn \@@_use_once:n +% { \use:n {#1} } } % } %\cs_gset:Npn \hook_use_once:nnw #1 #2 % { \use:c { use_none: \prg_replicate:nn {#2} { n } } } @@ -6795,7 +6861,8 @@ % along with the next execution code. % \begin{macrocode} \@@_replacing_args_false: - \@@_cs_gput_right:nnn { _next } {#1} { \@@_use_once_clear:n {#1} } + \@@_cs_gput_right:nnn { _next } {#1} + { \@@_use_once_clear:n {#1} } \@@_replacing_args_reset: \@@_if_usable:nTF {#1} { \@@_use_initialized:n {#1} } @@ -7242,7 +7309,8 @@ { Cannot~add~code~to~disabled~hook~'#1'. } { The~hook~'#1'~you~tried~to~add~code~to~was~previously~disabled~ - with~\iow_char:N\\hook_disable_generic:n~or~\iow_char:N\\DisableGenericHook,~so~ + with~\iow_char:N\\hook_disable_generic:n~or~ + \iow_char:N\\DisableGenericHook,~so~ it~cannot~have~code~added~to~it. } % \end{macrocode} @@ -7410,7 +7478,7 @@ % {Hooks~with~args} %\cs_new_protected:Npn \NewHookWithArguments #1 #2 { } %\cs_new_protected:Npn \NewReversedHookWithArguments #1 #2 { } -%\cs_new_protected:Npn \NewMirroredHookPairWithArguments #1 #2 #3 { } +%\cs_new_protected:Npn \NewMirroredHookPairWithArguments #1 #2 #3{} %\EndIncludeInRelease % \end{macrocode} % \end{macro} @@ -7862,7 +7930,7 @@ % \exp_args:No \exp_not:o % { % \cs:w @@#1~#2 \exp_last_unbraced:Ne \cs_end: -% { \@@_braced_cs_parameter:n { @@#1~#2 } } +% { \@@_braced_cs_parameter:n { @@#1~#2 } } % } % } % }