[latex3-commits] [git/LaTeX3-latex3-latex3] master: Move XeTeX primitives to \tex_... namespace (79442d0)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed May 2 16:31:43 CEST 2018


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/79442d02c5b44701199f4bde3ed6b08ee8c77f33

>---------------------------------------------------------------

commit 79442d02c5b44701199f4bde3ed6b08ee8c77f33
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed May 2 10:15:01 2018 +0100

    Move XeTeX primitives to \tex_... namespace


>---------------------------------------------------------------

79442d02c5b44701199f4bde3ed6b08ee8c77f33
 l3kernel/l3drivers.dtx |    8 +--
 l3kernel/l3int.dtx     |    4 +-
 l3kernel/l3names.dtx   |  177 +++++++++++++++++++++++++++++++-----------------
 l3kernel/l3sys.dtx     |    2 +-
 4 files changed, 123 insertions(+), 68 deletions(-)

diff --git a/l3kernel/l3drivers.dtx b/l3kernel/l3drivers.dtx
index 2533b35..89aa948 100644
--- a/l3kernel/l3drivers.dtx
+++ b/l3kernel/l3drivers.dtx
@@ -1870,14 +1870,14 @@
   {
     \int_zero:N \l_image_page_int
     \tl_clear:N \l_image_pagebox_tl
-    \@@_image_getbb_auxi:nN {#1} \xetex_picfile:D
+    \@@_image_getbb_auxi:nN {#1} \tex_XeTeXpicfile:D
   }
 \cs_new_eq:NN \@@_image_getbb_png:n \@@_image_getbb_jpg:n
 \cs_new_protected:Npn \@@_image_getbb_pdf:n #1
   {
     \tl_clear:N \l_image_decode_tl
     \bool_set_false:N \l_image_interpolate_bool
-    \@@_image_getbb_auxi:nN {#1} \xetex_pdffile:D
+    \@@_image_getbb_auxi:nN {#1} \tex_XeTeXpdffile:D
   }
 \cs_new_protected:Npn \@@_image_getbb_auxi:nN #1#2
   {
@@ -1928,13 +1928,13 @@
 %
 % \begin{macro}{\@@_image_include_pdf:n}
 %   For PDF images, properly supporting the |pagebox| concept in \XeTeX{}
-%   is best done using the |\xetex_pdffile:D| primitive. The syntax here
+%   is best done using the |\tex_XeTeXpdffile:D| primitive. The syntax here
 %   is the same as for the image measurement part, although we know at this
 %   stage that there must be some valid setting for \cs{l_image_pagebox_tl}.
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_image_include_pdf:n #1
   {
-    \xetex_pdffile:D "#1" ~
+    \tex_XeTeXpdffile:D "#1" ~
       \int_compare:nNnT \l_image_page_int > 0
         { page~ \int_use:N \l_image_page_int }
       \@@_image_getbb_auxiv:VnNnn \l_image_pagebox_tl
diff --git a/l3kernel/l3int.dtx b/l3kernel/l3int.dtx
index 302fc64..9bbf622 100644
--- a/l3kernel/l3int.dtx
+++ b/l3kernel/l3int.dtx
@@ -1239,7 +1239,7 @@
   \cs_if_exist:NT \luatex_luatexversion:D  { 1 }
   \cs_if_exist:NT \uptex_disablecjktoken:D
     { \if_int_compare:w \ptex_jis:D "2121 = "3000 ~ 1 \fi: }
-  \cs_if_exist:NT \xetex_XeTeXversion:D    { 1 } ~
+  \cs_if_exist:NT \tex_XeTeXversion:D    { 1 } ~
     \cs_if_exist:NTF \uptex_disablecjktoken:D
       { \cs_new_eq:NN \@@_constdef:Nw \uptex_kchardef:D }
       { \cs_new_eq:NN \@@_constdef:Nw \tex_chardef:D }
@@ -2575,7 +2575,7 @@
   {
     \if_int_odd:w 0
       \cs_if_exist:NT \luatex_luatexversion:D  { 1 }
-      \cs_if_exist:NT \xetex_XeTeXversion:D    { 1 } ~
+      \cs_if_exist:NT \tex_XeTeXversion:D    { 1 } ~
       "10FFFF
     \else:
       "FF
diff --git a/l3kernel/l3names.dtx b/l3kernel/l3names.dtx
index 4d9c0df..5b7215d 100644
--- a/l3kernel/l3names.dtx
+++ b/l3kernel/l3names.dtx
@@ -65,9 +65,8 @@
 % the primitives. These are named based on the engine which first introduced
 % them:
 % \begin{itemize}
-%   \item[{\cs[no-index]{tex_\ldots}}] Introduced by \TeX{}, \eTeX{}
-%     and \pdfTeX{};
-%   \item[{\cs[no-index]{xetex_\ldots}}] Introduced by \XeTeX{};
+%   \item[{\cs[no-index]{tex_\ldots}}] Introduced by \TeX{}, \eTeX{},
+%     \pdfTeX{} and \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 \pTeX{};
@@ -695,74 +694,70 @@
 %<*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
+% handled earlier and is \enquote{rolled up} into \tn{pdfstrcmp}. 
+% 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
+    \tex_suppressfontnotfounderror:D
+  \@@_primitive:NN \XeTeXcharclass        \tex_XeTeXcharclass:D
+  \@@_primitive:NN \XeTeXcharglyph        \tex_XeTeXcharglyph:D
+  \@@_primitive:NN \XeTeXcountfeatures    \tex_XeTeXcountfeatures:D
+  \@@_primitive:NN \XeTeXcountglyphs      \tex_XeTeXcountglyphs:D
+  \@@_primitive:NN \XeTeXcountselectors   \tex_XeTeXcountselectors:D
+  \@@_primitive:NN \XeTeXcountvariations  \tex_XeTeXcountvariations:D
+  \@@_primitive:NN \XeTeXdefaultencoding  \tex_XeTeXdefaultencoding:D
+  \@@_primitive:NN \XeTeXdashbreakstate   \tex_XeTeXdashbreakstate:D
+  \@@_primitive:NN \XeTeXfeaturecode      \tex_XeTeXfeaturecode:D
+  \@@_primitive:NN \XeTeXfeaturename      \tex_XeTeXfeaturename:D
   \@@_primitive:NN \XeTeXfindfeaturebyname
-    \xetex_findfeaturebyname:D
+    \tex_findfeaturebyname:D
   \@@_primitive:NN \XeTeXfindselectorbyname
-    \xetex_findselectorbyname:D
+    \tex_findselectorbyname:D
   \@@_primitive:NN \XeTeXfindvariationbyname
-    \xetex_findvariationbyname:D
-  \@@_primitive:NN \XeTeXfirstfontchar    \xetex_firstfontchar:D
-  \@@_primitive:NN \XeTeXfonttype         \xetex_fonttype:D
+    \tex_findvariationbyname:D
+  \@@_primitive:NN \XeTeXfirstfontchar    \tex_XeTeXfirstfontchar:D
+  \@@_primitive:NN \XeTeXfonttype         \tex_XeTeXfonttype: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
+    \tex_generateactualtext:D
+  \@@_primitive:NN \XeTeXglyph            \tex_XeTeXglyph:D
+  \@@_primitive:NN \XeTeXglyphbounds      \tex_XeTeXglyphbounds:D
+  \@@_primitive:NN \XeTeXglyphindex       \tex_XeTeXglyphindex:D
+  \@@_primitive:NN \XeTeXglyphname        \tex_XeTeXglyphname:D
+  \@@_primitive:NN \XeTeXinputencoding    \tex_XeTeXinputencoding:D
   \@@_primitive:NN \XeTeXinputnormalization
-    \xetex_inputnormalization:D
+    \tex_inputnormalization:D
   \@@_primitive:NN \XeTeXinterchartokenstate
-    \xetex_interchartokenstate:D
-  \@@_primitive:NN \XeTeXinterchartoks    \xetex_interchartoks:D
+    \tex_interchartokenstate:D
+  \@@_primitive:NN \XeTeXinterchartoks    \tex_XeTeXinterchartoks:D
   \@@_primitive:NN \XeTeXisdefaultselector
-    \xetex_isdefaultselector:D
+    \tex_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
+    \tex_isexclusivefeature:D
+  \@@_primitive:NN \XeTeXlastfontchar     \tex_XeTeXlastfontchar:D
+  \@@_primitive:NN \XeTeXlinebreakskip    \tex_XeTeXlinebreakskip:D
+  \@@_primitive:NN \XeTeXlinebreaklocale  \tex_XeTeXlinebreaklocale:D
+  \@@_primitive:NN \XeTeXlinebreakpenalty \tex_XeTeXlinebreakpenalty:D
+  \@@_primitive:NN \XeTeXOTcountfeatures  \tex_XeTeXOTcountfeatures:D
+  \@@_primitive:NN \XeTeXOTcountlanguages \tex_XeTeXOTcountlanguages:D
+  \@@_primitive:NN \XeTeXOTcountscripts   \tex_XeTeXOTcountscripts:D
+  \@@_primitive:NN \XeTeXOTfeaturetag     \tex_XeTeXOTfeaturetag:D
+  \@@_primitive:NN \XeTeXOTlanguagetag    \tex_XeTeXOTlanguagetag:D
+  \@@_primitive:NN \XeTeXOTscripttag      \tex_XeTeXOTscripttag:D
+  \@@_primitive:NN \XeTeXpdffile          \tex_XeTeXpdffile:D
+  \@@_primitive:NN \XeTeXpdfpagecount     \tex_XeTeXpdfpagecount:D
+  \@@_primitive:NN \XeTeXpicfile          \tex_XeTeXpicfile:D
+  \@@_primitive:NN \XeTeXrevision         \tex_XeTeXrevision:D
+  \@@_primitive:NN \XeTeXselectorname     \tex_XeTeXselectorname:D
+  \@@_primitive:NN \XeTeXtracingfonts     \tex_XeTeXtracingfonts:D
+  \@@_primitive:NN \XeTeXupwardsmode      \tex_XeTeXupwardsmode:D
+  \@@_primitive:NN \XeTeXuseglyphmetrics  \tex_XeTeXuseglyphmetrics:D
+  \@@_primitive:NN \XeTeXvariation        \tex_XeTeXvariation:D
+  \@@_primitive:NN \XeTeXvariationdefault \tex_XeTeXvariationdefault:D
+  \@@_primitive:NN \XeTeXvariationmax     \tex_XeTeXvariationmax:D
+  \@@_primitive:NN \XeTeXvariationmin     \tex_XeTeXvariationmin:D
+  \@@_primitive:NN \XeTeXvariationname    \tex_XeTeXvariationname:D
+  \@@_primitive:NN \XeTeXversion          \tex_XeTeXversion:D
 %    \end{macrocode}
 % Primitives from \pdfTeX{} that \XeTeX{} renames: also helps with
 % \LuaTeX{}.
@@ -1288,7 +1283,7 @@
     \luatexsuppressmathparerror
   \tex_let:D \luatex_suppressoutererror:D  \luatexsuppressoutererror
   \tex_let:D \utex_char:D                  \luatexUchar
-  \tex_let:D \xetex_suppressfontnotfounderror:D
+  \tex_let:D \tex_suppressfontnotfounderror:D
     \luatexsuppressfontnotfounderror
 %    \end{macrocode}
 % Which also covers those slightly odd ones.
@@ -1633,6 +1628,66 @@
   \@@_primitive:NN \setrandomseed         \pdftex_setrandomseed:D
   \@@_primitive:NN \tracingfonts          \pdftex_tracingfonts:D
   \@@_primitive:NN \uniformdeviate        \pdftex_uniformdeviate:D
+  \@@_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
+  \@@_primitive:NN \XeTeXrevision         \xetex_XeTeXrevision:D
+  \@@_primitive:NN \XeTeXversion          \xetex_XeTeXversion:D
 \tex_endgroup:D
 %</package>
 %    \end{macrocode}
diff --git a/l3kernel/l3sys.dtx b/l3kernel/l3sys.dtx
index 08b7f7e..e305652 100644
--- a/l3kernel/l3sys.dtx
+++ b/l3kernel/l3sys.dtx
@@ -232,7 +232,7 @@
           { uptex }
           { ptex }
       }
-    \cs_if_exist:NT \xetex_XeTeXversion:D { xetex }
+    \cs_if_exist:NT \tex_XeTeXversion:D { xetex }
   }
 \tl_map_inline:nn { { luatex } { pdftex } { ptex } { uptex } { xetex } }
   {





More information about the latex3-commits mailing list