[latex3-commits] [git/LaTeX3-latex3-latex3] l3text: Preserve catcode in case changing (76e8411b5)
Joseph Wright
joseph.wright at morningstar2.co.uk
Tue Dec 3 09:45:49 CET 2019
Repository : https://github.com/latex3/latex3
On branch : l3text
Link : https://github.com/latex3/latex3/commit/76e8411b59e57c8401ec73fa9660ba4d9a90ca4b
>---------------------------------------------------------------
commit 76e8411b59e57c8401ec73fa9660ba4d9a90ca4b
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Tue Dec 3 08:45:49 2019 +0000
Preserve catcode in case changing
As far as possible: most accent marks are
catcode-11 anyway as-standard.
>---------------------------------------------------------------
76e8411b59e57c8401ec73fa9660ba4d9a90ca4b
l3kernel/l3text.dtx | 32 ++++++++++++++++----------------
l3kernel/l3token.dtx | 2 +-
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/l3kernel/l3text.dtx b/l3kernel/l3text.dtx
index 94a2360b7..31e2fbd0d 100644
--- a/l3kernel/l3text.dtx
+++ b/l3kernel/l3text.dtx
@@ -1523,8 +1523,8 @@
}
{
\char_generate:nn { "0069 } { \@@_char_catcode:N #4 }
- \char_generate:nn { "0307 } { \char_value_catcode:n { "0307 } }
- \char_generate:nn {#1} { \char_value_catcode:n {#1} }
+ \char_generate:nn { "0307 } { \@@_char_catcode:N #4 }
+ \char_generate:nn {#1} { \@@_char_catcode:N #4 }
\@@_change_case_loop:nnw {#2} {#3}
}
}
@@ -1561,7 +1561,7 @@
{ \int_compare_p:nNn { `#3 } = { "0303 } }
}
}
- { \char_generate:nn { "0307 } { \char_value_catcode:n { "0307 } } }
+ { \char_generate:nn { "0307 } { \@@_char_catcode:N #3 } }
\@@_change_case_loop:nnw {#1} {#2} #3
}
}
@@ -1672,9 +1672,9 @@
% \end{macro}
%
% \begin{macro}[rEXP]{\@@_change_case_lower_tr:nnnN}
-% \begin{macro}[rEXP]{\@@_change_case_lower_tr:nnw}
-% \begin{macro}[rEXP]{\@@_change_case_lower_tr_aux:nnN}
-% \begin{macro}[rEXP]{\@@_change_case_lower_tr_aux:nnnNN}
+% \begin{macro}[rEXP]{\@@_change_case_lower_tr:nnNw}
+% \begin{macro}[rEXP]{\@@_change_case_lower_tr:nnN}
+% \begin{macro}[rEXP]{\@@_change_case_lower_tr:nnnNN}
% The Turkic languages need special treatment for dotted-i and dotless-i.
% The lower casing rule can be expressed in terms of searching first for
% either a dotless-I or a dotted-I. In the latter case the mapping is
@@ -1687,7 +1687,7 @@
\cs_new:Npn \@@_change_case_lower_tr:nnnN #1#2#3#4
{
\int_compare:nNnTF { `#4 } = { "0049 }
- { \@@_change_case_lower_tr:nnw {#1} {#3} }
+ { \@@_change_case_lower_tr:nnNw {#1} {#3} #4 }
{
\int_compare:nNnTF { `#4 } = { "0130 }
{
@@ -1703,27 +1703,27 @@
% combination is found both the dotless-I and the dot-above char have to
% be removed from the input.
% \begin{macrocode}
- \cs_new:Npn \@@_change_case_lower_tr:nnw #1#2#3 \q_recursion_stop
+ \cs_new:Npn \@@_change_case_lower_tr:nnNw #1#2#3#4 \q_recursion_stop
{
- \tl_if_head_is_N_type:nTF {#3}
- { \@@_change_case_lower_tr_aux:nnN }
+ \tl_if_head_is_N_type:nTF {#4}
+ { \@@_change_case_lower_tr:nnN }
{
- \char_generate:nn { "0131 } { \char_value_catcode:n { "0049 } }
+ \char_generate:nn { "0131 } { \@@_char_catcode:N #3 }
\@@_change_case_loop:nnw
}
- {#1} {#2} #3 \q_recursion_stop
+ {#1} {#2} #4 \q_recursion_stop
}
- \cs_new:Npn \@@_change_case_lower_tr_aux:nnN #1#2#3
+ \cs_new:Npn \@@_change_case_lower_tr:nnN #1#2#3
{
\bool_lazy_or:nnTF
{ \token_if_cs_p:N #3 }
{ ! \int_compare_p:nNn { `#3 } = { "0307 } }
{
- \char_generate:nn { "0131 } { \char_value_catcode:n { "0130 } }
+ \char_generate:nn { "0131 } { \@@_char_catcode:N #3 }
\@@_change_case_loop:nnw {#1} {#2} #3
}
{
- \char_generate:nn { "0069 } { \char_value_catcode:n { "0130 } }
+ \char_generate:nn { "0069 } { \@@_char_catcode:N #3 }
\@@_change_case_loop:nnw {#1} {#2}
}
}
@@ -1779,7 +1779,7 @@
{ \sys_if_engine_xetex_p: }
{
\exp_not:N \char_generate:nn { "0130 }
- { \exp_not:N \char_value_catcode:n { "0069 } }
+ { \exp_not:N \@@_char_catcode:N #4 }
}
{
\exp_not:N \exp_not:V
diff --git a/l3kernel/l3token.dtx b/l3kernel/l3token.dtx
index 05e239c2d..d2f491b01 100644
--- a/l3kernel/l3token.dtx
+++ b/l3kernel/l3token.dtx
@@ -1877,7 +1877,7 @@
\tl_if_blank:nF {#3}
{
\exp_args:Ne \@@_to_nfd:n
- { \char_generate:nn { `#3 } { \char_value_catcode:n { `#3 } } }
+ { \char_generate:nn { `#3 } { \@@_change_case_catcode:N #1 } }
}
}
% \end{macrocode}
More information about the latex3-commits
mailing list