[latex3-commits] [l3svn] 04/04: Remove \tl_to_lowercase:n from xtemplate
noreply at latex-project.org
noreply at latex-project.org
Sun Sep 6 22:47:33 CEST 2015
This is an automated email from the git hooks/post-receive script.
joseph pushed a commit to branch master
in repository l3svn.
commit fd217571914680172f1ac1d7cbd70b9a039daa24
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Sun Sep 6 20:54:39 2015 +0100
Remove \tl_to_lowercase:n from xtemplate
---
l3packages/xtemplate/xtemplate.dtx | 51 ++++++++++++++++++++----------------
1 file changed, 28 insertions(+), 23 deletions(-)
diff --git a/l3packages/xtemplate/xtemplate.dtx b/l3packages/xtemplate/xtemplate.dtx
index e9dead7..038a68f 100644
--- a/l3packages/xtemplate/xtemplate.dtx
+++ b/l3packages/xtemplate/xtemplate.dtx
@@ -1281,41 +1281,46 @@
% that, the standard delimited argument method is used to separate the
% two parts.
% \begin{macrocode}
-\group_begin:
-\char_set_lccode:nn { `\@ } { `\: }
-\char_set_catcode_other:N \@
-\tl_to_lowercase:n
+\cs_new_protected:Npx \@@_split_keytype:n #1
{
- \group_end:
- \cs_new_protected:Npn \@@_split_keytype:n #1
+ \exp_not:N \bool_set_false:N \exp_not:N \l_@@_error_bool
+ \tl_set:Nn \exp_not:N \l_@@_tmp_tl {#1}
+ \tl_remove_all:Nn \exp_not:N \l_@@_tmp_tl { ~ }
+ \tl_replace_all:Nnn \exp_not:N \l_@@_tmp_tl { : } { \token_to_str:N : }
+ \tl_if_in:onTF \exp_not:N \l_@@_tmp_tl { \token_to_str:N : }
{
- \bool_set_false:N \l_@@_error_bool
- \tl_set:Nn \l_@@_tmp_tl {#1}
- \tl_remove_all:Nn \l_@@_tmp_tl { ~ }
- \tl_replace_all:Nnn \l_@@_tmp_tl { : } { @ }
- \tl_if_in:onTF \l_@@_tmp_tl { @ }
+ \exp_not:n
{
\tl_clear:N \l_@@_key_name_tl
\exp_after:wN \@@_split_keytype_aux:w
\l_@@_tmp_tl \q_stop
}
- {
- \bool_set_true:N \l_@@_error_bool
- \msg_error:nnx { xtemplate } { missing-keytype } {#1}
- }
}
- \cs_new_protected:Npn \@@_split_keytype_aux:w #1 @ #2 \q_stop
{
- \tl_put_right:Nx \l_@@_key_name_tl { \tl_to_str:n {#1} }
- \tl_if_in:nnTF {#2} { @ }
+ \exp_not:N \bool_set_true:N \exp_not:N \l_@@_error_bool
+ \msg_error:nnx { xtemplate } { missing-keytype } {#1}
+ }
+ }
+\use:x
+ {
+ \cs_new_protected:Npn \exp_not:N \@@_split_keytype_aux:w
+ ##1 \token_to_str:N : ##2 \exp_not:N \q_stop
+ {
+ \tl_put_right:Nx \exp_not:N \l_@@_key_name_tl
+ { \exp_not:N \tl_to_str:n {##1} }
+ \tl_if_in:nnTF {##2} { \token_to_str:N : }
{
- \tl_put_right:Nn \l_@@_key_name_tl { @ }
- \@@_split_keytype_aux:w #2 \q_stop
+ \tl_put_right:Nn \exp_not:N \l_@@_key_name_tl
+ { \token_to_str:N : }
+ \exp_not:N \@@_split_keytype_aux:w ##2 \exp_not:N \q_stop
}
{
- \tl_if_empty:NTF \l_@@_key_name_tl
- { \msg_error:nnx { xtemplate } { empty-key-name } { @ #2 } }
- { \@@_split_keytype_arg:n {#2} }
+ \exp_not:N \tl_if_empty:NTF \exp_not:N \l_@@_key_name_tl
+ {
+ \msg_error:nnx { xtemplate } { empty-key-name }
+ { \token_to_str:N : ##2 }
+ }
+ { \exp_not:N \@@_split_keytype_arg:n {##2} }
}
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the latex3-commits
mailing list