summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-07-23 17:15:00 +0000
committerKarl Berry <karl@freefriends.org>2012-07-23 17:15:00 +0000
commit134349701bddf7cbbacf6030c6b9f9838aff96fa (patch)
treeec1140c46e1c0347a671a6fa3cf8af5a79e95f93 /Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
parentf7855c12c18bb97b7b9e49ab685ee558d8c0b47b (diff)
l3kernel 3990 (17jul12)
git-svn-id: svn://tug.org/texlive/trunk@27108 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx113
1 files changed, 63 insertions, 50 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
index 212c953b2aa..5fbaea8cbd6 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3luatex.dtx 3355 2012-02-09 07:18:22Z joseph $
+\GetIdInfo$Id: l3luatex.dtx 3986 2012-07-15 19:23:51Z joseph $
{L3 Experimental LuaTeX-specific functions}
%</driver|package>
%<*driver>
@@ -158,7 +158,7 @@
% \cs{cctab_gset:Nn} \meta{category code table} \Arg{category code set up}
% \end{syntax}
% Sets the \meta{category code table} to apply the category codes
-% which apply when the prevailing regime is modified by the
+% which apply when the prevailing r{\'e}gime is modified by the
% \meta{category code set up}. Thus within a standard code block
% the starting point will be the code applied by \cs{c_code_cctab}.
% The assignment of the table is global: the underlying primitive does
@@ -226,27 +226,17 @@
%<*package>
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\package_check_loaded_expl:
+\__expl_package_check:
%</package>
% \end{macrocode}
%
-% An error message.
-% \begin{macrocode}
-\msg_kernel_new:nnnn { luatex } { bad-engine }
- { LuaTeX~engine~not~in~use!~Ignoring~#1. }
- {
- The~feature~you~are~using~is~only~available~
- with~the~LuaTeX~engine.~LaTeX3~ignored~`#1#2'.
- }
-% \end{macrocode}
-%
% \begin{macro}{\lua_now:n, \lua_now:x}
% \begin{macro}{\lua_shipout_x:n, \lua_shipout_x:x}
% \begin{macro}{\lua_shipout:n, \lua_shipout:x}
% When \LuaTeX{} is in use, this is all a question of primitives with new
% names. On the other hand, for \pdfTeX{} and \XeTeX{} the argument should
% be removed from the input stream before issuing an error. This is
-% expandable, using \cs{msg_expandable_kernel_error:nnn}
+% expandable, using \cs{__msg_kernel_expandable_error:nnn}
% as done for \texttt{V}-type expansion in \pkg{l3expan}.
% \begin{macrocode}
\luatex_if_engine:TF
@@ -257,13 +247,13 @@
{
\cs_new:Npn \lua_now:x #1
{
- \msg_expandable_kernel_error:nnn
- { luatex } { bad-engine } { \lua_now:x }
+ \__msg_kernel_expandable_error:nnn
+ { kernel } { bad-engine } { \lua_now:x }
}
\cs_new_protected:Npn \lua_shipout_x:n #1
{
- \msg_expandable_kernel_error:nnn
- { luatex } { bad-engine } { \lua_shipout_x:n }
+ \__msg_kernel_expandable_error:nnn
+ { kernel } { bad-engine } { \lua_shipout_x:n }
}
}
\cs_new:Npn \lua_now:n #1
@@ -279,17 +269,21 @@
%
% \subsection{Category code tables}
%
-% \begin{variable}{\g_cctab_allocate_int}
-% \begin{variable}{\g_cctab_stack_int}
-% \begin{variable}{\g_cctab_stack_seq}
+% \begin{macrocode}
+%<@@=cctab>
+% \end{macrocode}
+%
+% \begin{variable}{\g_@@_allocate_int}
+% \begin{variable}{\g_@@_stack_int}
+% \begin{variable}{\g_@@_stack_seq}
% To allocate category code tables, both the read-only and stack
% tables need to be followed. There is also a sequence stack for the
% dynamic tables themselves.
% \begin{macrocode}
-\int_new:N \g_cctab_allocate_int
-\int_set:Nn \g_cctab_allocate_int { \c_minus_one }
-\int_new:N \g_cctab_stack_int
-\seq_new:N \g_cctab_stack_seq
+\int_new:N \g_@@_allocate_int
+\int_set:Nn \g_@@_allocate_int { \c_minus_one }
+\int_new:N \g_@@_stack_int
+\seq_new:N \g_@@_stack_seq
% \end{macrocode}
% \end{variable}
% \end{variable}
@@ -306,21 +300,21 @@
% \begin{macrocode}
\cs_new_protected:Npn \cctab_new:N #1
{
- \chk_if_free_cs:N #1
- \int_gadd:Nn \g_cctab_allocate_int { \c_two }
+ \__chk_if_free_cs:N #1
+ \int_gadd:Nn \g_@@_allocate_int { \c_two }
\int_compare:nNnTF
- \g_cctab_allocate_int < { \c_max_register_int + \c_one }
+ \g_@@_allocate_int < { \c_max_register_int + \c_one }
{
- \tex_global:D \tex_chardef:D #1 \g_cctab_allocate_int
+ \tex_global:D \tex_chardef:D #1 \g_@@_allocate_int
\luatex_initcatcodetable:D #1
}
- { \msg_kernel_fatal:nnx { kernel } { out-of-registers } { cctab } }
+ { \__msg_kernel_fatal:nnx { kernel } { out-of-registers } { cctab } }
}
\luatex_if_engine:F
{
\cs_set_protected:Npn \cctab_new:N #1
{
- \msg_kernel_error:nnx { luatex } { bad-engine }
+ \__msg_kernel_error:nnx { kernel } { bad-engine }
{ \exp_not:N \cctab_new:N }
}
}
@@ -329,7 +323,7 @@
{
\cs_set_protected:Npn \cctab_new:N #1
{
- \chk_if_free_cs:N #1
+ \__chk_if_free_cs:N #1
\newcatcodetable #1
\luatex_initcatcodetable:D #1
}
@@ -340,39 +334,39 @@
%
% \begin{macro}{\cctab_begin:N}
% \begin{macro}{\cctab_end:}
-% \begin{variable}{\l_cctab_internal_tl}
+% \begin{variable}{\l_@@_internal_tl}
% The aim here is to ensure that the saved tables are read-only. This is
% done by using a stack of tables which are not read only, and actually
% having them as \enquote{in use} copies.
% \begin{macrocode}
\cs_new_protected:Npn \cctab_begin:N #1
{
- \seq_gpush:Nx \g_cctab_stack_seq { \tex_the:D \luatex_catcodetable:D }
+ \seq_gpush:Nx \g_@@_stack_seq { \tex_the:D \luatex_catcodetable:D }
\luatex_catcodetable:D #1
- \int_gadd:Nn \g_cctab_stack_int { \c_two }
- \int_compare:nNnT \g_cctab_stack_int > \c_max_register_int
- { \msg_kernel_fatal:nn { code } { cctab-stack-full } }
- \luatex_savecatcodetable:D \g_cctab_stack_int
- \luatex_catcodetable:D \g_cctab_stack_int
+ \int_gadd:Nn \g_@@_stack_int { \c_two }
+ \int_compare:nNnT \g_@@_stack_int > \c_max_register_int
+ { \__msg_kernel_fatal:nn { kernel } { cctab-stack-full } }
+ \luatex_savecatcodetable:D \g_@@_stack_int
+ \luatex_catcodetable:D \g_@@_stack_int
}
\cs_new_protected_nopar:Npn \cctab_end:
{
- \int_gsub:Nn \g_cctab_stack_int { \c_two }
- \seq_if_empty:NTF \g_cctab_stack_seq
- { \tl_set:Nn \l_cctab_internal_tl { 0 } }
- { \seq_gpop:NN \g_cctab_stack_seq \l_cctab_internal_tl }
- \luatex_catcodetable:D \l_cctab_internal_tl \scan_stop:
+ \int_gsub:Nn \g_@@_stack_int { \c_two }
+ \seq_if_empty:NTF \g_@@_stack_seq
+ { \tl_set:Nn \l_@@_internal_tl { 0 } }
+ { \seq_gpop:NN \g_@@_stack_seq \l_@@_internal_tl }
+ \luatex_catcodetable:D \l_@@_internal_tl \scan_stop:
}
\luatex_if_engine:F
{
\cs_set_protected:Npn \cctab_begin:N #1
{
- \msg_kernel_error:nnxx { luatex } { bad-engine }
+ \__msg_kernel_error:nnxx { kernel } { bad-engine }
{ \exp_not:N \cctab_begin:N } {#1}
}
\cs_set_protected_nopar:Npn \cctab_end:
{
- \msg_kernel_error:nnx { luatex } { bad-engine }
+ \__msg_kernel_error:nnx { kernel } { bad-engine }
{ \exp_not:N \cctab_end: }
}
}
@@ -383,7 +377,7 @@
\cs_set_protected_nopar:Npn \cctab_end: { \EndCatcodeRegime }
}
%</package>
-\tl_new:N \l_cctab_internal_tl
+\tl_new:N \l_@@_internal_tl
% \end{macrocode}
% \end{variable}
% \end{macro}
@@ -405,7 +399,7 @@
{
\cs_set_protected:Npn \cctab_gset:Nn #1#2
{
- \msg_kernel_error:nnxx { luatex } { bad-engine }
+ \__msg_kernel_error:nnxx { kernel } { bad-engine }
{ \exp_not:N \cctab_gset:Nn } { #1 {#2} }
}
}
@@ -454,12 +448,12 @@
}
\cctab_gset:Nn \c_other_cctab
{
- \prg_stepwise_inline:nnnn { 0 } { 1 } { 127 }
+ \int_step_inline:nnnn { 0 } { 1 } { 127 }
{ \char_set_catcode_other:n {#1} }
}
\cctab_gset:Nn \c_str_cctab
{
- \prg_stepwise_inline:nnnn { 0 } { 1 } { 127 }
+ \int_step_inline:nnnn { 0 } { 1 } { 127 }
{ \char_set_catcode_other:n {#1} }
\char_set_catcode_space:n { 32 }
}
@@ -471,6 +465,23 @@
% \end{variable}
% \end{variable}
% \end{variable}
+%
+% \subsection{Messages}
+%
+% \begin{macrocode}
+\__msg_kernel_new:nnnn { kernel } { bad-engine }
+ { LuaTeX~engine~not~in~use!~Ignoring~#1. }
+ {
+ The~feature~you~are~using~is~only~available~
+ with~the~LuaTeX~engine.~LaTeX3~ignored~`#1#2'.
+ }
+\__msg_kernel_new:nnnn { kernel } { cctab-stack-full }
+ { The~category~code~table~stack~is~exhausted. }
+ {
+ LaTeX~has~been~asked~to~switch~to~a~new~category~code~table,~
+ but~there~is~no~more~space~to~do~this!
+ }
+% \end{macrocode}
%
% \subsection{Deprecated functions}
%
@@ -478,7 +489,9 @@
%
% \begin{variable}{\c_string_cctab}
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \c_string_cctab \c_str_cctab
+%</deprecated>
% \end{macrocode}
% \end{variable}
%