% \iffalse meta-comment
%
%% File: l3names.dtx Copyright (C) 1990-2016 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 6722 2016-10-13 10:22:35Z 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}[int]{\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,
% based on those also available in \LuaTeX{} or used in \pkg{expl3}.
% 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[no-index]{pdf\ldots} but
% are not related to PDF output. These ones related to PDF output or only
% work in PDF mode.
%    \begin{macrocode}
  \__kernel_primitive:NN \pdfannot                    \pdftex_pdfannot:D
  \__kernel_primitive:NN \pdfcatalog                  \pdftex_pdfcatalog:D
  \__kernel_primitive:NN \pdfcompresslevel            \pdftex_pdfcompresslevel:D
  \__kernel_primitive:NN \pdfcolorstack               \pdftex_pdfcolorstack:D
  \__kernel_primitive:NN \pdfcolorstackinit           \pdftex_pdfcolorstackinit:D
  \__kernel_primitive:NN \pdfcreationdate             \pdftex_pdfcreationdate:D
  \__kernel_primitive:NN \pdfdecimaldigits            \pdftex_pdfdecimaldigits:D
  \__kernel_primitive:NN \pdfdest                     \pdftex_pdfdest:D
  \__kernel_primitive:NN \pdfdestmargin               \pdftex_pdfdestmargin:D
  \__kernel_primitive:NN \pdfendlink                  \pdftex_pdfendlink:D
  \__kernel_primitive:NN \pdfendthread                \pdftex_pdfendthread:D
  \__kernel_primitive:NN \pdffontattr                 \pdftex_pdffontattr:D
  \__kernel_primitive:NN \pdffontname                 \pdftex_pdffontname:D
  \__kernel_primitive:NN \pdffontobjnum               \pdftex_pdffontobjnum:D
  \__kernel_primitive:NN \pdfgamma                    \pdftex_pdfgamma:D
  \__kernel_primitive:NN \pdfimageapplygamma          \pdftex_pdfimageapplygamma:D
  \__kernel_primitive:NN \pdfimagegamma               \pdftex_pdfimagegamma:D
  \__kernel_primitive:NN \pdfgentounicode             \pdftex_pdfgentounicode:D
  \__kernel_primitive:NN \pdfglyphtounicode           \pdftex_pdfglyphtounicode:D
  \__kernel_primitive:NN \pdfhorigin                  \pdftex_pdfhorigin:D
  \__kernel_primitive:NN \pdfimagehicolor             \pdftex_pdfimagehicolor:D
  \__kernel_primitive:NN \pdfimageresolution          \pdftex_pdfimageresolution:D
  \__kernel_primitive:NN \pdfincludechars             \pdftex_pdfincludechars:D
  \__kernel_primitive:NN \pdfinclusioncopyfonts       \pdftex_pdfinclusioncopyfonts:D
  \__kernel_primitive:NN \pdfinclusionerrorlevel      \pdftex_pdfinclusionerrorlevel:D
  \__kernel_primitive:NN \pdfinfo                     \pdftex_pdfinfo:D
  \__kernel_primitive:NN \pdflastannot                \pdftex_pdflastannot:D
  \__kernel_primitive:NN \pdflastlink                 \pdftex_pdflastlink:D
  \__kernel_primitive:NN \pdflastobj                  \pdftex_pdflastobj:D
  \__kernel_primitive:NN \pdflastxform                \pdftex_pdflastxform:D
  \__kernel_primitive:NN \pdflastximage               \pdftex_pdflastximage:D
  \__kernel_primitive:NN \pdflastximagecolordepth     \pdftex_pdflastximagecolordepth:D
  \__kernel_primitive:NN \pdflastximagepages          \pdftex_pdflastximagepages:D
  \__kernel_primitive:NN \pdflinkmargin               \pdftex_pdflinkmargin:D
  \__kernel_primitive:NN \pdfliteral                  \pdftex_pdfliteral:D
  \__kernel_primitive:NN \pdfminorversion             \pdftex_pdfminorversion:D
  \__kernel_primitive:NN \pdfnames                    \pdftex_pdfnames:D
  \__kernel_primitive:NN \pdfobj                      \pdftex_pdfobj:D
  \__kernel_primitive:NN \pdfobjcompresslevel         \pdftex_pdfobjcompresslevel:D
  \__kernel_primitive:NN \pdfoutline                  \pdftex_pdfoutline:D
  \__kernel_primitive:NN \pdfoutput                   \pdftex_pdfoutput:D
  \__kernel_primitive:NN \pdfpageattr                 \pdftex_pdfpageattr:D
  \__kernel_primitive:NN \pdfpagebox                  \pdftex_pdfpagebox:D
  \__kernel_primitive:NN \pdfpageref                  \pdftex_pdfpageref:D
  \__kernel_primitive:NN \pdfpageresources            \pdftex_pdfpageresources:D
  \__kernel_primitive:NN \pdfpagesattr                \pdftex_pdfpagesattr:D
  \__kernel_primitive:NN \pdfrefobj                   \pdftex_pdfrefobj:D
  \__kernel_primitive:NN \pdfrefxform                 \pdftex_pdfrefxform:D
  \__kernel_primitive:NN \pdfrefximage                \pdftex_pdfrefximage:D
  \__kernel_primitive:NN \pdfrestore                  \pdftex_pdfrestore:D
  \__kernel_primitive:NN \pdfretval                   \pdftex_pdfretval:D
  \__kernel_primitive:NN \pdfsave                     \pdftex_pdfsave:D
  \__kernel_primitive:NN \pdfsetmatrix                \pdftex_pdfsetmatrix:D
  \__kernel_primitive:NN \pdfstartlink                \pdftex_pdfstartlink:D
  \__kernel_primitive:NN \pdfstartthread              \pdftex_pdfstartthread:D
  \__kernel_primitive:NN \pdfsuppressptexinfo         \pdftex_pdfsuppressptexinfo:D
  \__kernel_primitive:NN \pdfthread                   \pdftex_pdfthread:D
  \__kernel_primitive:NN \pdfthreadmargin             \pdftex_pdfthreadmargin:D
  \__kernel_primitive:NN \pdftrailer                  \pdftex_pdftrailer:D
  \__kernel_primitive:NN \pdfuniqueresname            \pdftex_pdfuniqueresname:D
  \__kernel_primitive:NN \pdfvorigin                  \pdftex_pdfvorigin:D
  \__kernel_primitive:NN \pdfxform                    \pdftex_pdfxform:D
  \__kernel_primitive:NN \pdfxformattr                \pdftex_pdfxformattr:D
  \__kernel_primitive:NN \pdfxformname                \pdftex_pdfxformname:D
  \__kernel_primitive:NN \pdfxformresources           \pdftex_pdfxformresources:D
  \__kernel_primitive:NN \pdfximage                   \pdftex_pdfximage:D
  \__kernel_primitive:NN \pdfximagebbox               \pdftex_pdfximagebbox:D
%    \end{macrocode}
% While these are not.
%    \begin{macrocode}
  \__kernel_primitive:NN \ifpdfabsdim                 \pdftex_ifabsdim:D
  \__kernel_primitive:NN \ifpdfabsnum                 \pdftex_ifabsnum:D
  \__kernel_primitive:NN \ifpdfprimitive              \pdftex_ifprimitive:D
  \__kernel_primitive:NN \pdfadjustspacing            \pdftex_adjustspacing:D
  \__kernel_primitive:NN \pdfcopyfont                 \pdftex_copyfont:D
  \__kernel_primitive:NN \pdfdraftmode                \pdftex_draftmode:D
  \__kernel_primitive:NN \pdfeachlinedepth            \pdftex_eachlinedepth:D
  \__kernel_primitive:NN \pdfeachlineheight           \pdftex_eachlineheight:D
  \__kernel_primitive:NN \pdffirstlineheight          \pdftex_firstlineheight:D
  \__kernel_primitive:NN \pdffontexpand               \pdftex_fontexpand:D
  \__kernel_primitive:NN \pdffontsize                 \pdftex_fontsize:D
  \__kernel_primitive:NN \pdfignoreddimen             \pdftex_ignoreddimen:D
  \__kernel_primitive:NN \pdfinsertht                 \pdftex_insertht:D
  \__kernel_primitive:NN \pdflastlinedepth            \pdftex_lastlinedepth:D
  \__kernel_primitive:NN \pdflastxpos                 \pdftex_lastxpos:D
  \__kernel_primitive:NN \pdflastypos                 \pdftex_lastypos:D
  \__kernel_primitive:NN \pdfmapfile                  \pdftex_mapfile:D
  \__kernel_primitive:NN \pdfmapline                  \pdftex_mapline:D
  \__kernel_primitive:NN \pdfnoligatures              \pdftex_noligatures:D
  \__kernel_primitive:NN \pdfnormaldeviate            \pdftex_normaldeviate:D
  \__kernel_primitive:NN \pdfpageheight               \pdftex_pageheight:D
  \__kernel_primitive:NN \pdfpagewidth                \pdftex_pagewidth:D
  \__kernel_primitive:NN \pdfpkmode                   \pdftex_pkmode:D
  \__kernel_primitive:NN \pdfpkresolution             \pdftex_pkresolution:D
  \__kernel_primitive:NN \pdfprimitive                \pdftex_primitive:D
  \__kernel_primitive:NN \pdfprotrudechars            \pdftex_protrudechars:D
  \__kernel_primitive:NN \pdfpxdimen                  \pdftex_pxdimen:D
  \__kernel_primitive:NN \pdfrandomseed               \pdftex_randomseed:D
  \__kernel_primitive:NN \pdfsavepos                  \pdftex_savepos:D
  \__kernel_primitive:NN \pdfstrcmp                   \pdftex_strcmp:D
  \__kernel_primitive:NN \pdfsetrandomseed            \pdftex_setrandomseed:D
  \__kernel_primitive:NN \pdfshellescape              \pdftex_shellescape:D
  \__kernel_primitive:NN \pdftracingfonts             \pdftex_tracingfonts:D
  \__kernel_primitive:NN \pdfuniformdeviate           \pdftex_uniformdeviate: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 \pdftexbanner                \pdftex_pdftexbanner:D
  \__kernel_primitive:NN \pdftexrevision              \pdftex_pdftexrevision:D
  \__kernel_primitive:NN \pdftexversion               \pdftex_pdftexversion:D
%    \end{macrocode}
% These ones appear in \pdfTeX{} but don't have |pdf| in the name at all.
% (\tn{synctex} is odd as it's really not from \pdfTeX{} but from SyncTeX!)
%    \begin{macrocode}
  \__kernel_primitive:NN \efcode                      \pdftex_efcode:D
  \__kernel_primitive:NN \ifincsname                  \pdftex_ifincsname:D
  \__kernel_primitive:NN \leftmarginkern              \pdftex_leftmarginkern:D
  \__kernel_primitive:NN \letterspacefont             \pdftex_letterspacefont:D
  \__kernel_primitive:NN \lpcode                      \pdftex_lpcode:D
  \__kernel_primitive:NN \quitvmode                   \pdftex_quitvmode:D
  \__kernel_primitive:NN \rightmarginkern             \pdftex_rightmarginkern:D
  \__kernel_primitive:NN \rpcode                      \pdftex_rpcode:D
  \__kernel_primitive:NN \synctex                     \pdftex_synctex:D
  \__kernel_primitive:NN \tagcode                     \pdftex_tagcode:D
%    \end{macrocode}
% Post \pdfTeX{} primitive availability gets more complex. Both \XeTeX{} and
% \LuaTeX{} have varying names for some primitives from \pdfTeX{}. Particularly
% for \LuaTeX{} tracking all of that would be hard. Instead, we now check that
% we only save primitives if they actually exist.
%    \begin{macrocode}
%</initex|names|package>
%<*initex|package>
  \tex_long:D \tex_def:D \use_ii:nn #1#2 {#2}
  \tex_long:D \tex_def:D \use_none:n #1 { }
  \tex_long:D \tex_def:D \__kernel_primitive:NN #1#2
    {
      \etex_ifdefined:D #1
        \tex_expandafter:D \use_ii:nn
      \tex_fi:D
        \use_none:n { \tex_global:D \tex_let:D #2 #1 }
%<*initex>
      \tex_global:D \tex_let:D #1 \tex_undefined:D
%</initex>
    }
%</initex|package>
%<*initex|names|package>
%    \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. A few cross-compatibility names which lack
% the |pdf| of the original are handled later.
%    \begin{macrocode}
  \__kernel_primitive:NN \suppressfontnotfounderror   \xetex_suppressfontnotfounderror:D
  \__kernel_primitive:NN \XeTeXcharclass              \xetex_charclass:D
  \__kernel_primitive:NN \XeTeXcharglyph              \xetex_charglyph:D
  \__kernel_primitive:NN \XeTeXcountfeatures          \xetex_countfeatures:D
  \__kernel_primitive:NN \XeTeXcountglyphs            \xetex_countglyphs:D
  \__kernel_primitive:NN \XeTeXcountselectors         \xetex_countselectors:D
  \__kernel_primitive:NN \XeTeXcountvariations        \xetex_countvariations:D
  \__kernel_primitive:NN \XeTeXdefaultencoding        \xetex_defaultencoding:D
  \__kernel_primitive:NN \XeTeXdashbreakstate         \xetex_dashbreakstate:D
  \__kernel_primitive:NN \XeTeXfeaturecode            \xetex_featurecode:D
  \__kernel_primitive:NN \XeTeXfeaturename            \xetex_featurename:D
  \__kernel_primitive:NN \XeTeXfindfeaturebyname      \xetex_findfeaturebyname:D
  \__kernel_primitive:NN \XeTeXfindselectorbyname     \xetex_findselectorbyname:D
  \__kernel_primitive:NN \XeTeXfindvariationbyname    \xetex_findvariationbyname:D
  \__kernel_primitive:NN \XeTeXfirstfontchar          \xetex_firstfontchar:D
  \__kernel_primitive:NN \XeTeXfonttype               \xetex_fonttype:D
  \__kernel_primitive:NN \XeTeXgenerateactualtext     \xetex_generateactualtext:D
  \__kernel_primitive:NN \XeTeXglyph                  \xetex_glyph:D
  \__kernel_primitive:NN \XeTeXglyphbounds            \xetex_glyphbounds:D
  \__kernel_primitive:NN \XeTeXglyphindex             \xetex_glyphindex:D
  \__kernel_primitive:NN \XeTeXglyphname              \xetex_glyphname:D
  \__kernel_primitive:NN \XeTeXinputencoding          \xetex_inputencoding:D
  \__kernel_primitive:NN \XeTeXinputnormalization     \xetex_inputnormalization:D
  \__kernel_primitive:NN \XeTeXinterchartokenstate    \xetex_interchartokenstate:D
  \__kernel_primitive:NN \XeTeXinterchartoks          \xetex_interchartoks:D
  \__kernel_primitive:NN \XeTeXisdefaultselector      \xetex_isdefaultselector:D
  \__kernel_primitive:NN \XeTeXisexclusivefeature     \xetex_isexclusivefeature:D
  \__kernel_primitive:NN \XeTeXlastfontchar           \xetex_lastfontchar:D
  \__kernel_primitive:NN \XeTeXlinebreakskip          \xetex_linebreakskip:D
  \__kernel_primitive:NN \XeTeXlinebreaklocale        \xetex_linebreaklocale:D
  \__kernel_primitive:NN \XeTeXlinebreakpenalty       \xetex_linebreakpenalty:D
  \__kernel_primitive:NN \XeTeXOTcountfeatures        \xetex_OTcountfeatures:D
  \__kernel_primitive:NN \XeTeXOTcountlanguages       \xetex_OTcountlanguages:D
  \__kernel_primitive:NN \XeTeXOTcountscripts         \xetex_OTcountscripts:D
  \__kernel_primitive:NN \XeTeXOTfeaturetag           \xetex_OTfeaturetag:D
  \__kernel_primitive:NN \XeTeXOTlanguagetag          \xetex_OTlanguagetag:D
  \__kernel_primitive:NN \XeTeXOTscripttag            \xetex_OTscripttag:D
  \__kernel_primitive:NN \XeTeXpdffile                \xetex_pdffile:D
  \__kernel_primitive:NN \XeTeXpdfpagecount           \xetex_pdfpagecount:D
  \__kernel_primitive:NN \XeTeXpicfile                \xetex_picfile:D
  \__kernel_primitive:NN \XeTeXselectorname           \xetex_selectorname:D
  \__kernel_primitive:NN \XeTeXtracingfonts           \xetex_tracingfonts:D
  \__kernel_primitive:NN \XeTeXupwardsmode            \xetex_upwardsmode:D
  \__kernel_primitive:NN \XeTeXuseglyphmetrics        \xetex_useglyphmetrics:D
  \__kernel_primitive:NN \XeTeXvariation              \xetex_variation:D
  \__kernel_primitive:NN \XeTeXvariationdefault       \xetex_variationdefault:D
  \__kernel_primitive:NN \XeTeXvariationmax           \xetex_variationmax:D
  \__kernel_primitive:NN \XeTeXvariationmin           \xetex_variationmin:D
  \__kernel_primitive:NN \XeTeXvariationname          \xetex_variationname:D
%    \end{macrocode}
%   The version primitives retain |XeTeX|.
%    \begin{macrocode}
  \__kernel_primitive:NN \XeTeXrevision               \xetex_XeTeXrevision:D
  \__kernel_primitive:NN \XeTeXversion                \xetex_XeTeXversion:D
%    \end{macrocode}
% Primitives from \pdfTeX{} that \XeTeX{} renames: also helps with
% \LuaTeX{}.
%    \begin{macrocode}
  \__kernel_primitive:NN \ifprimitive                 \pdftex_ifprimitive:D
  \__kernel_primitive:NN \primitive                   \pdftex_primitive:D
  \__kernel_primitive:NN \shellescape                 \pdftex_shellescape:D
%    \end{macrocode}
% Primitives from \LuaTeX{}, some of which have been ported back to
% \XeTeX{}. Notice that \tn{expanded} was intended for \pdfTeX{}~1.50 but
% as that was not released we call this a \LuaTeX{} primitive.
%    \begin{macrocode}
  \__kernel_primitive:NN \alignmark                   \luatex_alignmark:D
  \__kernel_primitive:NN \aligntab                    \luatex_aligntab:D
  \__kernel_primitive:NN \attribute                   \luatex_attribute:D
  \__kernel_primitive:NN \attributedef                \luatex_attributedef:D
  \__kernel_primitive:NN \begincsname                 \luatex_begincsname:D
  \__kernel_primitive:NN \catcodetable                \luatex_catcodetable:D
  \__kernel_primitive:NN \clearmarks                  \luatex_clearmarks:D
  \__kernel_primitive:NN \crampeddisplaystyle         \luatex_crampeddisplaystyle:D
  \__kernel_primitive:NN \crampedscriptscriptstyle    \luatex_crampedscriptscriptstyle:D
  \__kernel_primitive:NN \crampedscriptstyle          \luatex_crampedscriptstyle:D
  \__kernel_primitive:NN \crampedtextstyle            \luatex_crampedtextstyle:D
  \__kernel_primitive:NN \directlua                   \luatex_directlua:D
  \__kernel_primitive:NN \dviextension                \luatex_dviextension:D
  \__kernel_primitive:NN \dvifeedback                 \luatex_dvifeedback:D
  \__kernel_primitive:NN \dvivariable                 \luatex_dvivariable:D
  \__kernel_primitive:NN \etoksapp                    \luatex_etoksapp:D
  \__kernel_primitive:NN \etokspre                    \luatex_etokspre:D
  \__kernel_primitive:NN \expanded                    \luatex_expanded:D
  \__kernel_primitive:NN \firstvalidlanguage          \luatex_firstvalidlanguage:D
  \__kernel_primitive:NN \fontid                      \luatex_fontid:D
  \__kernel_primitive:NN \formatname                  \luatex_formatname:D
  \__kernel_primitive:NN \hjcode                      \luatex_hjcode:D
  \__kernel_primitive:NN \hpack                       \luatex_hpack:D
  \__kernel_primitive:NN \hyphenationbounds           \luatex_hyphenationbounds:D
  \__kernel_primitive:NN \hyphenationmin              \luatex_hyphenationmin:D
  \__kernel_primitive:NN \gleaders                    \luatex_gleaders:D
  \__kernel_primitive:NN \initcatcodetable            \luatex_initcatcodetable:D
  \__kernel_primitive:NN \lastnamedcs                 \luatex_lastnamedcs:D
  \__kernel_primitive:NN \latelua                     \luatex_latelua:D
  \__kernel_primitive:NN \letcharcode                 \luatex_letcharcode:D
  \__kernel_primitive:NN \luaescapestring             \luatex_luaescapestring:D
  \__kernel_primitive:NN \luafunction                 \luatex_luafunction:D
  \__kernel_primitive:NN \luatexbanner                \luatex_luatexbanner:D
  \__kernel_primitive:NN \luatexdatestamp             \luatex_luatexdatestamp:D
  \__kernel_primitive:NN \luatexrevision              \luatex_luatexrevision:D
  \__kernel_primitive:NN \luatexversion               \luatex_luatexversion:D
  \__kernel_primitive:NN \mathdisplayskipmode         \luatex_mathdisplayskipmode:D
  \__kernel_primitive:NN \matheqnogapstep             \luatex_matheqnogapstep:D
  \__kernel_primitive:NN \mathoption                  \luatex_mathoption:D
  \__kernel_primitive:NN \mathnolimitsmode            \luatex_mathnolimitsmode:D
  \__kernel_primitive:NN \mathrulesfam                \luatex_mathrulesfam:D
  \__kernel_primitive:NN \mathscriptsmode             \luatex_mathscriptsmode:D
  \__kernel_primitive:NN \mathstyle                   \luatex_mathstyle:D
  \__kernel_primitive:NN \mathsurroundskip            \luatex_mathsurroundskip:D
  \__kernel_primitive:NN \nohrule                     \luatex_nohrule:D
  \__kernel_primitive:NN \nokerns                     \luatex_nokerns:D
  \__kernel_primitive:NN \noligs                      \luatex_noligs:D
  \__kernel_primitive:NN \nospaces                    \luatex_nospaces:D
  \__kernel_primitive:NN \novrule                     \luatex_novrule:D
  \__kernel_primitive:NN \outputbox                   \luatex_outputbox:D
  \__kernel_primitive:NN \pageleftoffset              \luatex_pageleftoffset:D
  \__kernel_primitive:NN \pagetopoffset               \luatex_pagetopoffset:D
  \__kernel_primitive:NN \pdfextension                \luatex_pdfextension:D
  \__kernel_primitive:NN \pdffeedback                 \luatex_pdffeedback:D
  \__kernel_primitive:NN \pdfvariable                 \luatex_pdfvariable:D
  \__kernel_primitive:NN \postexhyphenchar            \luatex_postexhyphenchar:D
  \__kernel_primitive:NN \posthyphenchar              \luatex_posthyphenchar:D
  \__kernel_primitive:NN \preexhyphenchar             \luatex_preexhyphenchar:D
  \__kernel_primitive:NN \prehyphenchar               \luatex_prehyphenchar:D
  \__kernel_primitive:NN \savecatcodetable            \luatex_savecatcodetable:D
  \__kernel_primitive:NN \scantextokens               \luatex_scantextokens:D
  \__kernel_primitive:NN \setfontid                   \luatex_setfontid:D
  \__kernel_primitive:NN \shapemode                   \luatex_shapemode:D
  \__kernel_primitive:NN \suppressifcsnameerror       \luatex_suppressifcsnameerror:D
  \__kernel_primitive:NN \suppresslongerror           \luatex_suppresslongerror:D
  \__kernel_primitive:NN \suppressmathparerror        \luatex_suppressmathparerror:D
  \__kernel_primitive:NN \suppressoutererror          \luatex_suppressoutererror:D
  \__kernel_primitive:NN \toksapp                     \luatex_toksapp:D
  \__kernel_primitive:NN \tokspre                     \luatex_tokspre:D
  \__kernel_primitive:NN \tpack                       \luatex_tpack:D
  \__kernel_primitive:NN \vpack                       \luatex_vpack:D
%    \end{macrocode}
% Slightly more awkward are the directional primitives in \LuaTeX{}. These
% come from Omega/Aleph, but we do not support those engines and
% so it seems most sensible to treat them as \LuaTeX{} primitives for prefix
% purposes. One here is \enquote{new} but fits into the general set.
%    \begin{macrocode}
  \__kernel_primitive:NN \bodydir                     \luatex_bodydir:D
  \__kernel_primitive:NN \boxdir                      \luatex_boxdir:D
  \__kernel_primitive:NN \leftghost                   \luatex_leftghost:D
  \__kernel_primitive:NN \localbrokenpenalty          \luatex_localbrokenpenalty:D
  \__kernel_primitive:NN \localinterlinepenalty       \luatex_localinterlinepenalty:D
  \__kernel_primitive:NN \localleftbox                \luatex_localleftbox:D
  \__kernel_primitive:NN \localrightbox               \luatex_localrightbox:D
  \__kernel_primitive:NN \mathdir                     \luatex_mathdir:D
  \__kernel_primitive:NN \linedir                     \luatex_linedir:D
  \__kernel_primitive:NN \pagebottomoffset            \luatex_pagebottomoffset:D
  \__kernel_primitive:NN \pagedir                     \luatex_pagedir:D
  \__kernel_primitive:NN \pagerightoffset             \luatex_pagerightoffset:D
  \__kernel_primitive:NN \pardir                      \luatex_pardir:D
  \__kernel_primitive:NN \rightghost                  \luatex_rightghost:D
  \__kernel_primitive:NN \textdir                     \luatex_textdir:D
%    \end{macrocode}
% Primitives from \pdfTeX{} that \LuaTeX{} renames.
%    \begin{macrocode}
  \__kernel_primitive:NN \adjustspacing               \pdftex_adjustspacing:D
  \__kernel_primitive:NN \copyfont                    \pdftex_copyfont:D
  \__kernel_primitive:NN \draftmode                   \pdftex_draftmode:D
  \__kernel_primitive:NN \expandglyphsinfont          \pdftex_fontexpand:D
  \__kernel_primitive:NN \ifabsdim                    \pdftex_ifabsdim:D
  \__kernel_primitive:NN \ifabsnum                    \pdftex_ifabsnum:D
  \__kernel_primitive:NN \ignoreligaturesinfont       \pdftex_ignoreligaturesinfont:D
  \__kernel_primitive:NN \insertht                    \pdftex_insertht:D
  \__kernel_primitive:NN \lastsavedboxresourceindex   \pdftex_pdflastxform:D
  \__kernel_primitive:NN \lastsavedimageresourceindex \pdftex_pdflastximage:D
  \__kernel_primitive:NN \lastsavedimageresourcepages \pdftex_pdflastximagepages:D
  \__kernel_primitive:NN \lastxpos                    \pdftex_lastxpos:D
  \__kernel_primitive:NN \lastypos                    \pdftex_lastypos:D
  \__kernel_primitive:NN \normaldeviate               \pdftex_normaldeviate:D
  \__kernel_primitive:NN \outputmode                  \pdftex_pdfoutput:D
  \__kernel_primitive:NN \pageheight                  \pdftex_pageheight:D
  \__kernel_primitive:NN \pagewidth                   \pdftex_pagewith:D
  \__kernel_primitive:NN \protrudechars               \pdftex_protrudechars:D
  \__kernel_primitive:NN \pxdimen                     \pdftex_pxdimen:D
  \__kernel_primitive:NN \randomseed                  \pdftex_randomseed:D
  \__kernel_primitive:NN \useboxresource              \pdftex_pdfrefxform:D
  \__kernel_primitive:NN \useimageresource            \pdftex_pdfrefximage:D
  \__kernel_primitive:NN \savepos                     \pdftex_savepos:D
  \__kernel_primitive:NN \saveboxresource             \pdftex_pdfxform:D
  \__kernel_primitive:NN \saveimageresource           \pdftex_pdfximage:D
  \__kernel_primitive:NN \setrandomseed               \pdftex_setrandomseed:D
  \__kernel_primitive:NN \tracingfonts                \pdftex_tracingfonts:D
  \__kernel_primitive:NN \uniformdeviate              \pdftex_uniformdeviate:D
%    \end{macrocode}
% The set of Unicode math primitives were introduced by \XeTeX{} and \LuaTeX{}
% in a somewhat complex fashion: a few first as |\XeTeX...| which were then
% renamed with \LuaTeX{} having a lot more. These names now all start
% |\U...| and mainly |\Umath...|. To keep things somewhat clear we therefore
% prefix all of these as |\utex...| (introduced by a Unicode \TeX{} engine)
% and drop |\U(math)| from the names. Where there is a related \TeX{}90
% primitive or where it really seems required we keep the |math| part of the name.
%    \begin{macrocode}
  \__kernel_primitive:NN \Uchar                       \utex_char:D
  \__kernel_primitive:NN \Ucharcat                    \utex_charcat:D
  \__kernel_primitive:NN \Udelcode                    \utex_delcode:D
  \__kernel_primitive:NN \Udelcodenum                 \utex_delcodenum:D
  \__kernel_primitive:NN \Udelimiter                  \utex_delimiter:D
  \__kernel_primitive:NN \Udelimiterover              \utex_delimiterover:D
  \__kernel_primitive:NN \Udelimiterunder             \utex_delimiterunder:D
  \__kernel_primitive:NN \Uhextensible                \utex_hextensible:D
  \__kernel_primitive:NN \Umathaccent                 \utex_mathaccent:D
  \__kernel_primitive:NN \Umathaxis                   \utex_mathaxis:D
  \__kernel_primitive:NN \Umathbinbinspacing          \utex_binbinspacing:D
  \__kernel_primitive:NN \Umathbinclosespacing        \utex_binclosespacing:D
  \__kernel_primitive:NN \Umathbininnerspacing        \utex_bininnerspacing:D
  \__kernel_primitive:NN \Umathbinopenspacing         \utex_binopenspacing:D
  \__kernel_primitive:NN \Umathbinopspacing           \utex_binopspacing:D
  \__kernel_primitive:NN \Umathbinordspacing          \utex_binordspacing:D
  \__kernel_primitive:NN \Umathbinpunctspacing        \utex_binpunctspacing:D
  \__kernel_primitive:NN \Umathbinrelspacing          \utex_binrelspacing:D
  \__kernel_primitive:NN \Umathchar                   \utex_mathchar:D
  \__kernel_primitive:NN \Umathcharclass              \utex_mathcharclass:D
  \__kernel_primitive:NN \Umathchardef                \utex_mathchardef:D
  \__kernel_primitive:NN \Umathcharfam                \utex_mathcharfam:D
  \__kernel_primitive:NN \Umathcharnum                \utex_mathcharnum:D
  \__kernel_primitive:NN \Umathcharnumdef             \utex_mathcharnumdef:D
  \__kernel_primitive:NN \Umathcharslot               \utex_mathcharslot:D
  \__kernel_primitive:NN \Umathclosebinspacing        \utex_closebinspacing:D
  \__kernel_primitive:NN \Umathcloseclosespacing      \utex_closeclosespacing:D
  \__kernel_primitive:NN \Umathcloseinnerspacing      \utex_closeinnerspacing:D
  \__kernel_primitive:NN \Umathcloseopenspacing       \utex_closeopenspacing:D
  \__kernel_primitive:NN \Umathcloseopspacing         \utex_closeopspacing:D
  \__kernel_primitive:NN \Umathcloseordspacing        \utex_closeordspacing:D
  \__kernel_primitive:NN \Umathclosepunctspacing      \utex_closepunctspacing:D
  \__kernel_primitive:NN \Umathcloserelspacing        \utex_closerelspacing:D
  \__kernel_primitive:NN \Umathcode                   \utex_mathcode:D
  \__kernel_primitive:NN \Umathcodenum                \utex_mathcodenum:D
  \__kernel_primitive:NN \Umathconnectoroverlapmin    \utex_connectoroverlapmin:D
  \__kernel_primitive:NN \Umathfractiondelsize        \utex_fractiondelsize:D
  \__kernel_primitive:NN \Umathfractiondenomdown      \utex_fractiondenomdown:D
  \__kernel_primitive:NN \Umathfractiondenomvgap      \utex_fractiondenomvgap:D
  \__kernel_primitive:NN \Umathfractionnumup          \utex_fractionnumup:D
  \__kernel_primitive:NN \Umathfractionnumvgap        \utex_fractionnumvgap:D
  \__kernel_primitive:NN \Umathfractionrule           \utex_fractionrule:D
  \__kernel_primitive:NN \Umathinnerbinspacing        \utex_innerbinspacing:D
  \__kernel_primitive:NN \Umathinnerclosespacing      \utex_innerclosespacing:D
  \__kernel_primitive:NN \Umathinnerinnerspacing      \utex_innerinnerspacing:D
  \__kernel_primitive:NN \Umathinneropenspacing       \utex_inneropenspacing:D
  \__kernel_primitive:NN \Umathinneropspacing         \utex_inneropspacing:D
  \__kernel_primitive:NN \Umathinnerordspacing        \utex_innerordspacing:D
  \__kernel_primitive:NN \Umathinnerpunctspacing      \utex_innerpunctspacing:D
  \__kernel_primitive:NN \Umathinnerrelspacing        \utex_innerrelspacing:D
  \__kernel_primitive:NN \Umathlimitabovebgap         \utex_limitabovebgap:D
  \__kernel_primitive:NN \Umathlimitabovekern         \utex_limitabovekern:D
  \__kernel_primitive:NN \Umathlimitabovevgap         \utex_limitabovevgap:D
  \__kernel_primitive:NN \Umathlimitbelowbgap         \utex_limitbelowbgap:D
  \__kernel_primitive:NN \Umathlimitbelowkern         \utex_limitbelowkern:D
  \__kernel_primitive:NN \Umathlimitbelowvgap         \utex_limitbelowvgap:D
  \__kernel_primitive:NN \Umathnolimitsubfactor       \utex_nolimitsubfactor:D
  \__kernel_primitive:NN \Umathnolimitsupfactor       \utex_nolimitsupfactor:D
  \__kernel_primitive:NN \Umathopbinspacing           \utex_opbinspacing:D
  \__kernel_primitive:NN \Umathopclosespacing         \utex_opclosespacing:D
  \__kernel_primitive:NN \Umathopenbinspacing         \utex_openbinspacing:D
  \__kernel_primitive:NN \Umathopenclosespacing       \utex_openclosespacing:D
  \__kernel_primitive:NN \Umathopeninnerspacing       \utex_openinnerspacing:D
  \__kernel_primitive:NN \Umathopenopenspacing        \utex_openopenspacing:D
  \__kernel_primitive:NN \Umathopenopspacing          \utex_openopspacing:D
  \__kernel_primitive:NN \Umathopenordspacing         \utex_openordspacing:D
  \__kernel_primitive:NN \Umathopenpunctspacing       \utex_openpunctspacing:D
  \__kernel_primitive:NN \Umathopenrelspacing         \utex_openrelspacing:D
  \__kernel_primitive:NN \Umathoperatorsize           \utex_operatorsize:D
  \__kernel_primitive:NN \Umathopinnerspacing         \utex_opinnerspacing:D
  \__kernel_primitive:NN \Umathopopenspacing          \utex_opopenspacing:D
  \__kernel_primitive:NN \Umathopopspacing            \utex_opopspacing:D
  \__kernel_primitive:NN \Umathopordspacing           \utex_opordspacing:D
  \__kernel_primitive:NN \Umathoppunctspacing         \utex_oppunctspacing:D
  \__kernel_primitive:NN \Umathoprelspacing           \utex_oprelspacing:D
  \__kernel_primitive:NN \Umathordbinspacing          \utex_ordbinspacing:D
  \__kernel_primitive:NN \Umathordclosespacing        \utex_ordclosespacing:D
  \__kernel_primitive:NN \Umathordinnerspacing        \utex_ordinnerspacing:D
  \__kernel_primitive:NN \Umathordopenspacing         \utex_ordopenspacing:D
  \__kernel_primitive:NN \Umathordopspacing           \utex_ordopspacing:D
  \__kernel_primitive:NN \Umathordordspacing          \utex_ordordspacing:D
  \__kernel_primitive:NN \Umathordpunctspacing        \utex_ordpunctspacing:D
  \__kernel_primitive:NN \Umathordrelspacing          \utex_ordrelspacing:D
  \__kernel_primitive:NN \Umathoverbarkern            \utex_overbarkern:D
  \__kernel_primitive:NN \Umathoverbarrule            \utex_overbarrule:D
  \__kernel_primitive:NN \Umathoverbarvgap            \utex_overbarvgap:D
  \__kernel_primitive:NN \Umathoverdelimiterbgap      \utex_overdelimiterbgap:D
  \__kernel_primitive:NN \Umathoverdelimitervgap      \utex_overdelimitervgap:D
  \__kernel_primitive:NN \Umathpunctbinspacing        \utex_punctbinspacing:D
  \__kernel_primitive:NN \Umathpunctclosespacing      \utex_punctclosespacing:D
  \__kernel_primitive:NN \Umathpunctinnerspacing      \utex_punctinnerspacing:D
  \__kernel_primitive:NN \Umathpunctopenspacing       \utex_punctopenspacing:D
  \__kernel_primitive:NN \Umathpunctopspacing         \utex_punctopspacing:D
  \__kernel_primitive:NN \Umathpunctordspacing        \utex_punctordspacing:D
  \__kernel_primitive:NN \Umathpunctpunctspacing      \utex_punctpunctspacing:D
  \__kernel_primitive:NN \Umathpunctrelspacing        \utex_punctrelspacing:D
  \__kernel_primitive:NN \Umathquad                   \utex_quad:D
  \__kernel_primitive:NN \Umathradicaldegreeafter     \utex_radicaldegreeafter:D
  \__kernel_primitive:NN \Umathradicaldegreebefore    \utex_radicaldegreebefore:D
  \__kernel_primitive:NN \Umathradicaldegreeraise     \utex_radicaldegreeraise:D
  \__kernel_primitive:NN \Umathradicalkern            \utex_radicalkern:D
  \__kernel_primitive:NN \Umathradicalrule            \utex_radicalrule:D
  \__kernel_primitive:NN \Umathradicalvgap            \utex_radicalvgap:D
  \__kernel_primitive:NN \Umathrelbinspacing          \utex_relbinspacing:D
  \__kernel_primitive:NN \Umathrelclosespacing        \utex_relclosespacing:D
  \__kernel_primitive:NN \Umathrelinnerspacing        \utex_relinnerspacing:D
  \__kernel_primitive:NN \Umathrelopenspacing         \utex_relopenspacing:D
  \__kernel_primitive:NN \Umathrelopspacing           \utex_relopspacing:D
  \__kernel_primitive:NN \Umathrelordspacing          \utex_relordspacing:D
  \__kernel_primitive:NN \Umathrelpunctspacing        \utex_relpunctspacing:D
  \__kernel_primitive:NN \Umathrelrelspacing          \utex_relrelspacing:D
  \__kernel_primitive:NN \Umathskewedfractionhgap     \utex_skewedfractionhgap:D
  \__kernel_primitive:NN \Umathskewedfractionvgap     \utex_skewedfractionvgap:D
  \__kernel_primitive:NN \Umathspaceafterscript       \utex_spaceafterscript:D
  \__kernel_primitive:NN \Umathstackdenomdown         \utex_stackdenomdown:D
  \__kernel_primitive:NN \Umathstacknumup             \utex_stacknumup:D
  \__kernel_primitive:NN \Umathstackvgap              \utex_stackvgap:D
  \__kernel_primitive:NN \Umathsubshiftdown           \utex_subshiftdown:D
  \__kernel_primitive:NN \Umathsubshiftdrop           \utex_subshiftdrop:D
  \__kernel_primitive:NN \Umathsubsupshiftdown        \utex_subsupshiftdown:D
  \__kernel_primitive:NN \Umathsubsupvgap             \utex_subsupvgap:D
  \__kernel_primitive:NN \Umathsubtopmax              \utex_subtopmax:D
  \__kernel_primitive:NN \Umathsupbottommin           \utex_supbottommin:D
  \__kernel_primitive:NN \Umathsupshiftdrop           \utex_supshiftdrop:D
  \__kernel_primitive:NN \Umathsupshiftup             \utex_supshiftup:D
  \__kernel_primitive:NN \Umathsupsubbottommax        \utex_supsubbottommax:D
  \__kernel_primitive:NN \Umathunderbarkern           \utex_underbarkern:D
  \__kernel_primitive:NN \Umathunderbarrule           \utex_underbarrule:D
  \__kernel_primitive:NN \Umathunderbarvgap           \utex_underbarvgap:D
  \__kernel_primitive:NN \Umathunderdelimiterbgap     \utex_underdelimiterbgap:D
  \__kernel_primitive:NN \Umathunderdelimitervgap     \utex_underdelimitervgap:D
  \__kernel_primitive:NN \Uoverdelimiter              \utex_overdelimiter:D
  \__kernel_primitive:NN \Uradical                    \utex_radical:D
  \__kernel_primitive:NN \Uroot                       \utex_root:D
  \__kernel_primitive:NN \Uskewed                     \utex_skewed:D
  \__kernel_primitive:NN \Uskewedwithdelims           \utex_skewedwithdelims:D
  \__kernel_primitive:NN \Ustack                      \utex_stack:D
  \__kernel_primitive:NN \Ustartdisplaymath           \utex_startdisplaymath:D
  \__kernel_primitive:NN \Ustartmath                  \utex_startmath:D
  \__kernel_primitive:NN \Ustopdisplaymath            \utex_stopdisplaymath:D
  \__kernel_primitive:NN \Ustopmath                   \utex_stopmath:D
  \__kernel_primitive:NN \Usubscript                  \utex_subscript:D
  \__kernel_primitive:NN \Usuperscript                \utex_superscript:D
  \__kernel_primitive:NN \Uunderdelimiter             \utex_underdelimiter:D
  \__kernel_primitive:NN \Uvextensible                \utex_vextensible:D
%    \end{macrocode}
% Primitives from p\TeX{}.
%    \begin{macrocode}
  \__kernel_primitive:NN \autospacing                 \ptex_autospacing:D
  \__kernel_primitive:NN \autoxspacing                \ptex_autoxspacing:D
  \__kernel_primitive:NN \dtou                        \ptex_dtou:D
  \__kernel_primitive:NN \euc                         \ptex_euc:D
  \__kernel_primitive:NN \ifdbox                      \ptex_ifdbox:D
  \__kernel_primitive:NN \ifddir                      \ptex_ifddir:D
  \__kernel_primitive:NN \ifmdir                      \ptex_ifmdir:D
  \__kernel_primitive:NN \iftbox                      \ptex_iftbox:D
  \__kernel_primitive:NN \iftdir                      \ptex_iftdir:D
  \__kernel_primitive:NN \ifybox                      \ptex_ifybox:D
  \__kernel_primitive:NN \ifydir                      \ptex_ifydir:D
  \__kernel_primitive:NN \inhibitglue                 \ptex_inhibitglue:D
  \__kernel_primitive:NN \inhibitxspcode              \ptex_inhibitxspcode:D
  \__kernel_primitive:NN \jcharwidowpenalty           \ptex_jcharwidowpenalty:D
  \__kernel_primitive:NN \jfam                        \ptex_jfam:D
  \__kernel_primitive:NN \jfont                       \ptex_jfont:D
  \__kernel_primitive:NN \jis                         \ptex_jis:D
  \__kernel_primitive:NN \kanjiskip                   \ptex_kanjiskip:D
  \__kernel_primitive:NN \kansuji                     \ptex_kansuji:D
  \__kernel_primitive:NN \kansujichar                 \ptex_kansujichar:D
  \__kernel_primitive:NN \kcatcode                    \ptex_kcatcode:D
  \__kernel_primitive:NN \kuten                       \ptex_kuten:D
  \__kernel_primitive:NN \noautospacing               \ptex_noautospacing:D
  \__kernel_primitive:NN \noautoxspacing              \ptex_noautoxspacing:D
  \__kernel_primitive:NN \postbreakpenalty            \ptex_postbreakpenalty:D
  \__kernel_primitive:NN \prebreakpenalty             \ptex_prebreakpenalty:D
  \__kernel_primitive:NN \showmode                    \ptex_showmode:D
  \__kernel_primitive:NN \sjis                        \ptex_sjis:D
  \__kernel_primitive:NN \tate                        \ptex_tate:D
  \__kernel_primitive:NN \tbaselineshift              \ptex_tbaselineshift:D
  \__kernel_primitive:NN \tfont                       \ptex_tfont:D
  \__kernel_primitive:NN \xkanjiskip                  \ptex_xkanjiskip:D
  \__kernel_primitive:NN \xspcode                     \ptex_xspcode:D
  \__kernel_primitive:NN \ybaselineshift              \ptex_ybaselineshift:D
  \__kernel_primitive:NN \yoko                        \ptex_yoko:D
%    \end{macrocode}
% Primitives from up\TeX{}.
%    \begin{macrocode}
  \__kernel_primitive:NN \disablecjktoken             \uptex_disablecjktoken:D
  \__kernel_primitive:NN \enablecjktoken              \uptex_enablecjktoken:D
  \__kernel_primitive:NN \forcecjktoken               \uptex_forcecjktoken:D
  \__kernel_primitive:NN \kchar                       \uptex_kchar:D
  \__kernel_primitive:NN \kchardef                    \uptex_kchardef:D
  \__kernel_primitive:NN \kuten                       \uptex_kuten:D
  \__kernel_primitive:NN \ucs                         \uptex_ucs: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}
% Some tidying up is needed for \tn[index=tracingfonts]{(pdf)tracingfonts}. Newer \LuaTeX{} has
% this simply as \tn{tracingfonts}, but that will have been overwritten by
% the \LaTeXe{} kernel. So any spurious definition has to be removed, then
% the real version saved either from the \pdfTeX{} name or from \LuaTeX{}.
% In the latter case, we leave \tn{@@tracingfonts} available: this might
% be useful and almost all \LaTeXe{} users will have \pkg{expl3} loaded by
% \pkg{fontspec}. (We follow the usual kernel convention that |@@| is used
% for saved primitives.)
%   \begin{macrocode}
  \tex_let:D \pdftex_tracingfonts:D \tex_undefined:D
  \etex_ifdefined:D \pdftracingfonts
    \tex_let:D \pdftex_tracingfonts:D \pdftracingfonts
  \tex_else:D
    \etex_ifdefined:D \luatex_directlua:D
      \luatex_directlua:D { tex.enableprimitives("@@", {"tracingfonts"}) }
      \tex_let:D \pdftex_tracingfonts:D \luatextracingfonts
    \tex_fi:D
  \tex_fi:D
\tex_fi:D
%    \end{macrocode}
% That is also true for the \LuaTeX{} primitives under \LaTeXe{}
% (depending on the format-building date). There are a few primitives
% that get the right names anyway so are missing here!
%    \begin{macrocode}
\etex_ifdefined:D \luatexsuppressfontnotfounderror
  \tex_let:D \luatex_alignmark:D                 \luatexalignmark
  \tex_let:D \luatex_aligntab:D                  \luatexaligntab
  \tex_let:D \luatex_attribute:D                 \luatexattribute
  \tex_let:D \luatex_attributedef:D              \luatexattributedef
  \tex_let:D \luatex_catcodetable:D              \luatexcatcodetable
  \tex_let:D \luatex_clearmarks:D                \luatexclearmarks
  \tex_let:D \luatex_crampeddisplaystyle:D       \luatexcrampeddisplaystyle
  \tex_let:D \luatex_crampedscriptscriptstyle:D  \luatexcrampedscriptscriptstyle
  \tex_let:D \luatex_crampedscriptstyle:D        \luatexcrampedscriptstyle
  \tex_let:D \luatex_crampedtextstyle:D          \luatexcrampedtextstyle
  \tex_let:D \luatex_fontid:D                    \luatexfontid
  \tex_let:D \luatex_formatname:D                \luatexformatname
  \tex_let:D \luatex_gleaders:D                  \luatexgleaders
  \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_luafunction:D               \luatexluafunction
  \tex_let:D \luatex_mathstyle:D                 \luatexmathstyle
  \tex_let:D \luatex_nokerns:D                   \luatexnokerns
  \tex_let:D \luatex_noligs:D                    \luatexnoligs
  \tex_let:D \luatex_outputbox:D                 \luatexoutputbox
  \tex_let:D \luatex_pageleftoffset:D            \luatexpageleftoffset
  \tex_let:D \luatex_pagetopoffset:D             \luatexpagetopoffset
  \tex_let:D \luatex_postexhyphenchar:D          \luatexpostexhyphenchar
  \tex_let:D \luatex_posthyphenchar:D            \luatexposthyphenchar
  \tex_let:D \luatex_preexhyphenchar:D           \luatexpreexhyphenchar
  \tex_let:D \luatex_prehyphenchar:D             \luatexprehyphenchar
  \tex_let:D \luatex_savecatcodetable:D          \luatexsavecatcodetable
  \tex_let:D \luatex_scantextokens:D             \luatexscantextokens
  \tex_let:D \luatex_suppressifcsnameerror:D     \luatexsuppressifcsnameerror
  \tex_let:D \luatex_suppresslongerror:D         \luatexsuppresslongerror
  \tex_let:D \luatex_suppressmathparerror:D      \luatexsuppressmathparerror
  \tex_let:D \luatex_suppressoutererror:D        \luatexsuppressoutererror
  \tex_let:D \utex_char:D                        \luatexUchar
  \tex_let:D \xetex_suppressfontnotfounderror:D  \luatexsuppressfontnotfounderror
%    \end{macrocode}
% Which also covers those slightly odd ones.
%    \begin{macrocode}
  \tex_let:D \luatex_bodydir:D               \luatexbodydir
  \tex_let:D \luatex_boxdir:D                \luatexboxdir
  \tex_let:D \luatex_leftghost:D             \luatexleftghost
  \tex_let:D \luatex_localbrokenpenalty:D    \luatexlocalbrokenpenalty
  \tex_let:D \luatex_localinterlinepenalty:D \luatexlocalinterlinepenalty
  \tex_let:D \luatex_localleftbox:D          \luatexlocalleftbox
  \tex_let:D \luatex_localrightbox:D         \luatexlocalrightbox
  \tex_let:D \luatex_mathdir:D               \luatexmathdir
  \tex_let:D \luatex_pagebottomoffset:D      \luatexpagebottomoffset
  \tex_let:D \luatex_pagedir:D               \luatexpagedir
  \tex_let:D \pdftex_pageheight:D            \luatexpageheight
  \tex_let:D \luatex_pagerightoffset:D       \luatexpagerightoffset
  \tex_let:D \pdftex_pagewidth:D             \luatexpagewidth
  \tex_let:D \luatex_pardir:D                \luatexpardir
  \tex_let:D \luatex_rightghost:D            \luatexrightghost
  \tex_let:D \luatex_textdir:D               \luatextextdir
\tex_fi:D
%    \end{macrocode}
% Only \pdfTeX{} and \LuaTeX{} define \tn{pdfmapfile} and \tn{pdfmapline}:
% Tidy up the fact that some format-building processes leave
% a couple of questionable decisions about that!
%    \begin{macrocode}
\tex_ifnum:D 0
  \etex_ifdefined:D \pdftex_pdftexversion:D 1 \tex_fi:D
  \etex_ifdefined:D \luatex_luatexversion:D 1 \tex_fi:D
    = 0 %
  \tex_let:D \pdftex_mapfile:D \tex_undefined:D
  \tex_let:D \pdftex_mapline:D \tex_undefined:D
\tex_fi:D
%</package>
%    \end{macrocode}
% Older \XeTeX{} versions use |\XeTeX| as the prefix for the Unicode math
% primitives it knows. That is tided up here (we support \XeTeX{} versions
% from 0.9994 but this change was in 0.9999).
%    \begin{macrocode}
%<*initex|package>
\etex_ifdefined:D \XeTeXdelcode
  \tex_let:D \utex_delcode:D        \XeTeXdelcode
  \tex_let:D \utex_delcodenum:D     \XeTeXdelcodenum
  \tex_let:D \utex_delimiter:D      \XeTeXdelimiter
  \tex_let:D \utex_mathaccent:D     \XeTeXmathaccent
  \tex_let:D \utex_mathchar:D       \XeTeXmathchar
  \tex_let:D \utex_mathchardef:D    \XeTeXmathchardef
  \tex_let:D \utex_mathcharnum:D    \XeTeXmathcharnum
  \tex_let:D \utex_mathcharnumdef:D \XeTeXmathcharnumdef
  \tex_let:D \utex_mathcode:D       \XeTeXmathcode
  \tex_let:D \utex_mathcodenum:D    \XeTeXmathcodenum
\tex_fi:D
%    \end{macrocode}
% Up to v0.80, \LuaTeX{} defines the \pdfTeX{} version data: rather
% confusing. Removing them means that \cs{pdftex_pdftexversion:D} is
% a marker for \pdfTeX{} alone: useful in engine-dependent code later.
%    \begin{macrocode}
\etex_ifdefined:D \luatex_luatexversion:D
  \tex_let:D \pdftex_pdftexbanner:D   \tex_undefined:D
  \tex_let:D \pdftex_pdftexrevision:D \tex_undefined:D
  \tex_let:D \pdftex_pdftexversion:D  \tex_undefined:D
\tex_fi:D
%</initex|package>
%    \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}
%<*package>
\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
