[latex3-commits] [git/LaTeX3-latex3-latex3] master: Freeze all catcodes 0-127 when defining \c_code_cctab/\c_document_cctab (c0e7b1881)
Joseph Wright
joseph.wright at morningstar2.co.uk
Thu Jul 16 12:13:16 CEST 2020
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/c0e7b18810489bd4e720fd9c3e9a277241da70ae
>---------------------------------------------------------------
commit c0e7b18810489bd4e720fd9c3e9a277241da70ae
Author: Bruno Le Floch <bruno at le-floch.fr>
Date: Wed Jul 15 00:18:14 2020 +0200
Freeze all catcodes 0-127 when defining \c_code_cctab/\c_document_cctab
>---------------------------------------------------------------
c0e7b18810489bd4e720fd9c3e9a277241da70ae
l3kernel/l3cctab.dtx | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/l3kernel/l3cctab.dtx b/l3kernel/l3cctab.dtx
index f789093dc..a50b17cdf 100644
--- a/l3kernel/l3cctab.dtx
+++ b/l3kernel/l3cctab.dtx
@@ -783,16 +783,33 @@
\@@_new:N \c_code_cctab
\group_begin:
\int_set:Nn \tex_endlinechar:D { 32 }
+ \char_set_catcode_invalid:n { 0 }
+ \bool_lazy_or:nnTF
+ { \sys_if_engine_xetex_p: } { \sys_if_engine_luatex_p: }
+ { \int_step_function:nN { 31 } \char_set_catcode_invalid:n }
+ { \int_step_function:nN { 31 } \char_set_catcode_active:n }
+ \int_step_function:nnN { 33 } { 64 } \char_set_catcode_other:n
+ \int_step_function:nnN { 65 } { 90 } \char_set_catcode_letter:n
+ \int_step_function:nnN { 91 } { 96 } \char_set_catcode_other:n
+ \int_step_function:nnN { 97 } { 122 } \char_set_catcode_letter:n
\char_set_catcode_ignore:n { 9 } % tab
+ \char_set_catcode_other:n { 10 } % lf
+ \char_set_catcode_active:n { 12 } % ff
+ \char_set_catcode_end_line:n { 13 } % cr
\char_set_catcode_ignore:n { 32 } % space
- \char_set_catcode_other:n { 34 } % double quote
+ \char_set_catcode_parameter:n { 35 } % hash
+ \char_set_catcode_math_toggle:n { 36 } % dollar
+ \char_set_catcode_comment:n { 37 } % percent
\char_set_catcode_alignment:n { 38 } % ampersand
\char_set_catcode_letter:n { 58 } % colon
- \char_set_catcode_other:n { 64 } % at sign
+ \char_set_catcode_escape:n { 92 } % backslash
\char_set_catcode_math_superscript:n { 94 } % circumflex
\char_set_catcode_letter:n { 95 } % underscore
+ \char_set_catcode_group_begin:n { 123 } % left brace
\char_set_catcode_other:n { 124 } % pipe
+ \char_set_catcode_group_end:n { 125 } % right brace
\char_set_catcode_space:n { 126 } % tilde
+ \char_set_catcode_invalid:n { 127 } % ^^?
\@@_gset:n { \c_code_cctab }
\group_end:
\cctab_const:Nn \c_document_cctab
@@ -802,7 +819,6 @@
\char_set_catcode_space:n { 9 }
\char_set_catcode_space:n { 32 }
\char_set_catcode_other:n { 58 }
- \char_set_catcode_other:n { 64 }
\char_set_catcode_math_subscript:n { 95 }
\char_set_catcode_active:n { 126 }
}
More information about the latex3-commits
mailing list.