[latex3-commits] [l3svn] 02/07: Allow for primitive renaming in a more flexible way
noreply at latex-project.org
noreply at latex-project.org
Mon Nov 16 13:05:32 CET 2015
This is an automated email from the git hooks/post-receive script.
joseph pushed a commit to branch master
in repository l3svn.
commit a41d5e64dc3dda8907081570303ec34965733623
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Mon Nov 16 11:10:14 2015 +0000
Allow for primitive renaming in a more flexible way
This will help deal with LuaTeX renames without needing to
test every one.
---
l3kernel/l3names.dtx | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/l3kernel/l3names.dtx b/l3kernel/l3names.dtx
index 046dc60..2caf0f9 100644
--- a/l3kernel/l3names.dtx
+++ b/l3kernel/l3names.dtx
@@ -693,6 +693,28 @@
\__kernel_primitive:NN \synctex \pdftex_synctex:D
\__kernel_primitive:NN \tagcode \pdftex_tagcode:D
% \end{macrocode}
+% Post \pdfTeX{} primitive availability gets more complex. Both \XeTeX{} and
+% \LuaTeX{} have varying names for some primitives from \pdfTeX{}. Particularly
+% for \LuaTeX{} tracking all of that would be hard. Instead, we now check that
+% we only save primitives if they actually exist.
+% \begin{macrocode}
+%</initex|names|package>
+%<*initex|package>
+ \tex_long:D \tex_def:D \use_ii:nn #1#2 {#2}
+ \tex_long:D \tex_def:D \use_none:n #1 { }
+ \tex_long:D \tex_def:D \__kernel_primitive:NN #1#2
+ {
+ \etex_ifdefined:D #1
+ \tex_expandafter:D \use_ii:nn
+ \tex_fi:D
+ \use_none:n { \tex_global:D \tex_let:D #2 #1 }
+%<*initex>
+ \tex_global:D \tex_let:D #1 \tex_undefined:D
+%</initex>
+ }
+%</initex|package>
+%<*initex|names|package>
+% \end{macrocode}
% \XeTeX{}-specific primitives. Note that \XeTeX{}'s \tn{strcmp} is
% handled earlier and is \enquote{rolled up} into \tn{pdfstrcmp}. With
% the exception of the version primitives these don't carry |XeTeX| through
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the latex3-commits
mailing list