[latex3-commits] [l3svn] 02/02: Adjust \l_char_active_seq to use escaped tokens
noreply at latex-project.org
noreply at latex-project.org
Wed Nov 11 09:42:19 CET 2015
This is an automated email from the git hooks/post-receive script.
joseph pushed a commit to branch master
in repository l3svn.
commit cadf9765d0a0ca3a73b3d39f14f9bed344cdfafe
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Wed Nov 11 08:38:43 2015 +0000
Adjust \l_char_active_seq to use escaped tokens
This is a lot easier for general management, particularly given
that we now have \char_set_active:Npn, etc., not altering
catcodes.
---
l3kernel/l3file.dtx | 2 +-
l3kernel/l3token.dtx | 31 ++++++++-----------------------
2 files changed, 9 insertions(+), 24 deletions(-)
diff --git a/l3kernel/l3file.dtx b/l3kernel/l3file.dtx
index f4db82d..58086a0 100644
--- a/l3kernel/l3file.dtx
+++ b/l3kernel/l3file.dtx
@@ -690,7 +690,7 @@
{
\group_begin:
\seq_map_inline:Nn \l_char_active_seq
- { \cs_set_nopar:Npx ##1 { \token_to_str:N ##1 } }
+ { \char_set:active:Npx ##1 { \cs_to_str:N ##1 } }
\tl_set:Nx \l_@@_internal_name_tl {#1}
\tl_set:Nx \l_@@_internal_name_tl
{ \tl_to_str:N \l_@@_internal_name_tl }
diff --git a/l3kernel/l3token.dtx b/l3kernel/l3token.dtx
index e6899d6..531c318 100644
--- a/l3kernel/l3token.dtx
+++ b/l3kernel/l3token.dtx
@@ -338,8 +338,9 @@
% Used to track which tokens may require special handling at the document
% level as they are (or have been at some point)
% of category \meta{active} (catcode~$13$). Each entry in
-% the sequence consists of a single active character. Active tokens should be
-% added to the sequence when they are defined for general document use.
+% the sequence consists of a single escaped token, for example |\~|.
+% Active tokens should be added to the sequence when they are defined for
+% general document use.
% \end{variable}
%
% \begin{variable}[added = 2012-01-23, updated = 2015-11-11]{\l_char_special_seq}
@@ -1164,34 +1165,18 @@
%
% \begin{variable}{\l_char_active_seq, \l_char_special_seq}
% Two sequences for dealing with special characters. The first is characters
-% which may be active, and contains the active characters themselves to
-% allow easy redefinition. The second longer list is for \enquote{special}
-% characters more generally, and these are escaped so that for example
+% which may be active, the second longer list is for \enquote{special}
+% characters more generally. Both lists are escaped so that for example
% bulk code assignments can be carried out. In both cases, the order is
% by \textsc{ascii} character code (as is done in for example
-% \cs{ExplSyntaxOn}). The only complication is dealing with |_|, which
-% requires the use of \cs{use:n} \emph{and} \cs{use:nn}.
+% \cs{ExplSyntaxOn}).
% \begin{macrocode}
\seq_new:N \l_char_special_seq
\seq_set_split:Nnn \l_char_special_seq { }
{ \ \" \# \$ \% \& \\ \^ \_ \{ \} \~ }
\seq_new:N \l_char_active_seq
-\use:n
- {
- \group_begin:
- \char_set_catcode_active:N \"
- \char_set_catcode_active:N \$
- \char_set_catcode_active:N \&
- \char_set_catcode_active:N \^
- \char_set_catcode_active:N \_
- \char_set_catcode_active:N \~
- \use:nn
- {
- \group_end:
- \seq_set_split:Nnn \l_char_active_seq { }
- }
- }
- { { " $ & ^ _ ~ } } %$
+\seq_set_split:Nnn \l_char_special_seq { }
+ { \" \$ \& \^ \_ \~ }
% \end{macrocode}
% \end{variable}
%
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the latex3-commits
mailing list