% \iffalse meta-comment
%
%% File: l3names.dtx Copyright (C) 1990-2017 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 development version of the bundle can be found at
%
%    https://github.com/latex3/latex3
%
% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
\begin{document}
  \DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%
% \title{^^A
%   The \pkg{l3names} package\\ Namespace for primitives^^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 2017/09/18}
%
% \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[no-index]{tex_\ldots}}] Introduced by \TeX{} itself;
%   \item[{\cs[no-index]{etex_\ldots}}] Introduced by the \eTeX{} extensions;
%   \item[{\cs[no-index]{pdftex_\ldots}}] Introduced by \pdfTeX{};
%   \item[{\cs[no-index]{xetex_\ldots}}] Introduced by \XeTeX{};
%   \item[{\cs[no-index]{luatex_\ldots}}] Introduced by \LuaTeX{};
%   \item[{\cs[no-index]{utex_\ldots}}] Introduced by \XeTeX{} and \LuaTeX{};
%   \item[{\cs[no-index]{ptex_\ldots}}] Introduced by p\TeX{};
%   \item[{\cs[no-index]{uptex_\ldots}}] Introduced by up\TeX{}.
% \end{itemize}
%
% \end{documentation}
%
% \begin{implementation}
%
% \section{\pkg{l3names} implementation}
%
%    \begin{macrocode}
%<*initex|package>
%    \end{macrocode}
%
% The prefix here is \texttt{kernel}.  A few places need |@@| to be left
% as is; this is obtained as |@@@@|.
%    \begin{macrocode}
%<@@=kernel>
%    \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{@@_primitive:NN} trapped.
%    \begin{macrocode}
\begingroup
%    \end{macrocode}
%
% \begin{macro}[aux]{\@@_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 \@@_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}
  \@@_primitive:NN \                          \tex_space:D
  \@@_primitive:NN \/                         \tex_italiccorrection:D
  \@@_primitive:NN \-                         \tex_hyphen:D
