[latex3-commits] [latex3/latex3] main: Move implementation of \c_catcode_active_space_tl to l3token (86bd5a68d)

github at latex-project.org github at latex-project.org
Fri May 5 14:15:29 CEST 2023


Repository : https://github.com/latex3/latex3
On branch  : main
Link       : https://github.com/latex3/latex3/commit/86bd5a68d8cc67b62856c52b253d22509b3ec03e

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

commit 86bd5a68d8cc67b62856c52b253d22509b3ec03e
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri May 5 13:15:29 2023 +0100

    Move implementation of \c_catcode_active_space_tl to l3token


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

86bd5a68d8cc67b62856c52b253d22509b3ec03e
 l3kernel/l3candidates.dtx | 17 -----------------
 l3kernel/l3token.dtx      | 15 +++++++++++++++
 2 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/l3kernel/l3candidates.dtx b/l3kernel/l3candidates.dtx
index bfc22c434..f180f42c5 100644
--- a/l3kernel/l3candidates.dtx
+++ b/l3kernel/l3candidates.dtx
@@ -704,23 +704,6 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{Additions to \pkg{l3token}}
-%
-% \begin{variable}{\c_catcode_active_space_tl}
-%   While \cs{char_generate:nn} can produce active characters in some
-%   engines it cannot in general.  It would be possible to simply change
-%   the catcode of space but then the code would need to avoid all
-%   spaces, making it quite unreadable.  Instead we use the primitive
-%   \cs{tex_lowercase:D} trick.
-%    \begin{macrocode}
-\group_begin:
-  \char_set_catcode_active:N *
-  \char_set_lccode:nn { `* } { `\ }
-  \tex_lowercase:D { \tl_const:Nn \c_catcode_active_space_tl { * } }
-\group_end:
-%    \end{macrocode}
-% \end{variable}
-%
 %    \begin{macrocode}
 %</package>
 %    \end{macrocode}
diff --git a/l3kernel/l3token.dtx b/l3kernel/l3token.dtx
index d5a4a4ede..f54283903 100644
--- a/l3kernel/l3token.dtx
+++ b/l3kernel/l3token.dtx
@@ -1843,6 +1843,21 @@
 % \end{macro}
 % \end{macro}
 %
+% \begin{variable}{\c_catcode_active_space_tl}
+%   While \cs{char_generate:nn} can produce active characters in some
+%   engines it cannot in general.  It would be possible to simply change
+%   the catcode of space but then the code would need to avoid all
+%   spaces, making it quite unreadable.  Instead we use the primitive
+%   \cs{tex_lowercase:D} trick.
+%    \begin{macrocode}
+\group_begin:
+  \char_set_catcode_active:N *
+  \char_set_lccode:nn { `* } { `\ }
+  \tex_lowercase:D { \tl_const:Nn \c_catcode_active_space_tl { * } }
+\group_end:
+%    \end{macrocode}
+% \end{variable}
+%
 % \begin{macro}{\c_catcode_other_space_tl}
 %   Create a space with category code $12$: an \enquote{other} space.
 %    \begin{macrocode}





More information about the latex3-commits mailing list.