From 33fe673e1a4a678f76e23a91da0f449998af9c47 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 20 May 2022 03:01:51 +0000 Subject: CTAN sync 202205200301 --- macros/latex-dev/base/ltcmd.dtx | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'macros/latex-dev/base/ltcmd.dtx') diff --git a/macros/latex-dev/base/ltcmd.dtx b/macros/latex-dev/base/ltcmd.dtx index f52b32479e..59aa5bf475 100644 --- a/macros/latex-dev/base/ltcmd.dtx +++ b/macros/latex-dev/base/ltcmd.dtx @@ -34,8 +34,8 @@ %%% From File: ltcmd.dtx % % \begin{macrocode} -\def\ltcmdversion{v1.0k} -\def\ltcmddate{2022-02-28} +\def\ltcmdversion{v1.0l} +\def\ltcmddate{2022-03-18} % \end{macrocode} % %<*driver> @@ -4097,8 +4097,10 @@ % \begin{macro}{\@@_cmd_type_cases:Nnnnn} % \changes{v1.0d}{2021/04/19}{Renamed \cs{__cmd_cmd_if_xparse:NTF} to % \cs{__kernel_cmd_if_xparse:NTF} for cross-module usage} -% \changes{v1.0d}{2021/07/30}{Added \cs{@@_cmd_type_cases:Nnnnn} for +% \changes{v1.0d}{2021/07/30}{Added \cs{@@_cmd_type_cases:NnnnnF} for % \cs{NewCommandCopy} and \cs{ShowCommand} support} +% \changes{v1.0l}{2022/03/18}{Fix \cs{@@_cmd_type_cases:NnnnnF} +%" prematurely expanding macros (gh/795)} % \begin{macro}{\@@_cmd_if_xparse_aux:N} % % To determine whether the command is an \pkg{xparse} command check @@ -4117,22 +4119,14 @@ \exp_args:Ne \str_case_e:nnF { \exp_args:Nf \tl_if_empty:nT { \cs_argument_spec:N #1 } - { - \token_if_macro:NT #1 - { - \exp_after:wN \exp_after:wN - \exp_after:wN \token_to_str:N - \exp_after:wN \use_i_delimit_by_q_stop:nw - #1 \scan_stop: \q_stop - } - } + { \exp_not:N \exp_not:n { \exp_not:e { \tl_head:N #1 } } } } { - { \token_to_str:N \@@_start:nNNnnn } {#2} - { \token_to_str:N \@@_start_expandable:nNNNNn } {#3} - { \token_to_str:N \@@_start_env:nnnnn } {#4} + { \exp_not:N \@@_start:nNNnnn } {#2} + { \exp_not:N \@@_start_expandable:nNNNNn } {#3} + { \exp_not:N \@@_start_env:nnnnn } {#4} { - \exp_after:wN \token_to_str:N + \exp_after:wN \exp_not:N \cs:w environment~ \exp_last_unbraced:Ne \use_none:nnn { \cs_to_str:N #1 } ~end~aux \cs_end: -- cgit v1.2.3