diff options
Diffstat (limited to 'macros/latex-dev/base/ltcmdhooks.dtx')
-rw-r--r-- | macros/latex-dev/base/ltcmdhooks.dtx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/macros/latex-dev/base/ltcmdhooks.dtx b/macros/latex-dev/base/ltcmdhooks.dtx index a3c89b48a9..f8a8699d7e 100644 --- a/macros/latex-dev/base/ltcmdhooks.dtx +++ b/macros/latex-dev/base/ltcmdhooks.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -%%% From File: ltcmdhooks.dtx +%% From File: ltcmdhooks.dtx %% Copyright (C) 2020-2024 %% Frank Mittelbach, Phelype Oleinik, The LaTeX Project % @@ -20,7 +20,7 @@ %<*driver> % \fi \ProvidesFile{ltcmdhooks.dtx} - [2024/03/09 v1.0i LaTeX Kernel (Command hooks)] + [2024/04/17 v1.0j LaTeX Kernel (Command hooks)] % \iffalse % \documentclass{l3doc} @@ -406,6 +406,8 @@ % \end{macrocode} % % \changes{v1.0b}{2021/05/24}{Use \cs{msg_...} instead of \cs{__kernel_msg...}} +% \changes{v1.0j}{2024/04/17}{Use \cs{__kernel_cs_parameter_spec:N} instead +% of \cs{cs_argument_spec:N}/\cs{cs_parameter_spec:N}} % % \begin{macrocode} %<*2ekernel|latexrelease> @@ -850,14 +852,14 @@ \@@_patch_debug:x { ++~command~can~be~patched~without~rescanning } % \end{macrocode} % We'll start by counting the number of arguments in the command by -% counting the number of characters in the \cs{cs_argument_spec:N} of +% counting the number of characters in the \cs{cs_parameter_spec:N} of % the macro, divided by two, and subtracting one if the command has an % optional argument (that is, an extra |[]| in its % \meta{parameter text}). % \begin{macrocode} \int_set:Nn \l_@@_patch_num_args_int { - \exp_args:Nf \str_count:n { \cs_argument_spec:N #2 } / 2 + \exp_args:Nf \str_count:n { \__kernel_cs_parameter_spec:N #2 } / 2 \bool_if:NT #1 { -1 } } % \end{macrocode} @@ -1010,7 +1012,7 @@ %<latexrelease> \@@_patch_debug:x { ++~command~can~be~patched~without~rescanning } %<latexrelease> \int_set:Nn \l_@@_patch_num_args_int %<latexrelease> { -%<latexrelease> \exp_args:Nf \str_count:n { \cs_argument_spec:N #2 } / 2 +%<latexrelease> \exp_args:Nf \str_count:n { \__kernel_cs_parameter_spec:N #2 } / 2 %<latexrelease> \bool_if:NT #1 { -1 } %<latexrelease> } %<latexrelease> \int_compare:nNnTF { \l_@@_patch_num_args_int } > { \c_zero_int } @@ -1260,12 +1262,12 @@ % top-level macro with no arguments, so testing this first would % short-circuit \tn{robust@command@act} and the top-level macros would % be incorrectly patched. In that case, we just check if the -% \cs{cs_argument_spec:N} is empty, and call +% \cs{cs_parameter_spec:N} is empty, and call % \cs{@@_patch_expand_redefine:NNnn}. % \begin{macrocode} \cs_new_protected:Npn \@@_retokenize_patch:Nnn #1 #2 #3 { - \str_if_eq:eeTF { \cs_argument_spec:N #1 } { } + \str_if_eq:eeTF { \__kernel_cs_parameter_spec:N #1 } { } { \@@_patch_expand_redefine:NNnn \c_false_bool #1 {#2} {#3} } { \@@_patch_debug:x { ..~command~can~only~be~patched~by~rescanning } |