[latex3-commits] [latex3/latex2e] avoid-lowercase: Remove \tex_lowercase:D in ltcmd (baf0235c)

github at latex-project.org github at latex-project.org
Wed Nov 29 16:35:44 CET 2023


Repository : https://github.com/latex3/latex2e
On branch  : avoid-lowercase
Link       : https://github.com/latex3/latex2e/commit/baf0235c9141fdc27571a342db0fc0201476c957

>---------------------------------------------------------------

commit baf0235c9141fdc27571a342db0fc0201476c957
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Nov 29 15:16:21 2023 +0000

    Remove \tex_lowercase:D in ltcmd
    
    This will be slightly slower but means we stick
    to our own rules.


>---------------------------------------------------------------

baf0235c9141fdc27571a342db0fc0201476c957
 base/changes.txt |  4 ++++
 base/ltcmd.dtx   | 25 +++++++++----------------
 2 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index 46da3f70..6f18c897 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,10 @@ to completeness or accuracy and it contains some references to files that are
 not part of the distribution.
 ================================================================================
 
+2023-11-29  Joseph Wright  <Joseph.Wright at latex-project.org>
+	* ltcmd.dtx (subsection{Argument processors}):
+	Remove use of \tex_lowercase:D
+
 2023-11-16  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 	* ltpara.dtx (subsection{Providing hooks for paragraphs}):
 	Correct error message: hook left horizontal not vertical mode (gh/1182)
diff --git a/base/ltcmd.dtx b/base/ltcmd.dtx
index dcb85a1a..7588fdaf 100644
--- a/base/ltcmd.dtx
+++ b/base/ltcmd.dtx
@@ -34,8 +34,8 @@
 %%% From File: ltcmd.dtx
 %
 %    \begin{macrocode}
-\def\ltcmdversion{v1.2a}
-\def\ltcmddate{2023-08-19}
+\def\ltcmdversion{v1.2b}
+\def\ltcmddate{2023-11-29}
 %    \end{macrocode}
 %
 %<*driver>
@@ -85,13 +85,8 @@
 % \changes{v1.0e}{2021/05/24}{Use \cs{msg_...} instead of \cs{__kernel_msg..}}
 %
 %
-% \pkg{ltcmd} code contains an |^^@| character, which usually has
-% catcode~15, so \cs{IncludeInRelease} will break when this code is
-% being skipped, so we'll save the catcode of |^^@| to restore later:
 %    \begin{macrocode}
 %<*2ekernel|latexrelease>
-%<latexrelease>\edef\@latexrelease at catcode@null{\the\catcode`\^^@ }
-%<latexrelease>\catcode`\^^@=12
 \ExplSyntaxOn
 %<latexrelease>\NewModuleRelease{2020/10/01}{ltcmd}
 %<latexrelease>                 {Document~command~parser}%
@@ -3966,6 +3961,7 @@
 % \begin{macro}{\@@_split_list:nn}
 % \begin{macro}{\@@_split_list_multi:nn, \@@_split_list_multi:nV}
 % \begin{macro}{\@@_split_list_single:Nn}
+% \changes{v1.2b}{2023/11/29}{Remove use of \cs{tex_lowercase:D}}
 %   Splitting can take place either at a single token or at a longer
 %   identifier. To deal with single active tokens, a two-part procedure is
 %   needed.
@@ -3991,18 +3987,16 @@
   }
 \cs_generate_variant:Nn \@@_split_list_multi:nn { nV }
 \group_begin:
-\char_set_catcode_active:N \^^@
 \cs_new_protected:Npn \@@_split_list_single:Nn #1#2
   {
     \tl_set:Nn \l_@@_split_list_tl {#2}
     \group_begin:
-    \char_set_lccode:nn { `\^^@ } { `#1 }
-    \tex_lowercase:D
-      {
-        \group_end:
-        \tl_replace_all:Nnn \l_@@_split_list_tl { ^^@ }
-      }   {#1}
-     \@@_split_list_multi:nV {#1} \l_@@_split_list_tl
+      \char_set_active_eq:NN #1 \scan_stop:
+      \tl_replace_all:Nen \l_@@_split_list_tl
+        { \char_generate:nn { `#1 } { 13 } } {#1}
+    \exp_args:NNNV \group_end:
+    \tl_set:Nn \l_@@_split_list_tl \l_@@_split_list_tl
+    \@@_split_list_multi:nV {#1} \l_@@_split_list_tl
    }
 \group_end:
 %    \end{macrocode}
@@ -5054,7 +5048,6 @@
 %                {Move latexrelease redefinitions from ltcmd.dtx}
 %    \begin{macrocode}
 %<latexrelease>\@ifundefined{ExplSyntaxOff}{}{\latexrelease at postltcmd}
-%<latexrelease>\catcode`\^^@=\@latexrelease at catcode@null\relax
 %</2ekernel|latexrelease>
 %    \end{macrocode}
 %





More information about the latex3-commits mailing list.