%    \end{macrocode}
%
% Now all the other primitives.
%    \begin{macrocode}
  \@@_primitive:NN \above                       \tex_above:D
  \@@_primitive:NN \abovedisplayshortskip       \tex_abovedisplayshortskip:D
  \@@_primitive:NN \abovedisplayskip            \tex_abovedisplayskip:D
  \@@_primitive:NN \abovewithdelims             \tex_abovewithdelims:D
  \@@_primitive:NN \accent                      \tex_accent:D
  \@@_primitive:NN \adjdemerits                 \tex_adjdemerits:D
  \@@_primitive:NN \advance                     \tex_advance:D
  \@@_primitive:NN \afterassignment             \tex_afterassignment:D
  \@@_primitive:NN \aftergroup                  \tex_aftergroup:D
  \@@_primitive:NN \atop                        \tex_atop:D
  \@@_primitive:NN \atopwithdelims              \tex_atopwithdelims:D
  \@@_primitive:NN \badness                     \tex_badness:D
  \@@_primitive:NN \baselineskip                \tex_baselineskip:D
  \@@_primitive:NN \batchmode                   \tex_batchmode:D
  \@@_primitive:NN \begingroup                  \tex_begingroup:D
  \@@_primitive:NN \belowdisplayshortskip       \tex_belowdisplayshortskip:D
  \@@_primitive:NN \belowdisplayskip            \tex_belowdisplayskip:D
  \@@_primitive:NN \binoppenalty                \tex_binoppenalty:D
  \@@_primitive:NN \botmark                     \tex_botmark:D
  \@@_primitive:NN \box                         \tex_box:D
  \@@_primitive:NN \boxmaxdepth                 \tex_boxmaxdepth:D
  \@@_primitive:NN \brokenpenalty               \tex_brokenpenalty:D
  \@@_primitive:NN \catcode                     \tex_catcode:D
  \@@_primitive:NN \char                        \tex_char:D
  \@@_primitive:NN \chardef                     \tex_chardef:D
  \@@_primitive:NN \cleaders                    \tex_cleaders:D
  \@@_primitive:NN \closein                     \tex_closein:D
  \@@_primitive:NN \closeout                    \tex_closeout:D
  \@@_primitive:NN \clubpenalty                 \tex_clubpenalty:D
  \@@_primitive:NN \copy                        \tex_copy:D
  \@@_primitive:NN \count                       \tex_count:D
  \@@_primitive:NN \countdef                    \tex_countdef:D
  \@@_primitive:NN \cr                          \tex_cr:D
  \@@_primitive:NN \crcr                        \tex_crcr:D
  \@@_primitive:NN \csname                      \tex_csname:D
  \@@_primitive:NN \day                         \tex_day:D
  \@@_primitive:NN \deadcycles                  \tex_deadcycles:D
  \@@_primitive:NN \def                         \tex_def:D
  \@@_primitive:NN \defaulthyphenchar           \tex_defaulthyphenchar:D
  \@@_primitive:NN \defaultskewchar             \tex_defaultskewchar:D
  \@@_primitive:NN \delcode                     \tex_delcode:D
  \@@_primitive:NN \delimiter                   \tex_delimiter:D
  \@@_primitive:NN \delimiterfactor             \tex_delimiterfactor:D
  \@@_primitive:NN \delimitershortfall          \tex_delimitershortfall:D
  \@@_primitive:NN \dimen                       \tex_dimen:D
  \@@_primitive:NN \dimendef                    \tex_dimendef:D
  \@@_primitive:NN \discretionary               \tex_discretionary:D
  \@@_primitive:NN \displayindent               \tex_displayindent:D
  \@@_primitive:NN \displaylimits               \tex_displaylimits:D
  \@@_primitive:NN \displaystyle                \tex_displaystyle:D
  \@@_primitive:NN \displaywidowpenalty         \tex_displaywidowpenalty:D
  \@@_primitive:NN \displaywidth                \tex_displaywidth:D
  \@@_primitive:NN \divide                      \tex_divide:D
  \@@_primitive:NN \doublehyphendemerits        \tex_doublehyphendemerits:D
  \@@_primitive:NN \dp                          \tex_dp:D
  \@@_primitive:NN \dump                        \tex_dump:D
  \@@_primitive:NN \edef                        \tex_edef:D
  \@@_primitive:NN \else                        \tex_else:D
  \@@_primitive:NN \emergencystretch            \tex_emergencystretch:D
  \@@_primitive:NN \end                         \tex_end:D
  \@@_primitive:NN \endcsname                   \tex_endcsname:D
  \@@_primitive:NN \endgroup                    \tex_endgroup:D
  \@@_primitive:NN \endinput                    \tex_endinput:D
  \@@_primitive:NN \endlinechar                 \tex_endlinechar:D
  \@@_primitive:NN \eqno                        \tex_eqno:D
  \@@_primitive:NN \errhelp                     \tex_errhelp:D
  \@@_primitive:NN \errmessage                  \tex_errmessage:D
  \@@_primitive:NN \errorcontextlines           \tex_errorcontextlines:D
  \@@_primitive:NN \errorstopmode               \tex_errorstopmode:D
  \@@_primitive:NN \escapechar                  \tex_escapechar:D
  \@@_primitive:NN \everycr                     \tex_everycr:D
  \@@_primitive:NN \everydisplay                \tex_everydisplay:D
  \@@_primitive:NN \everyhbox                   \tex_everyhbox:D
  \@@_primitive:NN \everyjob                    \tex_everyjob:D
  \@@_primitive:NN \everymath                   \tex_everymath:D
  \@@_primitive:NN \everypar                    \tex_everypar:D
  \@@_primitive:NN \everyvbox                   \tex_everyvbox:D
  \@@_primitive:NN \exhyphenpenalty             \tex_exhyphenpenalty:D
  \@@_primitive:NN \expandafter                 \tex_expandafter:D
  \@@_primitive:NN \fam                         \tex_fam:D
  \@@_primitive:NN \fi                          \tex_fi:D
  \@@_primitive:NN \finalhyphendemerits         \tex_finalhyphendemerits:D
  \@@_primitive:NN \firstmark                   \tex_firstmark:D
  \@@_primitive:NN \floatingpenalty             \tex_floatingpenalty:D
  \@@_primitive:NN \font                        \tex_font:D
  \@@_primitive:NN \fontdimen                   \tex_fontdimen:D
  \@@_primitive:NN \fontname                    \tex_fontname:D
  \@@_primitive:NN \futurelet                   \tex_futurelet:D
  \@@_primitive:NN \gdef                        \tex_gdef:D
  \@@_primitive:NN \global                      \tex_global:D
  \@@_primitive:NN \globaldefs                  \tex_globaldefs:D
  \@@_primitive:NN \halign                      \tex_halign:D
  \@@_primitive:NN \hangafter                   \tex_hangafter:D
  \@@_primitive:NN \hangindent                  \tex_hangindent:D
  \@@_primitive:NN \hbadness                    \tex_hbadness:D
  \@@_primitive:NN \hbox                        \tex_hbox:D
  \@@_primitive:NN \hfil                        \tex_hfil:D
  \@@_primitive:NN \hfill                       \tex_hfill:D
  \@@_primitive:NN \hfilneg                     \tex_hfilneg:D
  \@@_primitive:NN \hfuzz                       \tex_hfuzz:D
  \@@_primitive:NN \hoffset                     \tex_hoffset:D
  \@@_primitive:NN \holdinginserts              \tex_holdinginserts:D
  \@@_primitive:NN \hrule                       \tex_hrule:D
  \@@_primitive:NN \hsize                       \tex_hsize:D
  \@@_primitive:NN \hskip                       \tex_hskip:D
  \@@_primitive:NN \hss                         \tex_hss:D
  \@@_primitive:NN \ht                          \tex_ht:D
  \@@_primitive:NN \hyphenation                 \tex_hyphenation:D
  \@@_primitive:NN \hyphenchar                  \tex_hyphenchar:D
  \@@_primitive:NN \hyphenpenalty               \tex_hyphenpenalty:D
  \@@_primitive:NN \if                          \tex_if:D
  \@@_primitive:NN \ifcase                      \tex_ifcase:D
  \@@_primitive:NN \ifcat                       \tex_ifcat:D
  \@@_primitive:NN \ifdim                       \tex_ifdim:D
  \@@_primitive:NN \ifeof                       \tex_ifeof:D
  \@@_primitive:NN \iffalse                     \tex_iffalse:D
  \@@_primitive:NN \ifhbox                      \tex_ifhbox:D
  \@@_primitive:NN \ifhmode                     \tex_ifhmode:D
  \@@_primitive:NN \ifinner                     \tex_ifinner:D
  \@@_primitive:NN \ifmmode                     \tex_ifmmode:D
  \@@_primitive:NN \ifnum                       \tex_ifnum:D
  \@@_primitive:NN \ifodd                       \tex_ifodd:D
  \@@_primitive:NN \iftrue                      \tex_iftrue:D
  \@@_primitive:NN \ifvbox                      \tex_ifvbox:D
  \@@_primitive:NN \ifvmode                     \tex_ifvmode:D
  \@@_primitive:NN \ifvoid                      \tex_ifvoid:D
  \@@_primitive:NN \ifx                         \tex_ifx:D
  \@@_primitive:NN \ignorespaces                \tex_ignorespaces:D
  \@@_primitive:NN \immediate                   \tex_immediate:D
  \@@_primitive:NN \indent                      \tex_indent:D
  \@@_primitive:NN \input                       \tex_input:D
  \@@_primitive:NN \inputlineno                 \tex_inputlineno:D
  \@@_primitive:NN \insert                      \tex_insert:D
  \@@_primitive:NN \insertpenalties             \tex_insertpenalties:D
  \@@_primitive:NN \interlinepenalty            \tex_interlinepenalty:D
  \@@_primitive:NN \jobname                     \tex_jobname:D
  \@@_primitive:NN \kern                        \tex_kern:D
  \@@_primitive:NN \language                    \tex_language:D
  \@@_primitive:NN \lastbox                     \tex_lastbox:D
  \@@_primitive:NN \lastkern                    \tex_lastkern:D
  \@@_primitive:NN \lastpenalty                 \tex_lastpenalty:D
  \@@_primitive:NN \lastskip                    \tex_lastskip:D
  \@@_primitive:NN \lccode                      \tex_lccode:D
  \@@_primitive:NN \leaders                     \tex_leaders:D
  \@@_primitive:NN \left                        \tex_left:D
  \@@_primitive:NN \lefthyphenmin               \tex_lefthyphenmin:D
  \@@_primitive:NN \leftskip                    \tex_leftskip:D
  \@@_primitive:NN \leqno                       \tex_leqno:D
  \@@_primitive:NN \let                         \tex_let:D
  \@@_primitive:NN \limits                      \tex_limits:D
  \@@_primitive:NN \linepenalty                 \tex_linepenalty:D
  \@@_primitive:NN \lineskip                    \tex_lineskip:D
  \@@_primitive:NN \lineskiplimit               \tex_lineskiplimit:D
  \@@_primitive:NN \long                        \tex_long:D
  \@@_primitive:NN \looseness                   \tex_looseness:D
  \@@_primitive:NN \lower                       \tex_lower:D
  \@@_primitive:NN \lowercase                   \tex_lowercase:D
  \@@_primitive:NN \mag                         \tex_mag:D
  \@@_primitive:NN \mark                        \tex_mark:D
  \@@_primitive:NN \mathaccent                  \tex_mathaccent:D
  \@@_primitive:NN \mathbin                     \tex_mathbin:D
  \@@_primitive:NN \mathchar                    \tex_mathchar:D
  \@@_primitive:NN \mathchardef                 \tex_mathchardef:D
  \@@_primitive:NN \mathchoice                  \tex_mathchoice:D
  \@@_primitive:NN \mathclose                   \tex_mathclose:D
  \@@_primitive:NN \mathcode                    \tex_mathcode:D
  \@@_primitive:NN \mathinner                   \tex_mathinner:D
  \@@_primitive:NN \mathop                      \tex_mathop:D
  \@@_primitive:NN \mathopen                    \tex_mathopen:D
  \@@_primitive:NN \mathord                     \tex_mathord:D
  \@@_primitive:NN \mathpunct                   \tex_mathpunct:D
  \@@_primitive:NN \mathrel                     \tex_mathrel:D
  \@@_primitive:NN \mathsurround                \tex_mathsurround:D
  \@@_primitive:NN \maxdeadcycles               \tex_maxdeadcycles:D
  \@@_primitive:NN \maxdepth                    \tex_maxdepth:D
  \@@_primitive:NN \meaning                     \tex_meaning:D
  \@@_primitive:NN \medmuskip                   \tex_medmuskip:D
  \@@_primitive:NN \message                     \tex_message:D
  \@@_primitive:NN \mkern                       \tex_mkern:D
  \@@_primitive:NN \month                       \tex_month:D
  \@@_primitive:NN \moveleft                    \tex_moveleft:D
  \@@_primitive:NN \moveright                   \tex_moveright:D
  \@@_primitive:NN \mskip                       \tex_mskip:D
  \@@_primitive:NN \multiply                    \tex_multiply:D
  \@@_primitive:NN \muskip                      \tex_muskip:D
  \@@_primitive:NN \muskipdef                   \tex_muskipdef:D
  \@@_primitive:NN \newlinechar                 \tex_newlinechar:D
  \@@_primitive:NN \noalign                     \tex_noalign:D
  \@@_primitive:NN \noboundary                  \tex_noboundary:D
  \@@_primitive:NN \noexpand                    \tex_noexpand:D
  \@@_primitive:NN \noindent                    \tex_noindent:D
  \@@_primitive:NN \nolimits                    \tex_nolimits:D
  \@@_primitive:NN \nonscript                   \tex_nonscript:D
  \@@_primitive:NN \nonstopmode                 \tex_nonstopmode:D
  \@@_primitive:NN \nulldelimiterspace          \tex_nulldelimiterspace:D
  \@@_primitive:NN \nullfont                    \tex_nullfont:D
  \@@_primitive:NN \number                      \tex_number:D
  \@@_primitive:NN \omit                        \tex_omit:D
  \@@_primitive:NN \openin                      \tex_openin:D
  \@@_primitive:NN \openout                     \tex_openout:D
  \@@_primitive:NN \or                          \tex_or:D
  \@@_primitive:NN \outer                       \tex_outer:D
  \@@_primitive:NN \output                      \tex_output:D
  \@@_primitive:NN \outputpenalty               \tex_outputpenalty:D
  \@@_primitive:NN \over                        \tex_over:D
  \@@_primitive:NN \overfullrule                \tex_overfullrule:D
  \@@_primitive:NN \overline                    \tex_overline:D
  \@@_primitive:NN \overwithdelims              \tex_overwithdelims:D
  \@@_primitive:NN \pagedepth                   \tex_pagedepth:D
  \@@_primitive:NN \pagefilllstretch            \tex_pagefilllstretch:D
  \@@_primitive:NN \pagefillstretch             \tex_pagefillstretch:D
  \@@_primitive:NN \pagefilstretch              \tex_pagefilstretch:D
  \@@_primitive:NN \pagegoal                    \tex_pagegoal:D
  \@@_primitive:NN \pageshrink                  \tex_pageshrink:D
  \@@_primitive:NN \pagestretch                 \tex_pagestretch:D
  \@@_primitive:NN \pagetotal                   \tex_pagetotal:D
  \@@_primitive:NN \par                         \tex_par:D
  \@@_primitive:NN \parfillskip                 \tex_parfillskip:D
  \@@_primitive:NN \parindent                   \tex_parindent:D
  \@@_primitive:NN \parshape                    \tex_parshape:D
  \@@_primitive:NN \parskip                     \tex_parskip:D
  \@@_primitive:NN \patterns                    \tex_patterns:D
  \@@_primitive:NN \pausing                     \tex_pausing:D
  \@@_primitive:NN \penalty                     \tex_penalty:D
  \@@_primitive:NN \postdisplaypenalty          \tex_postdisplaypenalty:D
  \@@_primitive:NN \predisplaypenalty           \tex_predisplaypenalty:D
  \@@_primitive:NN \predisplaysize              \tex_predisplaysize:D
  \@@_primitive:NN \pretolerance                \tex_pretolerance:D
  \@@_primitive:NN \prevdepth                   \tex_prevdepth:D
  \@@_primitive:NN \prevgraf                    \tex_prevgraf:D
  \@@_primitive:NN \radical                     \tex_radical:D
  \@@_primitive:NN \raise                       \tex_raise:D
  \@@_primitive:NN \read                        \tex_read:D
  \@@_primitive:NN \relax                       \tex_relax:D
  \@@_primitive:NN \relpenalty                  \tex_relpenalty:D
  \@@_primitive:NN \right                       \tex_right:D
  \@@_primitive:NN \righthyphenmin              \tex_righthyphenmin:D
  \@@_primitive:NN \rightskip                   \tex_rightskip:D
  \@@_primitive:NN \romannumeral                \tex_romannumeral:D
  \@@_primitive:NN \scriptfont                  \tex_scriptfont:D
  \@@_primitive:NN \scriptscriptfont            \tex_scriptscriptfont:D
  \@@_primitive:NN \scriptscriptstyle           \tex_scriptscriptstyle:D
  \@@_primitive:NN \scriptspace                 \tex_scriptspace:D
  \@@_primitive:NN \scriptstyle                 \tex_scriptstyle:D
  \@@_primitive:NN \scrollmode                  \tex_scrollmode:D
  \@@_primitive:NN \setbox                      \tex_setbox:D
  \@@_primitive:NN \setlanguage                 \tex_setlanguage:D
  \@@_primitive:NN \sfcode                      \tex_sfcode:D
  \@@_primitive:NN \shipout                     \tex_shipout:D
  \@@_primitive:NN \show                        \tex_show:D
  \@@_primitive:NN \showbox                     \tex_showbox:D
  \@@_primitive:NN \showboxbreadth              \tex_showboxbreadth:D
  \@@_primitive:NN \showboxdepth                \tex_showboxdepth:D
  \@@_primitive:NN \showlists                   \tex_showlists:D
  \@@_primitive:NN \showthe                     \tex_showthe:D
  \@@_primitive:NN \skewchar                    \tex_skewchar:D
  \@@_primitive:NN \skip                        \tex_skip:D
  \@@_primitive:NN \skipdef                     \tex_skipdef:D
  \@@_primitive:NN \spacefactor                 \tex_spacefactor:D
  \@@_primitive:NN \spaceskip                   \tex_spaceskip:D
  \@@_primitive:NN \span                        \tex_span:D
  \@@_primitive:NN \special                     \tex_special:D
  \@@_primitive:NN \splitbotmark                \tex_splitbotmark:D
  \@@_primitive:NN \splitfirstmark              \tex_splitfirstmark:D
  \@@_primitive:NN \splitmaxdepth               \tex_splitmaxdepth:D
  \@@_primitive:NN \splittopskip                \tex_splittopskip:D
  \@@_primitive:NN \string                      \tex_string:D
  \@@_primitive:NN \tabskip                     \tex_tabskip:D
  \@@_primitive:NN \textfont                    \tex_textfont:D
  \@@_primitive:NN \textstyle                   \tex_textstyle:D
  \@@_primitive:NN \the                         \tex_the:D
  \@@_primitive:NN \thickmuskip                 \tex_thickmuskip:D
  \@@_primitive:NN \thinmuskip                  \tex_thinmuskip:D
  \@@_primitive:NN \time                        \tex_time:D
  \@@_primitive:NN \toks                        \tex_toks:D
  \@@_primitive:NN \toksdef                     \tex_toksdef:D
  \@@_primitive:NN \tolerance                   \tex_tolerance:D
  \@@_primitive:NN \topmark                     \tex_topmark:D
  \@@_primitive:NN \topskip                     \tex_topskip:D
  \@@_primitive:NN \tracingcommands             \tex_tracingcommands:D
  \@@_primitive:NN \tracinglostchars            \tex_tracinglostchars:D
  \@@_primitive:NN \tracingmacros               \tex_tracingmacros:D
  \@@_primitive:NN \tracingonline               \tex_tracingonline:D
  \@@_primitive:NN \tracingoutput               \tex_tracingoutput:D
  \@@_primitive:NN \tracingpages                \tex_tracingpages:D
  \@@_primitive:NN \tracingparagraphs           \tex_tracingparagraphs:D
  \@@_primitive:NN \tracingrestores             \tex_tracingrestores:D
  \@@_primitive:NN \tracingstats                \tex_tracingstats:D
  \@@_primitive:NN \uccode                      \tex_uccode:D
  \@@_primitive:NN \uchyph                      \tex_uchyph:D
  \@@_primitive:NN \underline                   \tex_underline:D
  \@@_primitive:NN \unhbox                      \tex_unhbox:D
  \@@_primitive:NN \unhcopy                     \tex_unhcopy:D
  \@@_primitive:NN \unkern                      \tex_unkern:D
  \@@_primitive:NN \unpenalty                   \tex_unpenalty:D
  \@@_primitive:NN \unskip                      \tex_unskip:D
  \@@_primitive:NN \unvbox                      \tex_unvbox:D
  \@@_primitive:NN \unvcopy                     \tex_unvcopy:D
  \@@_primitive:NN \uppercase                   \tex_uppercase:D
  \@@_primitive:NN \vadjust                     \tex_vadjust:D
  \@@_primitive:NN \valign                      \tex_valign:D
  \@@_primitive:NN \vbadness                    \tex_vbadness:D
  \@@_primitive:NN \vbox                        \tex_vbox:D
  \@@_primitive:NN \vcenter                     \tex_vcenter:D
  \@@_primitive:NN \vfil                        \tex_vfil:D
  \@@_primitive:NN \vfill                       \tex_vfill:D
  \@@_primitive:NN \vfilneg                     \tex_vfilneg:D
  \@@_primitive:NN \vfuzz                       \tex_vfuzz:D
  \@@_primitive:NN \voffset                     \tex_voffset:D
  \@@_primitive:NN \vrule                       \tex_vrule:D
  \@@_primitive:NN \vsize                       \tex_vsize:D
  \@@_primitive:NN \vskip                       \tex_vskip:D
  \@@_primitive:NN \vsplit                      \tex_vsplit:D
  \@@_primitive:NN \vss                         \tex_vss:D
  \@@_primitive:NN \vtop                        \tex_vtop:D
  \@@_primitive:NN \wd                          \tex_wd:D
  \@@_primitive:NN \widowpenalty                \tex_widowpenalty:D
  \@@_primitive:NN \write                       \tex_write:D
  \@@_primitive:NN \xdef                        \tex_xdef:D
  \@@_primitive:NN \xleaders                    \tex_xleaders:D
  \@@_primitive:NN \xspaceskip                  \tex_xspaceskip:D
  \@@_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}
  \@@_primitive:NN \beginL                      \etex_beginL:D
  \@@_primitive:NN \beginR                      \etex_beginR:D
  \@@_primitive:NN \botmarks                    \etex_botmarks:D
  \@@_primitive:NN \clubpenalties               \etex_clubpenalties:D
  \@@_primitive:NN \currentgrouplevel           \etex_currentgrouplevel:D
  \@@_primitive:NN \currentgrouptype            \etex_currentgrouptype:D
  \@@_primitive:NN \currentifbranch             \etex_currentifbranch:D
  \@@_primitive:NN \currentiflevel              \etex_currentiflevel:D
  \@@_primitive:NN \currentiftype               \etex_currentiftype:D
  \@@_primitive:NN \detokenize                  \etex_detokenize:D
  \@@_primitive:NN \dimexpr                     \etex_dimexpr:D
  \@@_primitive:NN \displaywidowpenalties       \etex_displaywidowpenalties:D
  \@@_primitive:NN \endL                        \etex_endL:D
  \@@_primitive:NN \endR                        \etex_endR:D
  \@@_primitive:NN \eTeXrevision                \etex_eTeXrevision:D
  \@@_primitive:NN \eTeXversion                 \etex_eTeXversion:D
  \@@_primitive:NN \everyeof                    \etex_everyeof:D
  \@@_primitive:NN \firstmarks                  \etex_firstmarks:D
  \@@_primitive:NN \fontchardp                  \etex_fontchardp:D
  \@@_primitive:NN \fontcharht                  \etex_fontcharht:D
  \@@_primitive:NN \fontcharic                  \etex_fontcharic:D
  \@@_primitive:NN \fontcharwd                  \etex_fontcharwd:D
  \@@_primitive:NN \glueexpr                    \etex_glueexpr:D
  \@@_primitive:NN \glueshrink                  \etex_glueshrink:D
  \@@_primitive:NN \glueshrinkorder             \etex_glueshrinkorder:D
  \@@_primitive:NN \gluestretch                 \etex_gluestretch:D
  \@@_primitive:NN \gluestretchorder            \etex_gluestretchorder:D
  \@@_primitive:NN \gluetomu                    \etex_gluetomu:D
  \@@_primitive:NN \ifcsname                    \etex_ifcsname:D
  \@@_primitive:NN \ifdefined                   \etex_ifdefined:D
  \@@_primitive:NN \iffontchar                  \etex_iffontchar:D
  \@@_primitive:NN \interactionmode             \etex_interactionmode:D
  \@@_primitive:NN \interlinepenalties          \etex_interlinepenalties:D
  \@@_primitive:NN \lastlinefit                 \etex_lastlinefit:D
  \@@_primitive:NN \lastnodetype                \etex_lastnodetype:D
  \@@_primitive:NN \marks                       \etex_marks:D
  \@@_primitive:NN \middle                      \etex_middle:D
  \@@_primitive:NN \muexpr                      \etex_muexpr:D
  \@@_primitive:NN \mutoglue                    \etex_mutoglue:D
  \@@_primitive:NN \numexpr                     \etex_numexpr:D
  \@@_primitive:NN \pagediscards                \etex_pagediscards:D
  \@@_primitive:NN \parshapedimen               \etex_parshapedimen:D
  \@@_primitive:NN \parshapeindent              \etex_parshapeindent:D
  \@@_primitive:NN \parshapelength              \etex_parshapelength:D
  \@@_primitive:NN \predisplaydirection         \etex_predisplaydirection:D
  \@@_primitive:NN \protected                   \etex_protected:D
  \@@_primitive:NN \readline                    \etex_readline:D
  \@@_primitive:NN \savinghyphcodes             \etex_savinghyphcodes:D
  \@@_primitive:NN \savingvdiscards             \etex_savingvdiscards:D
  \@@_primitive:NN \scantokens                  \etex_scantokens:D
  \@@_primitive:NN \showgroups                  \etex_showgroups:D
  \@@_primitive:NN \showifs                     \etex_showifs:D
  \@@_primitive:NN \showtokens                  \etex_showtokens:D
  \@@_primitive:NN \splitbotmarks               \etex_splitbotmarks:D
  \@@_primitive:NN \splitdiscards               \etex_splitdiscards:D
  \@@_primitive:NN \splitfirstmarks             \etex_splitfirstmarks:D
  \@@_primitive:NN \TeXXeTstate                 \etex_TeXXeTstate:D
  \@@_primitive:NN \topmarks                    \etex_topmarks:D
  \@@_primitive:NN \tracingassigns              \etex_tracingassigns:D
  \@@_primitive:NN \tracinggroups               \etex_tracinggroups:D
  \@@_primitive:NN \tracingifs                  \etex_tracingifs:D
  \@@_primitive:NN \tracingnesting              \etex_tracingnesting:D
  \@@_primitive:NN \tracingscantokens           \etex_tracingscantokens:D
  \@@_primitive:NN \unexpanded                  \etex_unexpanded:D
  \@@_primitive:NN \unless                      \etex_unless:D
  \@@_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}
  \@@_primitive:NN \pdfannot                    \pdftex_pdfannot:D
  \@@_primitive:NN \pdfcatalog                  \pdftex_pdfcatalog:D
  \@@_primitive:NN \pdfcompresslevel            \pdftex_pdfcompresslevel:D
  \@@_primitive:NN \pdfcolorstack               \pdftex_pdfcolorstack:D
  \@@_primitive:NN \pdfcolorstackinit           \pdftex_pdfcolorstackinit:D
  \@@_primitive:NN \pdfcreationdate             \pdftex_pdfcreationdate:D
  \@@_primitive:NN \pdfdecimaldigits            \pdftex_pdfdecimaldigits:D
  \@@_primitive:NN \pdfdest                     \pdftex_pdfdest:D
  \@@_primitive:NN \pdfdestmargin               \pdftex_pdfdestmargin:D
  \@@_primitive:NN \pdfendlink                  \pdftex_pdfendlink:D
  \@@_primitive:NN \pdfendthread                \pdftex_pdfendthread:D
  \@@_primitive:NN \pdffontattr                 \pdftex_pdffontattr:D
  \@@_primitive:NN \pdffontname                 \pdftex_pdffontname:D
  \@@_primitive:NN \pdffontobjnum               \pdftex_pdffontobjnum:D
  \@@_primitive:NN \pdfgamma                    \pdftex_pdfgamma:D
  \@@_primitive:NN \pdfimageapplygamma          \pdftex_pdfimageapplygamma:D
  \@@_primitive:NN \pdfimagegamma               \pdftex_pdfimagegamma:D
  \@@_primitive:NN \pdfgentounicode             \pdftex_pdfgentounicode:D
  \@@_primitive:NN \pdfglyphtounicode           \pdftex_pdfglyphtounicode:D
  \@@_primitive:NN \pdfhorigin                  \pdftex_pdfhorigin:D
  \@@_primitive:NN \pdfimagehicolor             \pdftex_pdfimagehicolor:D
  \@@_primitive:NN \pdfimageresolution          \pdftex_pdfimageresolution:D
  \@@_primitive:NN \pdfincludechars             \pdftex_pdfincludechars:D
  \@@_primitive:NN \pdfinclusioncopyfonts       \pdftex_pdfinclusioncopyfonts:D
  \@@_primitive:NN \pdfinclusionerrorlevel      \pdftex_pdfinclusionerrorlevel:D
  \@@_primitive:NN \pdfinfo                     \pdftex_pdfinfo:D
  \@@_primitive:NN \pdflastannot                \pdftex_pdflastannot:D
  \@@_primitive:NN \pdflastlink                 \pdftex_pdflastlink:D
  \@@_primitive:NN \pdflastobj                  \pdftex_pdflastobj:D
  \@@_primitive:NN \pdflastxform                \pdftex_pdflastxform:D
  \@@_primitive:NN \pdflastximage               \pdftex_pdflastximage:D
  \@@_primitive:NN \pdflastximagecolordepth     \pdftex_pdflastximagecolordepth:D
  \@@_primitive:NN \pdflastximagepages          \pdftex_pdflastximagepages:D
  \@@_primitive:NN \pdflinkmargin               \pdftex_pdflinkmargin:D
  \@@_primitive:NN \pdfliteral                  \pdftex_pdfliteral:D
  \@@_primitive:NN \pdfminorversion             \pdftex_pdfminorversion:D
  \@@_primitive:NN \pdfnames                    \pdftex_pdfnames:D
  \@@_primitive:NN \pdfobj                      \pdftex_pdfobj:D
  \@@_primitive:NN \pdfobjcompresslevel         \pdftex_pdfobjcompresslevel:D
  \@@_primitive:NN \pdfoutline                  \pdftex_pdfoutline:D
  \@@_primitive:NN \pdfoutput                   \pdftex_pdfoutput:D
  \@@_primitive:NN \pdfpageattr                 \pdftex_pdfpageattr:D
  \@@_primitive:NN \pdfpagebox                  \pdftex_pdfpagebox:D
  \@@_primitive:NN \pdfpageref                  \pdftex_pdfpageref:D
  \@@_primitive:NN \pdfpageresources            \pdftex_pdfpageresources:D
  \@@_primitive:NN \pdfpagesattr                \pdftex_pdfpagesattr:D
  \@@_primitive:NN \pdfrefobj                   \pdftex_pdfrefobj:D
  \@@_primitive:NN \pdfrefxform                 \pdftex_pdfrefxform:D
  \@@_primitive:NN \pdfrefximage                \pdftex_pdfrefximage:D
  \@@_primitive:NN \pdfrestore                  \pdftex_pdfrestore:D
  \@@_primitive:NN \pdfretval                   \pdftex_pdfretval:D
  \@@_primitive:NN \pdfsave                     \pdftex_pdfsave:D
  \@@_primitive:NN \pdfsetmatrix                \pdftex_pdfsetmatrix:D
  \@@_primitive:NN \pdfstartlink                \pdftex_pdfstartlink:D
  \@@_primitive:NN \pdfstartthread              \pdftex_pdfstartthread:D
  \@@_primitive:NN \pdfsuppressptexinfo         \pdftex_pdfsuppressptexinfo:D
  \@@_primitive:NN \pdfthread                   \pdftex_pdfthread:D
  \@@_primitive:NN \pdfthreadmargin             \pdftex_pdfthreadmargin:D
  \@@_primitive:NN \pdftrailer                  \pdftex_pdftrailer:D
  \@@_primitive:NN \pdfuniqueresname            \pdftex_pdfuniqueresname:D
  \@@_primitive:NN \pdfvorigin                  \pdftex_pdfvorigin:D
  \@@_primitive:NN \pdfxform                    \pdftex_pdfxform:D
  \@@_primitive:NN \pdfxformattr                \pdftex_pdfxformattr:D
  \@@_primitive:NN \pdfxformname                \pdftex_pdfxformname:D
  \@@_primitive:NN \pdfxformresources           \pdftex_pdfxformresources:D
  \@@_primitive:NN \pdfximage                   \pdftex_pdfximage:D
  \@@_primitive:NN \pdfximagebbox               \pdftex_pdfximagebbox:D
