summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3tl.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl.dtx33
1 files changed, 21 insertions, 12 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
index 59d0b161e94..77673fbd8ef 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
@@ -37,7 +37,7 @@
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3tl.dtx 5908 2015-09-02 14:50:27Z joseph $
+\GetIdInfo$Id: l3tl.dtx 5983 2015-09-10 18:57:56Z joseph $
{L3 Token lists}
%</driver|package>
%<*driver>
@@ -326,7 +326,7 @@
% These functions allow the rescanning of tokens: re-apply \TeX{}'s
% tokenization process to apply category codes different from those
% in force when the tokens were absorbed. Whilst this functionality is
-% supported, it is often preferable to find alternative approaches
+% supported, it is often preferable to find alternative approaches
% to achieving outcomes rather than rescanning tokens (for example
% construction of token lists token-by-token with intervening category
% code changes).
@@ -1526,16 +1526,25 @@
{ \@@_set_rescan:NNnn \prg_do_nothing: \use:n }
\cs_new_protected:Npn \@@_set_rescan:NNnn #1#2#3#4
{
- \group_begin:
- \exp_args:No \etex_everyeof:D { \c_@@_rescan_marker_tl \exp_not:N }
- \int_compare:nNnT \tex_endlinechar:D = { 32 }
- { \tex_endlinechar:D \c_minus_one }
- \tex_newlinechar:D \tex_endlinechar:D
- #3 \scan_stop:
- \exp_args:No \@@_set_rescan:n { \tl_to_str:n {#4} }
- \exp_args:NNNo
- \group_end:
- #1 #2 \l_@@_internal_a_tl
+ \tl_if_empty:nTF {#4}
+ {
+ \group_begin:
+ #3
+ \group_end:
+ #1 #2 { }
+ }
+ {
+ \group_begin:
+ \exp_args:No \etex_everyeof:D { \c_@@_rescan_marker_tl \exp_not:N }
+ \int_compare:nNnT \tex_endlinechar:D = { 32 }
+ { \tex_endlinechar:D \c_minus_one }
+ \tex_newlinechar:D \tex_endlinechar:D
+ #3 \scan_stop:
+ \exp_args:No \@@_set_rescan:n { \tl_to_str:n {#4} }
+ \exp_args:NNNo
+ \group_end:
+ #1 #2 \l_@@_internal_a_tl
+ }
}
\cs_new_protected:Npn \@@_set_rescan_multi:n #1
{