[latex3-commits] [git/LaTeX3-latex3-latex2e] gh795: Second attempt at 8f99cde (b317f9cb)

PhelypeOleinik phelype.oleinik at latex-project.org
Sat Mar 19 00:34:41 CET 2022


Repository : https://github.com/latex3/latex2e
On branch  : gh795
Link       : https://github.com/latex3/latex2e/commit/b317f9cb6431e5a985913dfa46340e829fa907bf

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

commit b317f9cb6431e5a985913dfa46340e829fa907bf
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Fri Mar 18 20:34:41 2022 -0300

    Second attempt at 8f99cde
    
    If the first item is a braced group, more tokens are returned so a single \exp_not:N is not enough


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

b317f9cb6431e5a985913dfa46340e829fa907bf
 base/ltcmd.dtx                 | 5 +----
 base/testfiles/github-0795.lvt | 4 ++++
 base/testfiles/github-0795.tlg | 2 ++
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/base/ltcmd.dtx b/base/ltcmd.dtx
index 9f560daa..59aa5bf4 100644
--- a/base/ltcmd.dtx
+++ b/base/ltcmd.dtx
@@ -4119,10 +4119,7 @@
     \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_not:N \exp_not:N \exp_not:e { \tl_head:N #1 } }
-          }
+          { \exp_not:N \exp_not:n { \exp_not:e { \tl_head:N #1 } } }
       }
       {
         { \exp_not:N \@@_start:nNNnnn } {#2}
diff --git a/base/testfiles/github-0795.lvt b/base/testfiles/github-0795.lvt
index 286ed591..ea823a97 100644
--- a/base/testfiles/github-0795.lvt
+++ b/base/testfiles/github-0795.lvt
@@ -1,8 +1,12 @@
 \input test2e
 \START
 \def\test{\typeout{test}\fi}
+\def\testx{{\typeout{test x}\fi}}
 \AddToHook{cmd/test/after}{\typeout{hello}}
+\AddToHook{cmd/testx/after}{\typeout{hello x}}
 \@kernel at after@begindocument
 \if11 % \fi comes from \test
 \test
+\if11 % \fi comes from \testx
+\testx
 \END
diff --git a/base/testfiles/github-0795.tlg b/base/testfiles/github-0795.tlg
index 5a5b512a..8b475335 100644
--- a/base/testfiles/github-0795.tlg
+++ b/base/testfiles/github-0795.tlg
@@ -2,3 +2,5 @@ This is a generated file for the LaTeX2e validation system.
 Don't change this file in any respect.
 test
 hello
+test x
+hello x





More information about the latex3-commits mailing list.