%    \end{macrocode}
% While these are not.
%    \begin{macrocode}
  \@@_primitive:NN \ifpdfabsdim                 \pdftex_ifabsdim:D
  \@@_primitive:NN \ifpdfabsnum                 \pdftex_ifabsnum:D
  \@@_primitive:NN \ifpdfprimitive              \pdftex_ifprimitive:D
  \@@_primitive:NN \pdfadjustspacing            \pdftex_adjustspacing:D
  \@@_primitive:NN \pdfcopyfont                 \pdftex_copyfont:D
  \@@_primitive:NN \pdfdraftmode                \pdftex_draftmode:D
  \@@_primitive:NN \pdfeachlinedepth            \pdftex_eachlinedepth:D
  \@@_primitive:NN \pdfeachlineheight           \pdftex_eachlineheight:D
  \@@_primitive:NN \pdffilemoddate              \pdftex_filemoddate:D
  \@@_primitive:NN \pdffilesize                 \pdftex_filesize:D
  \@@_primitive:NN \pdffirstlineheight          \pdftex_firstlineheight:D
  \@@_primitive:NN \pdffontexpand               \pdftex_fontexpand:D
  \@@_primitive:NN \pdffontsize                 \pdftex_fontsize:D
  \@@_primitive:NN \pdfignoreddimen             \pdftex_ignoreddimen:D
  \@@_primitive:NN \pdfinsertht                 \pdftex_insertht:D
  \@@_primitive:NN \pdflastlinedepth            \pdftex_lastlinedepth:D
  \@@_primitive:NN \pdflastxpos                 \pdftex_lastxpos:D
  \@@_primitive:NN \pdflastypos                 \pdftex_lastypos:D
  \@@_primitive:NN \pdfmapfile                  \pdftex_mapfile:D
  \@@_primitive:NN \pdfmapline                  \pdftex_mapline:D
  \@@_primitive:NN \pdfmdfivesum                \pdftex_mdfivesum:D
  \@@_primitive:NN \pdfnoligatures              \pdftex_noligatures:D
  \@@_primitive:NN \pdfnormaldeviate            \pdftex_normaldeviate:D
  \@@_primitive:NN \pdfpageheight               \pdftex_pageheight:D
  \@@_primitive:NN \pdfpagewidth                \pdftex_pagewidth:D
  \@@_primitive:NN \pdfpkmode                   \pdftex_pkmode:D
  \@@_primitive:NN \pdfpkresolution             \pdftex_pkresolution:D
  \@@_primitive:NN \pdfprimitive                \pdftex_primitive:D
  \@@_primitive:NN \pdfprotrudechars            \pdftex_protrudechars:D
  \@@_primitive:NN \pdfpxdimen                  \pdftex_pxdimen:D
  \@@_primitive:NN \pdfrandomseed               \pdftex_randomseed:D
  \@@_primitive:NN \pdfsavepos                  \pdftex_savepos:D
  \@@_primitive:NN \pdfstrcmp                   \pdftex_strcmp:D
  \@@_primitive:NN \pdfsetrandomseed            \pdftex_setrandomseed:D
  \@@_primitive:NN \pdfshellescape              \pdftex_shellescape:D
  \@@_primitive:NN \pdftracingfonts             \pdftex_tracingfonts:D
  \@@_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}
  \@@_primitive:NN \pdftexbanner                \pdftex_pdftexbanner:D
  \@@_primitive:NN \pdftexrevision              \pdftex_pdftexrevision:D
  \@@_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}
  \@@_primitive:NN \efcode                      \pdftex_efcode:D
  \@@_primitive:NN \ifincsname                  \pdftex_ifincsname:D
  \@@_primitive:NN \leftmarginkern              \pdftex_leftmarginkern:D
  \@@_primitive:NN \letterspacefont             \pdftex_letterspacefont:D
  \@@_primitive:NN \lpcode                      \pdftex_lpcode:D
  \@@_primitive:NN \quitvmode                   \pdftex_quitvmode:D
  \@@_primitive:NN \rightmarginkern             \pdftex_rightmarginkern:D
  \@@_primitive:NN \rpcode                      \pdftex_rpcode:D
  \@@_primitive:NN \synctex                     \pdftex_synctex:D
  \@@_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 \@@_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}
  \@@_primitive:NN \suppressfontnotfounderror   \xetex_suppressfontnotfounderror:D
  \@@_primitive:NN \XeTeXcharclass              \xetex_charclass:D
  \@@_primitive:NN \XeTeXcharglyph              \xetex_charglyph:D
  \@@_primitive:NN \XeTeXcountfeatures          \xetex_countfeatures:D
  \@@_primitive:NN \XeTeXcountglyphs            \xetex_countglyphs:D
  \@@_primitive:NN \XeTeXcountselectors         \xetex_countselectors:D
  \@@_primitive:NN \XeTeXcountvariations        \xetex_countvariations:D
  \@@_primitive:NN \XeTeXdefaultencoding        \xetex_defaultencoding:D
  \@@_primitive:NN \XeTeXdashbreakstate         \xetex_dashbreakstate:D
  \@@_primitive:NN \XeTeXfeaturecode            \xetex_featurecode:D
  \@@_primitive:NN \XeTeXfeaturename            \xetex_featurename:D
  \@@_primitive:NN \XeTeXfindfeaturebyname      \xetex_findfeaturebyname:D
  \@@_primitive:NN \XeTeXfindselectorbyname     \xetex_findselectorbyname:D
  \@@_primitive:NN \XeTeXfindvariationbyname    \xetex_findvariationbyname:D
  \@@_primitive:NN \XeTeXfirstfontchar          \xetex_firstfontchar:D
  \@@_primitive:NN \XeTeXfonttype               \xetex_fonttype:D
  \@@_primitive:NN \XeTeXgenerateactualtext     \xetex_generateactualtext:D
  \@@_primitive:NN \XeTeXglyph                  \xetex_glyph:D
  \@@_primitive:NN \XeTeXglyphbounds            \xetex_glyphbounds:D
  \@@_primitive:NN \XeTeXglyphindex             \xetex_glyphindex:D
  \@@_primitive:NN \XeTeXglyphname              \xetex_glyphname:D
  \@@_primitive:NN \XeTeXinputencoding          \xetex_inputencoding:D
  \@@_primitive:NN \XeTeXinputnormalization     \xetex_inputnormalization:D
  \@@_primitive:NN \XeTeXinterchartokenstate    \xetex_interchartokenstate:D
  \@@_primitive:NN \XeTeXinterchartoks          \xetex_interchartoks:D
  \@@_primitive:NN \XeTeXisdefaultselector      \xetex_isdefaultselector:D
  \@@_primitive:NN \XeTeXisexclusivefeature     \xetex_isexclusivefeature:D
  \@@_primitive:NN \XeTeXlastfontchar           \xetex_lastfontchar:D
  \@@_primitive:NN \XeTeXlinebreakskip          \xetex_linebreakskip:D
  \@@_primitive:NN \XeTeXlinebreaklocale        \xetex_linebreaklocale:D
  \@@_primitive:NN \XeTeXlinebreakpenalty       \xetex_linebreakpenalty:D
  \@@_primitive:NN \XeTeXOTcountfeatures        \xetex_OTcountfeatures:D
  \@@_primitive:NN \XeTeXOTcountlanguages       \xetex_OTcountlanguages:D
  \@@_primitive:NN \XeTeXOTcountscripts         \xetex_OTcountscripts:D
  \@@_primitive:NN \XeTeXOTfeaturetag           \xetex_OTfeaturetag:D
  \@@_primitive:NN \XeTeXOTlanguagetag          \xetex_OTlanguagetag:D
  \@@_primitive:NN \XeTeXOTscripttag            \xetex_OTscripttag:D
  \@@_primitive:NN \XeTeXpdffile                \xetex_pdffile:D
  \@@_primitive:NN \XeTeXpdfpagecount           \xetex_pdfpagecount:D
  \@@_primitive:NN \XeTeXpicfile                \xetex_picfile:D
  \@@_primitive:NN \XeTeXselectorname           \xetex_selectorname:D
  \@@_primitive:NN \XeTeXtracingfonts           \xetex_tracingfonts:D
  \@@_primitive:NN \XeTeXupwardsmode            \xetex_upwardsmode:D
  \@@_primitive:NN \XeTeXuseglyphmetrics        \xetex_useglyphmetrics:D
  \@@_primitive:NN \XeTeXvariation              \xetex_variation:D
  \@@_primitive:NN \XeTeXvariationdefault       \xetex_variationdefault:D
  \@@_primitive:NN \XeTeXvariationmax           \xetex_variationmax:D
  \@@_primitive:NN \XeTeXvariationmin           \xetex_variationmin:D
  \@@_primitive:NN \XeTeXvariationname          \xetex_variationname:D
