[latex3-commits] [latex3/latex2e] gh1189: Support long optimized cmds in \ShowCommand (5df4d0aa)

github at latex-project.org github at latex-project.org
Wed Nov 29 10:35:48 CET 2023


Repository : https://github.com/latex3/latex2e
On branch  : gh1189
Link       : https://github.com/latex3/latex2e/commit/5df4d0aa08f4509f5da429c007468bd3c8f7b7bc

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

commit 5df4d0aa08f4509f5da429c007468bd3c8f7b7bc
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Nov 29 09:35:10 2023 +0000

    Support long optimized cmds in \ShowCommand


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

5df4d0aa08f4509f5da429c007468bd3c8f7b7bc
 base/ltcmd.dtx | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/base/ltcmd.dtx b/base/ltcmd.dtx
index 1a557aee..a293750f 100644
--- a/base/ltcmd.dtx
+++ b/base/ltcmd.dtx
@@ -2605,10 +2605,22 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_show_optimized:N #1
   {
+    \cs_set:Npe \@@_show_optimized_aux:N ##1
+      {
+        \c_space_tl \c_hash_str ##1 :
+        \bool_lazy_or:nnT
+          { \token_if_long_macro_p:N #1 }
+          { \token_if_protected_long_macro_p:N #1 }
+            { + } m
+         \iow_newline:
+      }
     \tl_show:e
       {
         \token_to_str:N #1 =
-          \token_if_protected_macro:NF #1 { expandable ~ } document~command:
+          \bool_lazy_or:nnF
+            { \token_if_protected_macro_p:N #1 }
+            { \token_if_protected_long_macro_p:N #1 }
+              { expandable ~ } document~command:
         \iow_newline:
         \int_step_function:nN
           {
@@ -2625,8 +2637,7 @@
           }
       }
   }
-\cs_new:Npn \@@_show_optimized_aux:N #1
-  { \c_space_tl \c_hash_str #1 : m \iow_newline: }
+\cs_new:Npn \@@_show_optimized_aux:N #1 { }
 \use:e
   {
     \cs_new:Npn \exp_not:N \@@_show_optimized_aux:w





More information about the latex3-commits mailing list.