[latex3-commits] [l3svn] branch master updated: Further work on rescanning empty tl (see #266)

noreply at latex-project.org noreply at latex-project.org
Tue Sep 8 18:54:40 CEST 2015


This is an automated email from the git hooks/post-receive script.

joseph pushed a commit to branch master
in repository l3svn.

The following commit(s) were added to refs/heads/master by this push:
       new  4724eb4   Further work on rescanning empty tl (see #266)
4724eb4 is described below

commit 4724eb4aca4af2747bc58bff1c75a3fccc043e72
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Tue Sep 8 17:53:44 2015 +0100

    Further work on rescanning empty tl (see #266)
    
    Add a test and make sure that setting to an empty input
    gives empty output!
---
 l3kernel/l3tl.dtx                     |    3 ++-
 l3kernel/testfiles/m3tl008.luatex.tlg |    1 +
 l3kernel/testfiles/m3tl008.lvt        |    2 ++
 l3kernel/testfiles/m3tl008.tlg        |    1 +
 4 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/l3kernel/l3tl.dtx b/l3kernel/l3tl.dtx
index 763b214..1c89a2e 100644
--- a/l3kernel/l3tl.dtx
+++ b/l3kernel/l3tl.dtx
@@ -1526,7 +1526,8 @@
   { \@@_set_rescan:NNnn \prg_do_nothing: \use:n }
 \cs_new_protected:Npn \@@_set_rescan:NNnn #1#2#3#4
   {
-    \tl_if_empty:nF {#4}
+    \tl_if_empty:nTF {#4}
+      { #1 #2 { } }
       {
         \group_begin:
           \exp_args:No \etex_everyeof:D { \c_@@_rescan_marker_tl \exp_not:N }
diff --git a/l3kernel/testfiles/m3tl008.luatex.tlg b/l3kernel/testfiles/m3tl008.luatex.tlg
index dc75af2..7ec6b69 100644
--- a/l3kernel/testfiles/m3tl008.luatex.tlg
+++ b/l3kernel/testfiles/m3tl008.luatex.tlg
@@ -72,6 +72,7 @@ macro:->a ce
 > \g_tmpb_tl= a b .
 > \l_tmpa_tl=abc.
 > \l_tmpa_tl=abd.
+> \l_tmpa_tl=.
 ============================================================
 ============================================================
 TEST 5: rescan multiple lines
diff --git a/l3kernel/testfiles/m3tl008.lvt b/l3kernel/testfiles/m3tl008.lvt
index f33d063..0ba13f4 100644
--- a/l3kernel/testfiles/m3tl008.lvt
+++ b/l3kernel/testfiles/m3tl008.lvt
@@ -98,6 +98,8 @@
   \tl_log:N \l_tmpa_tl
   \tl_set_rescan:Nnn \l_tmpa_tl { \char_set_catcode_comment:N \' } { abd }
   \tl_log:N \l_tmpa_tl
+  \tl_set_rescan:Nnn \l_tmpa_tl { \char_set_catcode_comment:N \' } { }
+  \tl_log:N \l_tmpa_tl
 }
 
 \group_begin:
diff --git a/l3kernel/testfiles/m3tl008.tlg b/l3kernel/testfiles/m3tl008.tlg
index 56fea7b..fc7e7db 100644
--- a/l3kernel/testfiles/m3tl008.tlg
+++ b/l3kernel/testfiles/m3tl008.tlg
@@ -72,6 +72,7 @@ macro:->a ce
 > \g_tmpb_tl= a b .
 > \l_tmpa_tl=abc.
 > \l_tmpa_tl=abd.
+> \l_tmpa_tl=.
 ============================================================
 ============================================================
 TEST 5: rescan multiple lines

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the latex3-commits mailing list