%    \end{macrocode}
%   The version primitives retain |XeTeX|.
%    \begin{macrocode}
  \@@_primitive:NN \XeTeXrevision               \xetex_XeTeXrevision:D
  \@@_primitive:NN \XeTeXversion                \xetex_XeTeXversion:D
%    \end{macrocode}
% Primitives from \pdfTeX{} that \XeTeX{} renames: also helps with
% \LuaTeX{}.
%    \begin{macrocode}
  \@@_primitive:NN \mdfivesum                   \pdftex_mdfivesum:D
  \@@_primitive:NN \ifprimitive                 \pdftex_ifprimitive:D
  \@@_primitive:NN \primitive                   \pdftex_primitive:D
  \@@_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}
  \@@_primitive:NN \alignmark                   \luatex_alignmark:D
  \@@_primitive:NN \aligntab                    \luatex_aligntab:D
  \@@_primitive:NN \attribute                   \luatex_attribute:D
  \@@_primitive:NN \attributedef                \luatex_attributedef:D
  \@@_primitive:NN \automatichyphenpenalty      \luatex_automatichyphenpenalty:D
  \@@_primitive:NN \begincsname                 \luatex_begincsname:D
  \@@_primitive:NN \catcodetable                \luatex_catcodetable:D
  \@@_primitive:NN \clearmarks                  \luatex_clearmarks:D
  \@@_primitive:NN \crampeddisplaystyle         \luatex_crampeddisplaystyle:D
  \@@_primitive:NN \crampedscriptscriptstyle    \luatex_crampedscriptscriptstyle:D
  \@@_primitive:NN \crampedscriptstyle          \luatex_crampedscriptstyle:D
  \@@_primitive:NN \crampedtextstyle            \luatex_crampedtextstyle:D
  \@@_primitive:NN \directlua                   \luatex_directlua:D
  \@@_primitive:NN \dviextension                \luatex_dviextension:D
  \@@_primitive:NN \dvifeedback                 \luatex_dvifeedback:D
  \@@_primitive:NN \dvivariable                 \luatex_dvivariable:D
  \@@_primitive:NN \etoksapp                    \luatex_etoksapp:D
  \@@_primitive:NN \etokspre                    \luatex_etokspre:D
  \@@_primitive:NN \explicithyphenpenalty       \luatex_explicithyphenpenalty:D
  \@@_primitive:NN \expanded                    \luatex_expanded:D
  \@@_primitive:NN \firstvalidlanguage          \luatex_firstvalidlanguage:D
  \@@_primitive:NN \fontid                      \luatex_fontid:D
  \@@_primitive:NN \formatname                  \luatex_formatname:D
  \@@_primitive:NN \hjcode                      \luatex_hjcode:D
  \@@_primitive:NN \hpack                       \luatex_hpack:D
  \@@_primitive:NN \hyphenationbounds           \luatex_hyphenationbounds:D
  \@@_primitive:NN \hyphenationmin              \luatex_hyphenationmin:D
  \@@_primitive:NN \hyphenpenaltymode           \luatex_hyphenpenaltymode:D
  \@@_primitive:NN \gleaders                    \luatex_gleaders:D
  \@@_primitive:NN \initcatcodetable            \luatex_initcatcodetable:D
  \@@_primitive:NN \lastnamedcs                 \luatex_lastnamedcs:D
  \@@_primitive:NN \latelua                     \luatex_latelua:D
  \@@_primitive:NN \letcharcode                 \luatex_letcharcode:D
  \@@_primitive:NN \luaescapestring             \luatex_luaescapestring:D
  \@@_primitive:NN \luafunction                 \luatex_luafunction:D
  \@@_primitive:NN \luatexbanner                \luatex_luatexbanner:D
  \@@_primitive:NN \luatexdatestamp             \luatex_luatexdatestamp:D
  \@@_primitive:NN \luatexrevision              \luatex_luatexrevision:D
  \@@_primitive:NN \luatexversion               \luatex_luatexversion:D
  \@@_primitive:NN \mathdisplayskipmode         \luatex_mathdisplayskipmode:D
  \@@_primitive:NN \matheqnogapstep             \luatex_matheqnogapstep:D
  \@@_primitive:NN \mathnolimitsmode            \luatex_mathnolimitsmode:D
  \@@_primitive:NN \mathoption                  \luatex_mathoption:D
  \@@_primitive:NN \mathrulesfam                \luatex_mathrulesfam:D
  \@@_primitive:NN \mathscriptsmode             \luatex_mathscriptsmode:D
  \@@_primitive:NN \mathstyle                   \luatex_mathstyle:D
  \@@_primitive:NN \mathsurroundmode            \luatex_mathsurroundmode:D
  \@@_primitive:NN \mathsurroundskip            \luatex_mathsurroundskip:D
  \@@_primitive:NN \nohrule                     \luatex_nohrule:D
  \@@_primitive:NN \nokerns                     \luatex_nokerns:D
  \@@_primitive:NN \noligs                      \luatex_noligs:D
  \@@_primitive:NN \nospaces                    \luatex_nospaces:D
  \@@_primitive:NN \novrule                     \luatex_novrule:D
  \@@_primitive:NN \outputbox                   \luatex_outputbox:D
  \@@_primitive:NN \pagebottomoffset            \luatex_pagebottomoffset:D
  \@@_primitive:NN \pageleftoffset              \luatex_pageleftoffset:D
  \@@_primitive:NN \pagerightoffset             \luatex_pagerightoffset:D
  \@@_primitive:NN \pagetopoffset               \luatex_pagetopoffset:D
  \@@_primitive:NN \pdfextension                \luatex_pdfextension:D
  \@@_primitive:NN \pdffeedback                 \luatex_pdffeedback:D
  \@@_primitive:NN \pdfvariable                 \luatex_pdfvariable:D
  \@@_primitive:NN \postexhyphenchar            \luatex_postexhyphenchar:D
  \@@_primitive:NN \posthyphenchar              \luatex_posthyphenchar:D
  \@@_primitive:NN \predisplaygapfactor         \luatex_predisplaygapfactor:D
  \@@_primitive:NN \preexhyphenchar             \luatex_preexhyphenchar:D
  \@@_primitive:NN \prehyphenchar               \luatex_prehyphenchar:D
  \@@_primitive:NN \savecatcodetable            \luatex_savecatcodetable:D
  \@@_primitive:NN \scantextokens               \luatex_scantextokens:D
  \@@_primitive:NN \setfontid                   \luatex_setfontid:D
  \@@_primitive:NN \shapemode                   \luatex_shapemode:D
  \@@_primitive:NN \suppressifcsnameerror       \luatex_suppressifcsnameerror:D
  \@@_primitive:NN \suppresslongerror           \luatex_suppresslongerror:D
  \@@_primitive:NN \suppressmathparerror        \luatex_suppressmathparerror:D
  \@@_primitive:NN \suppressoutererror          \luatex_suppressoutererror:D
  \@@_primitive:NN \toksapp                     \luatex_toksapp:D
  \@@_primitive:NN \tokspre                     \luatex_tokspre:D
  \@@_primitive:NN \tpack                       \luatex_tpack:D
  \@@_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}
  \@@_primitive:NN \bodydir                     \luatex_bodydir:D
  \@@_primitive:NN \boxdir                      \luatex_boxdir:D
  \@@_primitive:NN \leftghost                   \luatex_leftghost:D
  \@@_primitive:NN \linedir                     \luatex_linedir:D
  \@@_primitive:NN \localbrokenpenalty          \luatex_localbrokenpenalty:D
  \@@_primitive:NN \localinterlinepenalty       \luatex_localinterlinepenalty:D
  \@@_primitive:NN \localleftbox                \luatex_localleftbox:D
  \@@_primitive:NN \localrightbox               \luatex_localrightbox:D
  \@@_primitive:NN \mathdir                     \luatex_mathdir:D
  \@@_primitive:NN \pagedir                     \luatex_pagedir:D
  \@@_primitive:NN \pardir                      \luatex_pardir:D
  \@@_primitive:NN \rightghost                  \luatex_rightghost:D
  \@@_primitive:NN \textdir                     \luatex_textdir:D
