[latex3-commits] [l3svn] 02/02: Remove \tl_to_lowercase:n from xparse
noreply at latex-project.org
noreply at latex-project.org
Wed Sep 23 17:24:30 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 ec6e1221caf23038135648b76ff654e13176b656
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Wed Sep 23 16:23:25 2015 +0100
Remove \tl_to_lowercase:n from xparse
All of these could be done using \char_generate:nn. However,
for performance of grabbing document args it seems best to
go with the primitive here.
---
l3packages/xparse/xparse.dtx | 53 ++++++++++++++++++------------------------
1 file changed, 22 insertions(+), 31 deletions(-)
diff --git a/l3packages/xparse/xparse.dtx b/l3packages/xparse/xparse.dtx
index adda99c..366f965 100644
--- a/l3packages/xparse/xparse.dtx
+++ b/l3packages/xparse/xparse.dtx
@@ -717,15 +717,8 @@
% different category codes. This is used as the marker for nothing being
% returned when no optional argument is given.
% \begin{macrocode}
-\group_begin:
-\char_set_lccode:nn { `\Q } { `\- }
-\char_set_lccode:nn { `\N } { `\N }
-\char_set_lccode:nn { `\V } { `\V }
-\tl_to_lowercase:n
- {
- \group_end:
- \tl_const:Nn \c_@@_no_value_tl { QNoValue- }
- }
+\tl_const:Nx \c_@@_no_value_tl
+ { \char_generate:nn { `\- } { 11 } NoValue- }
% \end{macrocode}
% \end{variable}
%
@@ -1936,7 +1929,7 @@
\token_if_eq_catcode:NNTF #1 ^
{
\char_set_lccode:nn { `A } { `#1 }
- \tl_to_lowercase:n
+ \tex_lowercase:D
{
\group_end:
\l_@@_fn_tl A
@@ -1944,7 +1937,7 @@
}
{
\char_set_lccode:nn { `^ } { `#1 }
- \tl_to_lowercase:n
+ \tex_lowercase:D
{
\group_end:
\l_@@_fn_tl ^
@@ -2536,7 +2529,7 @@
\@@_add_arg:o \c_@@_no_value_tl
\group_begin:
\char_set_lccode:nn { `\# } { \tex_endlinechar:D }
- \tl_to_lowercase:n
+ \tex_lowercase:D
{ \group_end: \peek_meaning_remove:NTF ## }
{
\__msg_kernel_error:nnxxx { xparse } { verbatim-newline }
@@ -2960,7 +2953,7 @@
\tl_set:Nn \l_@@_split_list_tl {#2}
\group_begin:
\char_set_lccode:nn { `\@ } { `#1 }
- \tl_to_lowercase:n
+ \tex_lowercase:n
{
\group_end:
\tl_replace_all:Nnn \l_@@_split_list_tl { @ } {#1}
@@ -3112,24 +3105,22 @@
% up to be expandable. The question mark prevents the auxiliary from
% losing braces.
% \begin{macrocode}
-\group_begin:
-\char_set_lccode:nn { `\Q } { `\- }
-\char_set_lccode:nn { `\F } { `\F }
-\char_set_lccode:nn { `\N } { `\N }
-\char_set_lccode:nn { `\T } { `\T }
-\char_set_lccode:nn { `\V } { `\V }
-\tl_to_lowercase:n
- {
- \group_end:
- \prg_new_conditional:Npnn \@@_if_no_value:n #1 { T , F , TF }
- {
- \str_if_eq:onTF
- { \@@_if_value_aux:w ? #1 { } QNoValue- }
- { ? { } QNoValue- }
- { \prg_return_true: }
- { \prg_return_false: }
- }
- \cs_new:Npn \@@_if_value_aux:w #1 QNoValue- { #1 }
+\use:x
+ {
+ \prg_new_conditional:Npnn \exp_not:N \@@_if_no_value:n ##1
+ { T , F , TF }
+ {
+ \exp_not:N \str_if_eq:onTF
+ {
+ \exp_not:N \@@_if_value_aux:w ? ##1 { }
+ \c_@@_no_value_tl
+ }
+ { ? { } \c_@@_no_value_tl }
+ { \exp_not:N \prg_return_true: }
+ { \exp_not:N \prg_return_false: }
+ }
+ \cs_new:Npn \exp_not:N \@@_if_value_aux:w ##1 \c_@@_no_value_tl
+ { ##1 }
}
% \end{macrocode}
% \end{macro}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the latex3-commits
mailing list