% \iffalse meta-comment
%
%% File: l3names.dtx Copyright (C) 1990-2015 The LaTeX3 project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
%% license or (at your option) any later version.  The latest version
%% of this license is in the file
%%
%%    http://www.latex-project.org/lppl.txt
%%
%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
%%
%% -----------------------------------------------------------------------
%%
%% The development version of the bundle can be found at
%%
%%    http://www.latex-project.org/svnroot/experimental/trunk/
%%
%% for those people who are interested.
%%
%%%%%%%%%%%
%% NOTE: %%
%%%%%%%%%%%
%%
%%   Snapshots taken from the repository represent work in progress and may
%%   not work or may contain conflicting material!  We therefore ask
%%   people _not_ to put them into distributions, archives, etc. without
%%   prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
\GetIdInfo$Id: l3names.dtx 5535 2015-02-24 09:11:19Z joseph $
  {L3 Namespace for primitives}
%</driver|package>
%<*driver>
\begin{document}
  \DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%
% \title{^^A
%   The \pkg{l3names} package\\ Namespace for primitives^^A
%   \thanks{This file describes v\ExplFileVersion,
%      last revised \ExplFileDate.}^^A
% }
%
% \author{^^A
%  The \LaTeX3 Project\thanks
%    {^^A
%      E-mail:
%        \href{mailto:latex-team@latex-project.org}
%          {latex-team@latex-project.org}^^A
%    }^^A
% }
%
% \date{Released \ExplFileDate}
%
% \maketitle
%
% \begin{documentation}
%
% \section{Setting up the \LaTeX3 programming language}
%
% This module is at the core of the \LaTeX3 programming language. It
% performs the following tasks:
% \begin{itemize}
%   \item defines new names for all \TeX{} primitives;
%   \item switches to the category code r{\'e}gime for programming;
%   \item provides support settings for building the code as a \TeX{} format.
% \end{itemize}
%
% This module is entirely dedicated to primitives, which should not
% be used directly within \LaTeX3 code (outside of \enquote{kernel-level}
% code). As such, the primitives are not documented here:
% \emph{The \TeX{}book}, \emph{\TeX{} by Topic} and the manuals for
% \pdfTeX{}, \XeTeX{} and \LuaTeX{} should be consulted for details of
% the primitives. These are named based on the engine which first introduced
% them:
% \begin{itemize}
%   \item[\cs{tex_\ldots}] Introduced by \TeX{} itself;
%   \item[\cs{etex_\ldots}] Introduced by the \eTeX{} extensions;
%   \item[\cs{pdftex_\ldots}] Introduced by \pdfTeX{};
%   \item[\cs{xetex_\ldots}] Introduced by \XeTeX{};
%   \item[\cs{luatex_\ldots}] Introduced by \LuaTeX{}.
% \end{itemize}
%
% \end{documentation}
%
% \begin{implementation}
%
% \section{\pkg{l3names} implementation}
%
%    \begin{macrocode}
%<*initex|package>
%    \end{macrocode}
%
%  No prefix substitution here.
%    \begin{macrocode}
%<@@=>
%    \end{macrocode}
%
% The code here simply renames all of the primitives to new, internal,
% names. In format mode, it also deletes all of the existing names (although
% some do come back later).
%
% \begin{macro}{\tex_undefined:D}
%   This function does not exist at all, but is the name used by the
%   plain \TeX{} format for an undefined function. So it should
%   be marked here as \enquote{taken}.
% \end{macro}
%
% The \tn{let} primitive is renamed by hand first as it is essential for
% the entire process to follow. This also uses \tn{global}, as that way
% we avoid leaving an unneeded csname in the hash table.
%    \begin{macrocode}
\let \tex_global:D \global
\let \tex_let:D    \let
%    \end{macrocode}
%
% Everything is inside a (rather long) group, which keeps
% \cs{__kernel_primitive:NN} trapped.
%    \begin{macrocode}
\begingroup
%    \end{macrocode}
%
% \begin{macro}[aux]{\__kernel_primitive:NN}
%   A temporary function to actually do the renaming. This also allows the
%   original names to be removed in format mode.
%    \begin{macrocode}
  \long \def \__kernel_primitive:NN #1#2
    {
      \tex_global:D \tex_let:D #2 #1
%<*initex>
      \tex_global:D \tex_let:D #1 \tex_undefined:D
%</initex>
    }
%    \end{macrocode}
%\end{macro}
%
% To allow extracting \enquote{just the names}, a bit of DocStrip fiddling.
%    \begin{macrocode}
%</initex|package>
%<*initex|names|package>
%    \end{macrocode}
%
% In the current incarnation of this package, all \TeX{} primitives
% are given a new name of the form |\tex_|\emph{oldname}|:D|.
% But first three special cases which have symbolic original names.
% These are given modified new names, so that they may be entered
% without catcode tricks.
%    \begin{macrocode}
  \__kernel_primitive:NN \                         \tex_space:D
  \__kernel_primitive:NN \/                        \tex_italiccorrection:D
  \__kernel_primitive:NN \-                        \tex_hyphen:D
%    \end{macrocode}
%
% Now all the other primitives.
%    \begin{macrocode}
  \__kernel_primitive:NN \above                    \tex_above:D
  \__kernel_primitive:NN \abovedisplayshortskip    \tex_abovedisplayshortskip:D
  \__kernel_primitive:NN \abovedisplayskip         \tex_abovedisplayskip:D
  \__kernel_primitive:NN \abovewithdelims          \tex_abovewithdelims:D
  \__kernel_primitive:NN \accent                   \tex_accent:D
  \__kernel_primitive:NN \adjdemerits              \tex_adjdemerits:D
  \__kernel_primitive:NN \advance                  \tex_advance:D
  \__kernel_primitive:NN \afterassignment          \tex_afterassignment:D
  \__kernel_primitive:NN \aftergroup               \tex_aftergroup:D
  \__kernel_primitive:NN \atop                     \tex_atop:D
  \__kernel_primitive:NN \atopwithdelims           \tex_atopwithdelims:D
  \__kernel_primitive:NN \badness                  \tex_badness:D
  \__kernel_primitive:NN \baselineskip             \tex_baselineskip:D
  \__kernel_primitive:NN \batchmode                \tex_batchmode:D
  \__kernel_primitive:NN \begingroup               \tex_begingroup:D
  \__kernel_primitive:NN \belowdisplayshortskip    \tex_belowdisplayshortskip:D
  \__kernel_primitive:NN \belowdisplayskip         \tex_belowdisplayskip:D
  \__kernel_primitive:NN \binoppenalty             \tex_binoppenalty:D
  \__kernel_primitive:NN \botmark                  \tex_botmark:D
  \__kernel_primitive:NN \box                      \tex_box:D
  \__kernel_primitive:NN \boxmaxdepth              \tex_boxmaxdepth:D
  \__kernel_primitive:NN \brokenpenalty            \tex_brokenpenalty:D
  \__kernel_primitive:NN \catcode                  \tex_catcode:D
  \__kernel_primitive:NN \char                     \tex_char:D
  \__kernel_primitive:NN \chardef                  \tex_chardef:D
  \__kernel_primitive:NN \cleaders                 \tex_cleaders:D
  \__kernel_primitive:NN \closein                  \tex_closein:D
  \__kernel_primitive:NN \closeout                 \tex_closeout:D
  \__kernel_primitive:NN \clubpenalty              \tex_clubpenalty:D
  \__kernel_primitive:NN \copy                     \tex_copy:D
  \__kernel_primitive:NN \count                    \tex_count:D
  \__kernel_primitive:NN \countdef                 \tex_countdef:D
  \__kernel_primitive:NN \cr                       \tex_cr:D
  \__kernel_primitive:NN \crcr                     \tex_crcr:D
  \__kernel_primitive:NN \csname                   \tex_csname:D
  \__kernel_primitive:NN \day                      \tex_day:D
  \__kernel_primitive:NN \deadcycles               \tex_deadcycles:D
  \__kernel_primitive:NN \def                      \tex_def:D
  \__kernel_primitive:NN \defaulthyphenchar        \tex_defaulthyphenchar:D
  \__kernel_primitive:NN \defaultskewchar          \tex_defaultskewchar:D
  \__kernel_primitive:NN \delcode                  \tex_delcode:D
  \__kernel_primitive:NN \delimiter                \tex_delimiter:D
  \__kernel_primitive:NN \delimiterfactor          \tex_delimiterfactor:D
  \__kernel_primitive:NN \delimitershortfall       \tex_delimitershortfall:D
  \__kernel_primitive:NN \dimen                    \tex_dimen:D
  \__kernel_primitive:NN \dimendef                 \tex_dimendef:D
  \__kernel_primitive:NN \discretionary            \tex_discretionary:D
  \__kernel_primitive:NN \displayindent            \tex_displayindent:D
  \__kernel_primitive:NN \displaylimits            \tex_displaylimits:D
  \__kernel_primitive:NN \displaystyle             \tex_displaystyle:D
  \__kernel_primitive:NN \displaywidowpenalty      \tex_displaywidowpenalty:D
  \__kernel_primitive:NN \displaywidth             \tex_displaywidth:D
  \__kernel_primitive:NN \divide                   \tex_divide:D
  \__kernel_primitive:NN \doublehyphendemerits     \tex_doublehyphendemerits:D
  \__kernel_primitive:NN \dp                       \tex_dp:D
  \__kernel_primitive:NN \dump                     \tex_dump:D
  \__kernel_primitive:NN \edef                     \tex_edef:D
  \__kernel_primitive:NN \else                     \tex_else:D
  \__kernel_primitive:NN \emergencystretch         \tex_emergencystretch:D
  \__kernel_primitive:NN \end                      \tex_end:D
  \__kernel_primitive:NN \endcsname                \tex_endcsname:D
  \__kernel_primitive:NN \endgroup                 \tex_endgroup:D
  \__kernel_primitive:NN \endinput                 \tex_endinput:D
  \__kernel_primitive:NN \endlinechar              \tex_endlinechar:D
  \__kernel_primitive:NN \eqno                     \tex_eqno:D
  \__kernel_primitive:NN \errhelp                  \tex_errhelp:D
  \__kernel_primitive:NN \errmessage               \tex_errmessage:D
  \__kernel_primitive:NN \errorcontextlines        \tex_errorcontextlines:D
  \__kernel_primitive:NN \errorstopmode            \tex_errorstopmode:D
  \__kernel_primitive:NN \escapechar               \tex_escapechar:D
  \__kernel_primitive:NN \everycr                  \tex_everycr:D
  \__kernel_primitive:NN \everydisplay             \tex_everydisplay:D
  \__kernel_primitive:NN \everyhbox                \tex_everyhbox:D
  \__kernel_primitive:NN \everyjob                 \tex_everyjob:D
  \__kernel_primitive:NN \everymath                \tex_everymath:D
  \__kernel_primitive:NN \everypar                 \tex_everypar:D
  \__kernel_primitive:NN \everyvbox                \tex_everyvbox:D
  \__kernel_primitive:NN \exhyphenpenalty          \tex_exhyphenpenalty:D
  \__kernel_primitive:NN \expandafter              \tex_expandafter:D
  \__kernel_primitive:NN \fam                      \tex_fam:D
  \__kernel_primitive:NN \fi                       \tex_fi:D
  \__kernel_primitive:NN \finalhyphendemerits      \tex_finalhyphendemerits:D
  \__kernel_primitive:NN \firstmark                \tex_firstmark:D
  \__kernel_primitive:NN \floatingpenalty          \tex_floatingpenalty:D
  \__kernel_primitive:NN \font                     \tex_font:D
  \__kernel_primitive:NN \fontdimen                \tex_fontdimen:D
  \__kernel_primitive:NN \fontname                 \tex_fontname:D
  \__kernel_primitive:NN \futurelet                \tex_futurelet:D
  \__kernel_primitive:NN \gdef                     \tex_gdef:D
  \__kernel_primitive:NN \global                   \tex_global:D
  \__kernel_primitive:NN \globaldefs               \tex_globaldefs:D
  \__kernel_primitive:NN \halign                   \tex_halign:D
  \__kernel_primitive:NN \hangafter                \tex_hangafter:D
  \__kernel_primitive:NN \hangindent               \tex_hangindent:D
  \__kernel_primitive:NN \hbadness                 \tex_hbadness:D
  \__kernel_primitive:NN \hbox                     \tex_hbox:D
  \__kernel_primitive:NN \hfil                     \tex_hfil:D
  \__kernel_primitive:NN \hfill                    \tex_hfill:D
  \__kernel_primitive:NN \hfilneg                  \tex_hfilneg:D
  \__kernel_primitive:NN \hfuzz                    \tex_hfuzz:D
  \__kernel_primitive:NN \hoffset                  \tex_hoffset:D
  \__kernel_primitive:NN \holdinginserts           \tex_holdinginserts:D
  \__kernel_primitive:NN \hrule                    \tex_hrule:D
  \__kernel_primitive:NN \hsize                    \tex_hsize:D
  \__kernel_primitive:NN \hskip                    \tex_hskip:D
  \__kernel_primitive:NN \hss                      \tex_hss:D
  \__kernel_primitive:NN \ht                       \tex_ht:D
  \__kernel_primitive:NN \hyphenation              \tex_hyphenation:D
  \__kernel_primitive:NN \hyphenchar               \tex_hyphenchar:D
  \__kernel_primitive:NN \hyphenpenalty            \tex_hyphenpenalty:D
  \__kernel_primitive:NN \if                       \tex_if:D
  \__kernel_primitive:NN \ifcase                   \tex_ifcase:D
  \__kernel_primitive:NN \ifcat                    \tex_ifcat:D
  \__kernel_primitive:NN \ifdim                    \tex_ifdim:D
  \__kernel_primitive:NN \ifeof                    \tex_ifeof:D
  \__kernel_primitive:NN \iffalse                  \tex_iffalse:D
  \__kernel_primitive:NN \ifhbox                   \tex_ifhbox:D
  \__kernel_primitive:NN \ifhmode                  \tex_ifhmode:D
  \__kernel_primitive:NN \ifinner                  \tex_ifinner:D
  \__kernel_primitive:NN \ifmmode                  \tex_ifmmode:D
  \__kernel_primitive:NN \ifnum                    \tex_ifnum:D
  \__kernel_primitive:NN \ifodd                    \tex_ifodd:D
  \__kernel_primitive:NN \iftrue                   \tex_iftrue:D
  \__kernel_primitive:NN \ifvbox                   \tex_ifvbox:D
  \__kernel_primitive:NN \ifvmode                  \tex_ifvmode:D
  \__kernel_primitive:NN \ifvoid                   \tex_ifvoid:D
  \__kernel_primitive:NN \ifx                      \tex_ifx:D
  \__kernel_primitive:NN \ignorespaces             \tex_ignorespaces:D
  \__kernel_primitive:NN \immediate                \tex_immediate:D
  \__kernel_primitive:NN \indent                   \tex_indent:D
  \__kernel_primitive:NN \input                    \tex_input:D
  \__kernel_primitive:NN \inputlineno              \tex_inputlineno:D
  \__kernel_primitive:NN \insert                   \tex_insert:D
  \__kernel_primitive:NN \insertpenalties          \tex_insertpenalties:D
  \__kernel_primitive:NN \interlinepenalty         \tex_interlinepenalty:D
  \__kernel_primitive:NN \jobname                  \tex_jobname:D
  \__kernel_primitive:NN \kern                     \tex_kern:D
  \__kernel_primitive:NN \language                 \tex_language:D
  \__kernel_primitive:NN \lastbox                  \tex_lastbox:D
  \__kernel_primitive:NN \lastkern                 \tex_lastkern:D
  \__kernel_primitive:NN \lastpenalty              \tex_lastpenalty:D
  \__kernel_primitive:NN \lastskip                 \tex_lastskip:D
  \__kernel_primitive:NN \lccode                   \tex_lccode:D
  \__kernel_primitive:NN \leaders                  \tex_leaders:D
  \__kernel_primitive:NN \left                     \tex_left:D
  \__kernel_primitive:NN \lefthyphenmin            \tex_lefthyphenmin:D
  \__kernel_primitive:NN \leftskip                 \tex_leftskip:D
  \__kernel_primitive:NN \leqno                    \tex_leqno:D
  \__kernel_primitive:NN \let                      \tex_let:D
  \__kernel_primitive:NN \limits                   \tex_limits:D
  \__kernel_primitive:NN \linepenalty              \tex_linepenalty:D
  \__kernel_primitive:NN \lineskip                 \tex_lineskip:D
  \__kernel_primitive:NN \lineskiplimit            \tex_lineskiplimit:D
  \__kernel_primitive:NN \long                     \tex_long:D
  \__kernel_primitive:NN \looseness                \tex_looseness:D
  \__kernel_primitive:NN \lower                    \tex_lower:D
  \__kernel_primitive:NN \lowercase                \tex_lowercase:D
  \__kernel_primitive:NN \mag                      \tex_mag:D
  \__kernel_primitive:NN \mark                     \tex_mark:D
  \__kernel_primitive:NN \mathaccent               \tex_mathaccent:D
  \__kernel_primitive:NN \mathbin                  \tex_mathbin:D
  \__kernel_primitive:NN \mathchar                 \tex_mathchar:D
  \__kernel_primitive:NN \mathchardef              \tex_mathchardef:D
  \__kernel_primitive:NN \mathchoice               \tex_mathchoice:D
  \__kernel_primitive:NN \mathclose                \tex_mathclose:D
  \__kernel_primitive:NN \mathcode                 \tex_mathcode:D
  \__kernel_primitive:NN \mathinner                \tex_mathinner:D
  \__kernel_primitive:NN \mathop                   \tex_mathop:D
  \__kernel_primitive:NN \mathopen                 \tex_mathopen:D
  \__kernel_primitive:NN \mathord                  \tex_mathord:D
  \__kernel_primitive:NN \mathpunct                \tex_mathpunct:D
  \__kernel_primitive:NN \mathrel                  \tex_mathrel:D
  \__kernel_primitive:NN \mathsurround             \tex_mathsurround:D
  \__kernel_primitive:NN \maxdeadcycles            \tex_maxdeadcycles:D
  \__kernel_primitive:NN \maxdepth                 \tex_maxdepth:D
  \__kernel_primitive:NN \meaning                  \tex_meaning:D
  \__kernel_primitive:NN \medmuskip                \tex_medmuskip:D
  \__kernel_primitive:NN \message                  \tex_message:D
  \__kernel_primitive:NN \mkern                    \tex_mkern:D
  \__kernel_primitive:NN \month                    \tex_month:D
  \__kernel_primitive:NN \moveleft                 \tex_moveleft:D
  \__kernel_primitive:NN \moveright                \tex_moveright:D
  \__kernel_primitive:NN \mskip                    \tex_mskip:D
  \__kernel_primitive:NN \multiply                 \tex_multiply:D
  \__kernel_primitive:NN \muskip                   \tex_muskip:D
  \__kernel_primitive:NN \muskipdef                \tex_muskipdef:D
  \__kernel_primitive:NN \newlinechar              \tex_newlinechar:D
  \__kernel_primitive:NN \noalign                  \tex_noalign:D
  \__kernel_primitive:NN \noboundary               \tex_noboundary:D
  \__kernel_primitive:NN \noexpand                 \tex_noexpand:D
  \__kernel_primitive:NN \noindent                 \tex_noindent:D
  \__kernel_primitive:NN \nolimits                 \tex_nolimits:D
  \__kernel_primitive:NN \nonscript                \tex_nonscript:D
  \__kernel_primitive:NN \nonstopmode              \tex_nonstopmode:D
  \__kernel_primitive:NN \nulldelimiterspace       \tex_nulldelimiterspace:D
  \__kernel_primitive:NN \nullfont                 \tex_nullfont:D
  \__kernel_primitive:NN \number                   \tex_number:D
  \__kernel_primitive:NN \omit                     \tex_omit:D
  \__kernel_primitive:NN \openin                   \tex_openin:D
  \__kernel_primitive:NN \openout                  \tex_openout:D
  \__kernel_primitive:NN \or                       \tex_or:D
  \__kernel_primitive:NN \outer                    \tex_outer:D
  \__kernel_primitive:NN \output                   \tex_output:D
  \__kernel_primitive:NN \outputpenalty            \tex_outputpenalty:D
  \__kernel_primitive:NN \over                     \tex_over:D
  \__kernel_primitive:NN \overfullrule             \tex_overfullrule:D
  \__kernel_primitive:NN \overline                 \tex_overline:D
  \__kernel_primitive:NN \overwithdelims           \tex_overwithdelims:D
  \__kernel_primitive:NN \pagedepth                \tex_pagedepth:D
  \__kernel_primitive:NN \pagefilllstretch         \tex_pagefilllstretch:D
  \__kernel_primitive:NN \pagefillstretch          \tex_pagefillstretch:D
  \__kernel_primitive:NN \pagefilstretch           \tex_pagefilstretch:D
  \__kernel_primitive:NN \pagegoal                 \tex_pagegoal:D
  \__kernel_primitive:NN \pageshrink               \tex_pageshrink:D
  \__kernel_primitive:NN \pagestretch              \tex_pagestretch:D
  \__kernel_primitive:NN \pagetotal                \tex_pagetotal:D
  \__kernel_primitive:NN \par                      \tex_par:D
  \__kernel_primitive:NN \parfillskip              \tex_parfillskip:D
  \__kernel_primitive:NN \parindent                \tex_parindent:D
  \__kernel_primitive:NN \parshape                 \tex_parshape:D
  \__kernel_primitive:NN \parskip                  \tex_parskip:D
  \__kernel_primitive:NN \patterns                 \tex_patterns:D
  \__kernel_primitive:NN \pausing                  \tex_pausing:D
  \__kernel_primitive:NN \penalty                  \tex_penalty:D
  \__kernel_primitive:NN \postdisplaypenalty       \tex_postdisplaypenalty:D
  \__kernel_primitive:NN \predisplaypenalty        \tex_predisplaypenalty:D
  \__kernel_primitive:NN \predisplaysize           \tex_predisplaysize:D
  \__kernel_primitive:NN \pretolerance             \tex_pretolerance:D
  \__kernel_primitive:NN \prevdepth                \tex_prevdepth:D
  \__kernel_primitive:NN \prevgraf                 \tex_prevgraf:D
  \__kernel_primitive:NN \radical                  \tex_radical:D
  \__kernel_primitive:NN \raise                    \tex_raise:D
  \__kernel_primitive:NN \read                     \tex_read:D
  \__kernel_primitive:NN \relax                    \tex_relax:D
  \__kernel_primitive:NN \relpenalty               \tex_relpenalty:D
  \__kernel_primitive:NN \right                    \tex_right:D
  \__kernel_primitive:NN \righthyphenmin           \tex_righthyphenmin:D
  \__kernel_primitive:NN \rightskip                \tex_rightskip:D
  \__kernel_primitive:NN \romannumeral             \tex_romannumeral:D
  \__kernel_primitive:NN \scriptfont               \tex_scriptfont:D
  \__kernel_primitive:NN \scriptscriptfont         \tex_scriptscriptfont:D
  \__kernel_primitive:NN \scriptscriptstyle        \tex_scriptscriptstyle:D
  \__kernel_primitive:NN \scriptspace              \tex_scriptspace:D
  \__kernel_primitive:NN \scriptstyle              \tex_scriptstyle:D
  \__kernel_primitive:NN \scrollmode               \tex_scrollmode:D
  \__kernel_primitive:NN \setbox                   \tex_setbox:D
  \__kernel_primitive:NN \setlanguage              \tex_setlanguage:D
  \__kernel_primitive:NN \sfcode                   \tex_sfcode:D
  \__kernel_primitive:NN \shipout                  \tex_shipout:D
  \__kernel_primitive:NN \show                     \tex_show:D
  \__kernel_primitive:NN \showbox                  \tex_showbox:D
  \__kernel_primitive:NN \showboxbreadth           \tex_showboxbreadth:D
  \__kernel_primitive:NN \showboxdepth             \tex_showboxdepth:D
  \__kernel_primitive:NN \showlists                \tex_showlists:D
  \__kernel_primitive:NN \showthe                  \tex_showthe:D
  \__kernel_primitive:NN \skewchar                 \tex_skewchar:D
  \__kernel_primitive:NN \skip                     \tex_skip:D
  \__kernel_primitive:NN \skipdef                  \tex_skipdef:D
  \__kernel_primitive:NN \spacefactor              \tex_spacefactor:D
  \__kernel_primitive:NN \spaceskip                \tex_spaceskip:D
  \__kernel_primitive:NN \span                     \tex_span:D
  \__kernel_primitive:NN \special                  \tex_special:D
  \__kernel_primitive:NN \splitbotmark             \tex_splitbotmark:D
  \__kernel_primitive:NN \splitfirstmark           \tex_splitfirstmark:D
  \__kernel_primitive:NN \splitmaxdepth            \tex_splitmaxdepth:D
  \__kernel_primitive:NN \splittopskip             \tex_splittopskip:D
  \__kernel_primitive:NN \string                   \tex_string:D
  \__kernel_primitive:NN \tabskip                  \tex_tabskip:D
  \__kernel_primitive:NN \textfont                 \tex_textfont:D
  \__kernel_primitive:NN \textstyle                \tex_textstyle:D
  \__kernel_primitive:NN \the                      \tex_the:D
  \__kernel_primitive:NN \thickmuskip              \tex_thickmuskip:D
  \__kernel_primitive:NN \thinmuskip               \tex_thinmuskip:D
  \__kernel_primitive:NN \time                     \tex_time:D
  \__kernel_primitive:NN \toks                     \tex_toks:D
  \__kernel_primitive:NN \toksdef                  \tex_toksdef:D
  \__kernel_primitive:NN \tolerance                \tex_tolerance:D
  \__kernel_primitive:NN \topmark                  \tex_topmark:D
  \__kernel_primitive:NN \topskip                  \tex_topskip:D
  \__kernel_primitive:NN \tracingcommands          \tex_tracingcommands:D
  \__kernel_primitive:NN \tracinglostchars         \tex_tracinglostchars:D
  \__kernel_primitive:NN \tracingmacros            \tex_tracingmacros:D
  \__kernel_primitive:NN \tracingonline            \tex_tracingonline:D
  \__kernel_primitive:NN \tracingoutput            \tex_tracingoutput:D
  \__kernel_primitive:NN \tracingpages             \tex_tracingpages:D
  \__kernel_primitive:NN \tracingparagraphs        \tex_tracingparagraphs:D
  \__kernel_primitive:NN \tracingrestores          \tex_tracingrestores:D
  \__kernel_primitive:NN \tracingstats             \tex_tracingstats:D
  \__kernel_primitive:NN \uccode                   \tex_uccode:D
  \__kernel_primitive:NN \uchyph                   \tex_uchyph:D
  \__kernel_primitive:NN \underline                \tex_underline:D
  \__kernel_primitive:NN \unhbox                   \tex_unhbox:D
  \__kernel_primitive:NN \unhcopy                  \tex_unhcopy:D
  \__kernel_primitive:NN \unkern                   \tex_unkern:D
  \__kernel_primitive:NN \unpenalty                \tex_unpenalty:D
  \__kernel_primitive:NN \unskip                   \tex_unskip:D
  \__kernel_primitive:NN \unvbox                   \tex_unvbox:D
  \__kernel_primitive:NN \unvcopy                  \tex_unvcopy:D
  \__kernel_primitive:NN \uppercase                \tex_uppercase:D
  \__kernel_primitive:NN \vadjust                  \tex_vadjust:D
  \__kernel_primitive:NN \valign                   \tex_valign:D
  \__kernel_primitive:NN \vbadness                 \tex_vbadness:D
  \__kernel_primitive:NN \vbox                     \tex_vbox:D
  \__kernel_primitive:NN \vcenter                  \tex_vcenter:D
  \__kernel_primitive:NN \vfil                     \tex_vfil:D
  \__kernel_primitive:NN \vfill                    \tex_vfill:D
  \__kernel_primitive:NN \vfilneg                  \tex_vfilneg:D
  \__kernel_primitive:NN \vfuzz                    \tex_vfuzz:D
  \__kernel_primitive:NN \voffset                  \tex_voffset:D
  \__kernel_primitive:NN \vrule                    \tex_vrule:D
  \__kernel_primitive:NN \vsize                    \tex_vsize:D
  \__kernel_primitive:NN \vskip                    \tex_vskip:D
  \__kernel_primitive:NN \vsplit                   \tex_vsplit:D
  \__kernel_primitive:NN \vss                      \tex_vss:D
  \__kernel_primitive:NN \vtop                     \tex_vtop:D
  \__kernel_primitive:NN \wd                       \tex_wd:D
  \__kernel_primitive:NN \widowpenalty             \tex_widowpenalty:D
  \__kernel_primitive:NN \write                    \tex_write:D
  \__kernel_primitive:NN \xdef                     \tex_xdef:D
  \__kernel_primitive:NN \xleaders                 \tex_xleaders:D
  \__kernel_primitive:NN \xspaceskip               \tex_xspaceskip:D
  \__kernel_primitive:NN \year                     \tex_year:D
%    \end{macrocode}
% Since \LaTeX3 requires at least the \eTeX{} extensions,
% we also rename the additional primitives. These are all
% given the prefix |\etex_|.
%    \begin{macrocode}
  \__kernel_primitive:NN \beginL                   \etex_beginL:D
  \__kernel_primitive:NN \beginR                   \etex_beginR:D
  \__kernel_primitive:NN \botmarks                 \etex_botmarks:D
  \__kernel_primitive:NN \clubpenalties            \etex_clubpenalties:D
  \__kernel_primitive:NN \currentgrouplevel        \etex_currentgrouplevel:D
  \__kernel_primitive:NN \currentgrouptype         \etex_currentgrouptype:D
  \__kernel_primitive:NN \currentifbranch          \etex_currentifbranch:D
  \__kernel_primitive:NN \currentiflevel           \etex_currentiflevel:D
  \__kernel_primitive:NN \currentiftype            \etex_currentiftype:D
  \__kernel_primitive:NN \detokenize               \etex_detokenize:D
  \__kernel_primitive:NN \dimexpr                  \etex_dimexpr:D
  \__kernel_primitive:NN \displaywidowpenalties    \etex_displaywidowpenalties:D
  \__kernel_primitive:NN \endL                     \etex_endL:D
  \__kernel_primitive:NN \endR                     \etex_endR:D
  \__kernel_primitive:NN \eTeXrevision             \etex_eTeXrevision:D
  \__kernel_primitive:NN \eTeXversion              \etex_eTeXversion:D
  \__kernel_primitive:NN \everyeof                 \etex_everyeof:D
  \__kernel_primitive:NN \firstmarks               \etex_firstmarks:D
  \__kernel_primitive:NN \fontchardp               \etex_fontchardp:D
  \__kernel_primitive:NN \fontcharht               \etex_fontcharht:D
  \__kernel_primitive:NN \fontcharic               \etex_fontcharic:D
  \__kernel_primitive:NN \fontcharwd               \etex_fontcharwd:D
  \__kernel_primitive:NN \glueexpr                 \etex_glueexpr:D
  \__kernel_primitive:NN \glueshrink               \etex_glueshrink:D
  \__kernel_primitive:NN \glueshrinkorder          \etex_glueshrinkorder:D
  \__kernel_primitive:NN \gluestretch              \etex_gluestretch:D
  \__kernel_primitive:NN \gluestretchorder         \etex_gluestretchorder:D
  \__kernel_primitive:NN \gluetomu                 \etex_gluetomu:D
  \__kernel_primitive:NN \ifcsname                 \etex_ifcsname:D
  \__kernel_primitive:NN \ifdefined                \etex_ifdefined:D
  \__kernel_primitive:NN \iffontchar               \etex_iffontchar:D
  \__kernel_primitive:NN \interactionmode          \etex_interactionmode:D
  \__kernel_primitive:NN \interlinepenalties       \etex_interlinepenalties:D
  \__kernel_primitive:NN \lastlinefit              \etex_lastlinefit:D
  \__kernel_primitive:NN \lastnodetype             \etex_lastnodetype:D
  \__kernel_primitive:NN \marks                    \etex_marks:D
  \__kernel_primitive:NN \middle                   \etex_middle:D
  \__kernel_primitive:NN \muexpr                   \etex_muexpr:D
  \__kernel_primitive:NN \mutoglue                 \etex_mutoglue:D
  \__kernel_primitive:NN \numexpr                  \etex_numexpr:D
  \__kernel_primitive:NN \pagediscards             \etex_pagediscards:D
  \__kernel_primitive:NN \parshapedimen            \etex_parshapedimen:D
  \__kernel_primitive:NN \parshapeindent           \etex_parshapeindent:D
  \__kernel_primitive:NN \parshapelength           \etex_parshapelength:D
  \__kernel_primitive:NN \predisplaydirection      \etex_predisplaydirection:D
  \__kernel_primitive:NN \protected                \etex_protected:D
  \__kernel_primitive:NN \readline                 \etex_readline:D
  \__kernel_primitive:NN \savinghyphcodes          \etex_savinghyphcodes:D
  \__kernel_primitive:NN \savingvdiscards          \etex_savingvdiscards:D
  \__kernel_primitive:NN \scantokens               \etex_scantokens:D
  \__kernel_primitive:NN \showgroups               \etex_showgroups:D
  \__kernel_primitive:NN \showifs                  \etex_showifs:D
  \__kernel_primitive:NN \showtokens               \etex_showtokens:D
  \__kernel_primitive:NN \splitbotmarks            \etex_splitbotmarks:D
  \__kernel_primitive:NN \splitdiscards            \etex_splitdiscards:D
  \__kernel_primitive:NN \splitfirstmarks          \etex_splitfirstmarks:D
  \__kernel_primitive:NN \TeXXeTstate              \etex_TeXXeTstate:D
  \__kernel_primitive:NN \topmarks                 \etex_topmarks:D
  \__kernel_primitive:NN \tracingassigns           \etex_tracingassigns:D
  \__kernel_primitive:NN \tracinggroups            \etex_tracinggroups:D
  \__kernel_primitive:NN \tracingifs               \etex_tracingifs:D
  \__kernel_primitive:NN \tracingnesting           \etex_tracingnesting:D
  \__kernel_primitive:NN \tracingscantokens        \etex_tracingscantokens:D
  \__kernel_primitive:NN \unexpanded               \etex_unexpanded:D
  \__kernel_primitive:NN \unless                   \etex_unless:D
  \__kernel_primitive:NN \widowpenalties           \etex_widowpenalties:D
%    \end{macrocode}
% The newer primitives are more complex: there are an awful lot of them,
% and we don't use them all at the moment. So the following is selective.
% In the case of the \pdfTeX{} primitives, we retain |pdf| at the start
% of the names \emph{only} for directly PDF-related primitives, as
% there are a lot of \pdfTeX{} primitives that start \cs{pdf\ldots} but
% are not related to PDF output. These ones related to PDF output.
%    \begin{macrocode}
  \__kernel_primitive:NN \pdfcreationdate          \pdftex_pdfcreationdate:D
  \__kernel_primitive:NN \pdfcolorstack            \pdftex_pdfcolorstack:D
  \__kernel_primitive:NN \pdfcompresslevel         \pdftex_pdfcompresslevel:D
  \__kernel_primitive:NN \pdfdecimaldigits         \pdftex_pdfdecimaldigits:D
  \__kernel_primitive:NN \pdfhorigin               \pdftex_pdfhorigin:D
  \__kernel_primitive:NN \pdfinfo                  \pdftex_pdfinfo:D
  \__kernel_primitive:NN \pdflastxform             \pdftex_pdflastxform:D
  \__kernel_primitive:NN \pdfliteral               \pdftex_pdfliteral:D
  \__kernel_primitive:NN \pdfminorversion          \pdftex_pdfminorversion:D
  \__kernel_primitive:NN \pdfobjcompresslevel      \pdftex_pdfobjcompresslevel:D
  \__kernel_primitive:NN \pdfoutput                \pdftex_pdfoutput:D
  \__kernel_primitive:NN \pdfrefxform              \pdftex_pdfrefxform:D
  \__kernel_primitive:NN \pdfrestore               \pdftex_pdfrestore:D
  \__kernel_primitive:NN \pdfsave                  \pdftex_pdfsave:D
  \__kernel_primitive:NN \pdfsetmatrix             \pdftex_pdfsetmatrix:D
  \__kernel_primitive:NN \pdfpkresolution          \pdftex_pdfpkresolution:D
  \__kernel_primitive:NN \pdfvorigin               \pdftex_pdfvorigin:D
  \__kernel_primitive:NN \pdfxform                 \pdftex_pdfxform:D
%    \end{macrocode}
% While these are not.
%    \begin{macrocode}
  \__kernel_primitive:NN \pdfstrcmp                \pdftex_strcmp:D
%    \end{macrocode}
% The version primitives are not related to PDF mode but are related to
% \pdfTeX{} so retain the full prefix.
%    \begin{macrocode}
  \__kernel_primitive:NN \pdftexrevision           \pdftex_pdftexrevision:D
  \__kernel_primitive:NN \pdftexversion            \pdftex_pdftexversion:D
%    \end{macrocode}
% \XeTeX{}-specific primitives. Note that \XeTeX{}'s \tn{strcmp} is
% handled earlier and is \enquote{rolled up} into \tn{pdfstrcmp}. With
% the exception of the version primitives these don't carry |XeTeX| through
% into the \enquote{base} name.
%    \begin{macrocode}
  \__kernel_primitive:NN \XeTeXcharclass           \xetex_charclass:D
  \__kernel_primitive:NN \XeTeXinterchartokenstate \xetex_interchartokenstate:D
  \__kernel_primitive:NN \XeTeXinterchartoks       \xetex_interchartoks:D
  \__kernel_primitive:NN \XeTeXrevision            \xetex_XeTeXrevision:D
  \__kernel_primitive:NN \XeTeXversion             \xetex_XeTeXversion:D
%    \end{macrocode}
% Primitives from \LuaTeX{}.
%    \begin{macrocode}
  \__kernel_primitive:NN \catcodetable             \luatex_catcodetable:D
  \__kernel_primitive:NN \directlua                \luatex_directlua:D
  \__kernel_primitive:NN \expanded                 \luatex_expanded:D
  \__kernel_primitive:NN \initcatcodetable         \luatex_initcatcodetable:D
  \__kernel_primitive:NN \latelua                  \luatex_latelua:D
  \__kernel_primitive:NN \luaescapestring          \luatex_luaescapestring:D
  \__kernel_primitive:NN \luatexrevision           \luatex_luatexrevision:D
  \__kernel_primitive:NN \luatexversion            \luatex_luatexversion:D
  \__kernel_primitive:NN \savecatcodetable         \luatex_savecatcodetable:D
  \__kernel_primitive:NN \Uchar                    \luatex_Uchar:D
%    \end{macrocode}
% Slightly more awkward are the directional primitives in \LuaTeX{}. These
% come from Omega \emph{via} Aleph, but we do not support those engines and
% so it seems most sensible to treat them as \LuaTeX{} primitives for prefix
% purposes.
%    \begin{macrocode}
  \__kernel_primitive:NN \bodydir                  \luatex_bodydir:D
  \__kernel_primitive:NN \mathdir                  \luatex_mathdir:D
  \__kernel_primitive:NN \pagedir                  \luatex_pagedir:D
  \__kernel_primitive:NN \pardir                   \luatex_pardir:D
  \__kernel_primitive:NN \textdir                  \luatex_textdir:D
%    \end{macrocode}
%
%  End of the \enquote{just the names} part of the source.
%    \begin{macrocode}
%</initex|names|package>
%<*initex|package>
%    \end{macrocode}
%
% The job is done: close the group (using the primitive renamed!).
%    \begin{macrocode}
\tex_endgroup:D
%    \end{macrocode}
%
% \LaTeXe{} will have moved a few primitives, so these are sorted out.
% A convenient test for \LaTeXe{} is the \cs{@@end} saved primitive.
%    \begin{macrocode}
%<*package>
\etex_ifdefined:D \@@end
  \tex_let:D \tex_end:D                  \@@end
  \tex_let:D \tex_everydisplay:D         \frozen@everydisplay
  \tex_let:D \tex_everymath:D            \frozen@everymath
  \tex_let:D \tex_hyphen:D               \@@hyph
  \tex_let:D \tex_input:D                \@@input
  \tex_let:D \tex_italiccorrection:D     \@@italiccorr
  \tex_let:D \tex_underline:D            \@@underline
%    \end{macrocode}
% That is also true for the \LuaTeX{} primitives under \LaTeXe{}.
%    \begin{macrocode}
  \tex_let:D \luatex_catcodetable:D      \luatexcatcodetable
  \tex_let:D \luatex_initcatcodetable:D  \luatexinitcatcodetable
  \tex_let:D \luatex_latelua:D           \luatexlatelua
  \tex_let:D \luatex_luaescapestring:D   \luatexluaescapestring
  \tex_let:D \luatex_savecatcodetable:D  \luatexsavecatcodetable
  \tex_let:D \luatex_Uchar:D             \luatexUchar
%    \end{macrocode}
% Which also covers those slightly odd ones.
%    \begin{macrocode}
  \tex_let:D \luatex_bodydir:D           \luatexbodydir
  \tex_let:D \luatex_mathdir:D           \luatexmathdir
  \tex_let:D \luatex_pagedir:D           \luatexpagedir
  \tex_let:D \luatex_pardir:D            \luatexpardir
  \tex_let:D \luatex_textdir:D           \luatextextdir
\tex_fi:D
%    \end{macrocode}
%
% For Con\TeX{}t, two tests are needed. Both Mark~II and Mark~IV move several
% primitives: these are all covered by the first test, again using \cs{end}
% as a marker. For Mark~IV, a few more primitives are moved: they are
% implemented using some Lua code in the current Con\TeX{}t.
%    \begin{macrocode}
\etex_ifdefined:D \normalend
  \tex_let:D \tex_end:D         \normalend
  \tex_let:D \tex_everyjob:D    \normaleveryjob
  \tex_let:D \tex_input:D       \normalinput
  \tex_let:D \tex_language:D    \normallanguage
  \tex_let:D \tex_mathop:D      \normalmathop
  \tex_let:D \tex_month:D       \normalmonth
  \tex_let:D \tex_outer:D       \normalouter
  \tex_let:D \tex_over:D        \normalover
  \tex_let:D \tex_vcenter:D     \normalvcenter
  \tex_let:D \etex_unexpanded:D \normalunexpanded
  \tex_let:D \luatex_expanded:D \normalexpanded
\tex_fi:D
\etex_ifdefined:D \normalitaliccorrection
  \tex_let:D \tex_hoffset:D          \normalhoffset
  \tex_let:D \tex_italiccorrection:D \normalitaliccorrection
  \tex_let:D \tex_voffset:D          \normalvoffset
  \tex_let:D \etex_showtokens:D      \normalshowtokens
  \tex_let:D \luatex_bodydir:D       \spac_directions_normal_body_dir
  \tex_let:D \luatex_pagedir:D       \spac_directions_normal_page_dir
\tex_fi:D
\etex_ifdefined:D \normalleft
  \tex_let:D \tex_left:D   \normalleft
  \tex_let:D \tex_middle:D \normalmiddle
  \tex_let:D \tex_right:D  \normalright
\tex_fi:D
%</package>
%    \end{macrocode}
%
%    \begin{macrocode}
%</initex|package>
%    \end{macrocode}
%
% \end{implementation}
%
% \PrintIndex