%    \end{macrocode}
% Primitives from \pdfTeX{} that \LuaTeX{} renames.
%    \begin{macrocode}
  \@@_primitive:NN \adjustspacing               \pdftex_adjustspacing:D
  \@@_primitive:NN \copyfont                    \pdftex_copyfont:D
  \@@_primitive:NN \draftmode                   \pdftex_draftmode:D
  \@@_primitive:NN \expandglyphsinfont          \pdftex_fontexpand:D
  \@@_primitive:NN \ifabsdim                    \pdftex_ifabsdim:D
  \@@_primitive:NN \ifabsnum                    \pdftex_ifabsnum:D
  \@@_primitive:NN \ignoreligaturesinfont       \pdftex_ignoreligaturesinfont:D
  \@@_primitive:NN \insertht                    \pdftex_insertht:D
  \@@_primitive:NN \lastsavedboxresourceindex   \pdftex_pdflastxform:D
  \@@_primitive:NN \lastsavedimageresourceindex \pdftex_pdflastximage:D
  \@@_primitive:NN \lastsavedimageresourcepages \pdftex_pdflastximagepages:D
  \@@_primitive:NN \lastxpos                    \pdftex_lastxpos:D
  \@@_primitive:NN \lastypos                    \pdftex_lastypos:D
  \@@_primitive:NN \normaldeviate               \pdftex_normaldeviate:D
  \@@_primitive:NN \outputmode                  \pdftex_pdfoutput:D
  \@@_primitive:NN \pageheight                  \pdftex_pageheight:D
  \@@_primitive:NN \pagewidth                   \pdftex_pagewith:D
  \@@_primitive:NN \protrudechars               \pdftex_protrudechars:D
  \@@_primitive:NN \pxdimen                     \pdftex_pxdimen:D
  \@@_primitive:NN \randomseed                  \pdftex_randomseed:D
  \@@_primitive:NN \useboxresource              \pdftex_pdfrefxform:D
  \@@_primitive:NN \useimageresource            \pdftex_pdfrefximage:D
  \@@_primitive:NN \savepos                     \pdftex_savepos:D
  \@@_primitive:NN \saveboxresource             \pdftex_pdfxform:D
  \@@_primitive:NN \saveimageresource           \pdftex_pdfximage:D
  \@@_primitive:NN \setrandomseed               \pdftex_setrandomseed:D
  \@@_primitive:NN \tracingfonts                \pdftex_tracingfonts:D
  \@@_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}
  \@@_primitive:NN \Uchar                       \utex_char:D
  \@@_primitive:NN \Ucharcat                    \utex_charcat:D
  \@@_primitive:NN \Udelcode                    \utex_delcode:D
  \@@_primitive:NN \Udelcodenum                 \utex_delcodenum:D
  \@@_primitive:NN \Udelimiter                  \utex_delimiter:D
  \@@_primitive:NN \Udelimiterover              \utex_delimiterover:D
  \@@_primitive:NN \Udelimiterunder             \utex_delimiterunder:D
  \@@_primitive:NN \Uhextensible                \utex_hextensible:D
  \@@_primitive:NN \Umathaccent                 \utex_mathaccent:D
  \@@_primitive:NN \Umathaxis                   \utex_mathaxis:D
  \@@_primitive:NN \Umathbinbinspacing          \utex_binbinspacing:D
  \@@_primitive:NN \Umathbinclosespacing        \utex_binclosespacing:D
  \@@_primitive:NN \Umathbininnerspacing        \utex_bininnerspacing:D
  \@@_primitive:NN \Umathbinopenspacing         \utex_binopenspacing:D
  \@@_primitive:NN \Umathbinopspacing           \utex_binopspacing:D
  \@@_primitive:NN \Umathbinordspacing          \utex_binordspacing:D
  \@@_primitive:NN \Umathbinpunctspacing        \utex_binpunctspacing:D
  \@@_primitive:NN \Umathbinrelspacing          \utex_binrelspacing:D
  \@@_primitive:NN \Umathchar                   \utex_mathchar:D
  \@@_primitive:NN \Umathcharclass              \utex_mathcharclass:D
  \@@_primitive:NN \Umathchardef                \utex_mathchardef:D
  \@@_primitive:NN \Umathcharfam                \utex_mathcharfam:D
  \@@_primitive:NN \Umathcharnum                \utex_mathcharnum:D
  \@@_primitive:NN \Umathcharnumdef             \utex_mathcharnumdef:D
  \@@_primitive:NN \Umathcharslot               \utex_mathcharslot:D
  \@@_primitive:NN \Umathclosebinspacing        \utex_closebinspacing:D
  \@@_primitive:NN \Umathcloseclosespacing      \utex_closeclosespacing:D
  \@@_primitive:NN \Umathcloseinnerspacing      \utex_closeinnerspacing:D
  \@@_primitive:NN \Umathcloseopenspacing       \utex_closeopenspacing:D
  \@@_primitive:NN \Umathcloseopspacing         \utex_closeopspacing:D
  \@@_primitive:NN \Umathcloseordspacing        \utex_closeordspacing:D
  \@@_primitive:NN \Umathclosepunctspacing      \utex_closepunctspacing:D
  \@@_primitive:NN \Umathcloserelspacing        \utex_closerelspacing:D
  \@@_primitive:NN \Umathcode                   \utex_mathcode:D
  \@@_primitive:NN \Umathcodenum                \utex_mathcodenum:D
  \@@_primitive:NN \Umathconnectoroverlapmin    \utex_connectoroverlapmin:D
  \@@_primitive:NN \Umathfractiondelsize        \utex_fractiondelsize:D
  \@@_primitive:NN \Umathfractiondenomdown      \utex_fractiondenomdown:D
  \@@_primitive:NN \Umathfractiondenomvgap      \utex_fractiondenomvgap:D
  \@@_primitive:NN \Umathfractionnumup          \utex_fractionnumup:D
  \@@_primitive:NN \Umathfractionnumvgap        \utex_fractionnumvgap:D
  \@@_primitive:NN \Umathfractionrule           \utex_fractionrule:D
  \@@_primitive:NN \Umathinnerbinspacing        \utex_innerbinspacing:D
  \@@_primitive:NN \Umathinnerclosespacing      \utex_innerclosespacing:D
  \@@_primitive:NN \Umathinnerinnerspacing      \utex_innerinnerspacing:D
  \@@_primitive:NN \Umathinneropenspacing       \utex_inneropenspacing:D
  \@@_primitive:NN \Umathinneropspacing         \utex_inneropspacing:D
  \@@_primitive:NN \Umathinnerordspacing        \utex_innerordspacing:D
  \@@_primitive:NN \Umathinnerpunctspacing      \utex_innerpunctspacing:D
  \@@_primitive:NN \Umathinnerrelspacing        \utex_innerrelspacing:D
  \@@_primitive:NN \Umathlimitabovebgap         \utex_limitabovebgap:D
  \@@_primitive:NN \Umathlimitabovekern         \utex_limitabovekern:D
  \@@_primitive:NN \Umathlimitabovevgap         \utex_limitabovevgap:D
  \@@_primitive:NN \Umathlimitbelowbgap         \utex_limitbelowbgap:D
  \@@_primitive:NN \Umathlimitbelowkern         \utex_limitbelowkern:D
  \@@_primitive:NN \Umathlimitbelowvgap         \utex_limitbelowvgap:D
  \@@_primitive:NN \Umathnolimitsubfactor       \utex_nolimitsubfactor:D
  \@@_primitive:NN \Umathnolimitsupfactor       \utex_nolimitsupfactor:D
  \@@_primitive:NN \Umathopbinspacing           \utex_opbinspacing:D
  \@@_primitive:NN \Umathopclosespacing         \utex_opclosespacing:D
  \@@_primitive:NN \Umathopenbinspacing         \utex_openbinspacing:D
  \@@_primitive:NN \Umathopenclosespacing       \utex_openclosespacing:D
  \@@_primitive:NN \Umathopeninnerspacing       \utex_openinnerspacing:D
  \@@_primitive:NN \Umathopenopenspacing        \utex_openopenspacing:D
  \@@_primitive:NN \Umathopenopspacing          \utex_openopspacing:D
  \@@_primitive:NN \Umathopenordspacing         \utex_openordspacing:D
  \@@_primitive:NN \Umathopenpunctspacing       \utex_openpunctspacing:D
  \@@_primitive:NN \Umathopenrelspacing         \utex_openrelspacing:D
  \@@_primitive:NN \Umathoperatorsize           \utex_operatorsize:D
  \@@_primitive:NN \Umathopinnerspacing         \utex_opinnerspacing:D
  \@@_primitive:NN \Umathopopenspacing          \utex_opopenspacing:D
  \@@_primitive:NN \Umathopopspacing            \utex_opopspacing:D
  \@@_primitive:NN \Umathopordspacing           \utex_opordspacing:D
  \@@_primitive:NN \Umathoppunctspacing         \utex_oppunctspacing:D
  \@@_primitive:NN \Umathoprelspacing           \utex_oprelspacing:D
  \@@_primitive:NN \Umathordbinspacing          \utex_ordbinspacing:D
  \@@_primitive:NN \Umathordclosespacing        \utex_ordclosespacing:D
  \@@_primitive:NN \Umathordinnerspacing        \utex_ordinnerspacing:D
  \@@_primitive:NN \Umathordopenspacing         \utex_ordopenspacing:D
  \@@_primitive:NN \Umathordopspacing           \utex_ordopspacing:D
  \@@_primitive:NN \Umathordordspacing          \utex_ordordspacing:D
  \@@_primitive:NN \Umathordpunctspacing        \utex_ordpunctspacing:D
  \@@_primitive:NN \Umathordrelspacing          \utex_ordrelspacing:D
  \@@_primitive:NN \Umathoverbarkern            \utex_overbarkern:D
  \@@_primitive:NN \Umathoverbarrule            \utex_overbarrule:D
  \@@_primitive:NN \Umathoverbarvgap            \utex_overbarvgap:D
  \@@_primitive:NN \Umathoverdelimiterbgap      \utex_overdelimiterbgap:D
  \@@_primitive:NN \Umathoverdelimitervgap      \utex_overdelimitervgap:D
  \@@_primitive:NN \Umathpunctbinspacing        \utex_punctbinspacing:D
  \@@_primitive:NN \Umathpunctclosespacing      \utex_punctclosespacing:D
  \@@_primitive:NN \Umathpunctinnerspacing      \utex_punctinnerspacing:D
  \@@_primitive:NN \Umathpunctopenspacing       \utex_punctopenspacing:D
  \@@_primitive:NN \Umathpunctopspacing         \utex_punctopspacing:D
  \@@_primitive:NN \Umathpunctordspacing        \utex_punctordspacing:D
  \@@_primitive:NN \Umathpunctpunctspacing      \utex_punctpunctspacing:D
  \@@_primitive:NN \Umathpunctrelspacing        \utex_punctrelspacing:D
  \@@_primitive:NN \Umathquad                   \utex_quad:D
  \@@_primitive:NN \Umathradicaldegreeafter     \utex_radicaldegreeafter:D
  \@@_primitive:NN \Umathradicaldegreebefore    \utex_radicaldegreebefore:D
  \@@_primitive:NN \Umathradicaldegreeraise     \utex_radicaldegreeraise:D
  \@@_primitive:NN \Umathradicalkern            \utex_radicalkern:D
  \@@_primitive:NN \Umathradicalrule            \utex_radicalrule:D
  \@@_primitive:NN \Umathradicalvgap            \utex_radicalvgap:D
  \@@_primitive:NN \Umathrelbinspacing          \utex_relbinspacing:D
  \@@_primitive:NN \Umathrelclosespacing        \utex_relclosespacing:D
  \@@_primitive:NN \Umathrelinnerspacing        \utex_relinnerspacing:D
  \@@_primitive:NN \Umathrelopenspacing         \utex_relopenspacing:D
  \@@_primitive:NN \Umathrelopspacing           \utex_relopspacing:D
  \@@_primitive:NN \Umathrelordspacing          \utex_relordspacing:D
  \@@_primitive:NN \Umathrelpunctspacing        \utex_relpunctspacing:D
  \@@_primitive:NN \Umathrelrelspacing          \utex_relrelspacing:D
  \@@_primitive:NN \Umathskewedfractionhgap     \utex_skewedfractionhgap:D
  \@@_primitive:NN \Umathskewedfractionvgap     \utex_skewedfractionvgap:D
  \@@_primitive:NN \Umathspaceafterscript       \utex_spaceafterscript:D
  \@@_primitive:NN \Umathstackdenomdown         \utex_stackdenomdown:D
  \@@_primitive:NN \Umathstacknumup             \utex_stacknumup:D
  \@@_primitive:NN \Umathstackvgap              \utex_stackvgap:D
  \@@_primitive:NN \Umathsubshiftdown           \utex_subshiftdown:D
  \@@_primitive:NN \Umathsubshiftdrop           \utex_subshiftdrop:D
  \@@_primitive:NN \Umathsubsupshiftdown        \utex_subsupshiftdown:D
  \@@_primitive:NN \Umathsubsupvgap             \utex_subsupvgap:D
  \@@_primitive:NN \Umathsubtopmax              \utex_subtopmax:D
  \@@_primitive:NN \Umathsupbottommin           \utex_supbottommin:D
  \@@_primitive:NN \Umathsupshiftdrop           \utex_supshiftdrop:D
  \@@_primitive:NN \Umathsupshiftup             \utex_supshiftup:D
  \@@_primitive:NN \Umathsupsubbottommax        \utex_supsubbottommax:D
  \@@_primitive:NN \Umathunderbarkern           \utex_underbarkern:D
  \@@_primitive:NN \Umathunderbarrule           \utex_underbarrule:D
  \@@_primitive:NN \Umathunderbarvgap           \utex_underbarvgap:D
  \@@_primitive:NN \Umathunderdelimiterbgap     \utex_underdelimiterbgap:D
  \@@_primitive:NN \Umathunderdelimitervgap     \utex_underdelimitervgap:D
  \@@_primitive:NN \Uoverdelimiter              \utex_overdelimiter:D
  \@@_primitive:NN \Uradical                    \utex_radical:D
  \@@_primitive:NN \Uroot                       \utex_root:D
  \@@_primitive:NN \Uskewed                     \utex_skewed:D
  \@@_primitive:NN \Uskewedwithdelims           \utex_skewedwithdelims:D
  \@@_primitive:NN \Ustack                      \utex_stack:D
  \@@_primitive:NN \Ustartdisplaymath           \utex_startdisplaymath:D
  \@@_primitive:NN \Ustartmath                  \utex_startmath:D
  \@@_primitive:NN \Ustopdisplaymath            \utex_stopdisplaymath:D
  \@@_primitive:NN \Ustopmath                   \utex_stopmath:D
  \@@_primitive:NN \Usubscript                  \utex_subscript:D
  \@@_primitive:NN \Usuperscript                \utex_superscript:D
  \@@_primitive:NN \Uunderdelimiter             \utex_underdelimiter:D
  \@@_primitive:NN \Uvextensible                \utex_vextensible:D
