[latex3-commits] [latex3/latex2e] develop: Move a setup item to avoid creating "\foo " (d5c9c220)

github at latex-project.org github at latex-project.org
Fri Dec 1 13:13:27 CET 2023


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/d5c9c22038cc733445d7f62ccc4fe0dd606c579f

>---------------------------------------------------------------

commit d5c9c22038cc733445d7f62ccc4fe0dd606c579f
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Dec 1 08:59:24 2023 +0000

    Move a setup item to avoid creating "\foo "


>---------------------------------------------------------------

d5c9c22038cc733445d7f62ccc4fe0dd606c579f
 base/ltcmd.dtx | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/base/ltcmd.dtx b/base/ltcmd.dtx
index 6a91aa47..bce5f246 100644
--- a/base/ltcmd.dtx
+++ b/base/ltcmd.dtx
@@ -415,8 +415,6 @@
 \cs_new_protected:Npn \@@_declare_cmd_internal:Nnnn #1#2#3#4
   {
     \tl_set:Nx \l_@@_function_tl { \cs_to_str:N #1 }
-    \tl_set:Nx \l_@@_fn_tl
-      { \exp_not:c { \l_@@_function_tl \c_space_tl } }
     \@@_normalize_arg_spec:n {#2}
     \exp_args:No \@@_prepare_signature:n \l_@@_arg_spec_tl
     \@@_declare_cmd_code:Nnn #1 {#2} {#3}
@@ -480,6 +478,8 @@
         { ! \tl_if_blank_p:e { \@@_all_m_check:n {#2} } }
       }
       {
+        \tl_set:Nx \l_@@_fn_tl
+          { \exp_not:c { \l_@@_function_tl \c_space_tl } }
         \bool_if:NTF \l_@@_grab_expandably_bool
           { \@@_declare_cmd_code_expandable:Nnn }
           { \@@_declare_cmd_code_aux:Nnn }
@@ -4648,10 +4648,8 @@
     \bool_if:NTF \l_@@_environment_bool
       { environment ~ ' \l_@@_environment_str ' }
       {
-        command ~ '
-        \exp_args:Nf \tl_trim_spaces:n
-          { \exp_after:wN \token_to_str:N \l_@@_fn_tl }
-        '
+        command ~
+          ' \c_backslash_str \tl_to_str:N \l_@@_function_tl '
       }
   }
 %    \end{macrocode}





More information about the latex3-commits mailing list.