%    \end{macrocode}
% Primitives from p\TeX{}.
%    \begin{macrocode}
  \@@_primitive:NN \autospacing                 \ptex_autospacing:D
  \@@_primitive:NN \autoxspacing                \ptex_autoxspacing:D
  \@@_primitive:NN \dtou                        \ptex_dtou:D
  \@@_primitive:NN \euc                         \ptex_euc:D
  \@@_primitive:NN \ifdbox                      \ptex_ifdbox:D
  \@@_primitive:NN \ifddir                      \ptex_ifddir:D
  \@@_primitive:NN \ifmdir                      \ptex_ifmdir:D
  \@@_primitive:NN \iftbox                      \ptex_iftbox:D
  \@@_primitive:NN \iftdir                      \ptex_iftdir:D
  \@@_primitive:NN \ifybox                      \ptex_ifybox:D
  \@@_primitive:NN \ifydir                      \ptex_ifydir:D
  \@@_primitive:NN \inhibitglue                 \ptex_inhibitglue:D
  \@@_primitive:NN \inhibitxspcode              \ptex_inhibitxspcode:D
  \@@_primitive:NN \jcharwidowpenalty           \ptex_jcharwidowpenalty:D
  \@@_primitive:NN \jfam                        \ptex_jfam:D
  \@@_primitive:NN \jfont                       \ptex_jfont:D
  \@@_primitive:NN \jis                         \ptex_jis:D
  \@@_primitive:NN \kanjiskip                   \ptex_kanjiskip:D
  \@@_primitive:NN \kansuji                     \ptex_kansuji:D
  \@@_primitive:NN \kansujichar                 \ptex_kansujichar:D
  \@@_primitive:NN \kcatcode                    \ptex_kcatcode:D
  \@@_primitive:NN \kuten                       \ptex_kuten:D
  \@@_primitive:NN \noautospacing               \ptex_noautospacing:D
  \@@_primitive:NN \noautoxspacing              \ptex_noautoxspacing:D
  \@@_primitive:NN \postbreakpenalty            \ptex_postbreakpenalty:D
  \@@_primitive:NN \prebreakpenalty             \ptex_prebreakpenalty:D
  \@@_primitive:NN \showmode                    \ptex_showmode:D
  \@@_primitive:NN \sjis                        \ptex_sjis:D
  \@@_primitive:NN \tate                        \ptex_tate:D
  \@@_primitive:NN \tbaselineshift              \ptex_tbaselineshift:D
  \@@_primitive:NN \tfont                       \ptex_tfont:D
  \@@_primitive:NN \xkanjiskip                  \ptex_xkanjiskip:D
  \@@_primitive:NN \xspcode                     \ptex_xspcode:D
  \@@_primitive:NN \ybaselineshift              \ptex_ybaselineshift:D
  \@@_primitive:NN \yoko                        \ptex_yoko:D
%    \end{macrocode}
% Primitives from up\TeX{}.
%    \begin{macrocode}
  \@@_primitive:NN \disablecjktoken             \uptex_disablecjktoken:D
  \@@_primitive:NN \enablecjktoken              \uptex_enablecjktoken:D
  \@@_primitive:NN \forcecjktoken               \uptex_forcecjktoken:D
  \@@_primitive:NN \kchar                       \uptex_kchar:D
  \@@_primitive:NN \kchardef                    \uptex_kchardef:D
  \@@_primitive:NN \kuten                       \uptex_kuten:D
  \@@_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{} moves 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 is 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
