Skip to content

Commit

Permalink
Do all primitive work globally
Browse files Browse the repository at this point in the history
As the Lua interface works globally, we really should as well
from the TeX side. This also keeps things sensible in terms of the
save stack.
  • Loading branch information
josephwright committed Apr 14, 2016
1 parent 8dd2071 commit 194f703
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions luatexconfig.tex
Expand Up @@ -25,12 +25,12 @@
\directlua{tex.enableprimitives("",
{"pageheight", "pagewidth", "outputmode"})}%
\ifx\pdfoutput\undefined
\let\pdfoutput\outputmode
\let\pdfpageheight\pageheight
\let\pdfpagewidth\pagewidth
\global\let\pdfoutput\outputmode
\global\let\pdfpageheight\pageheight
\global\let\pdfpagewidth\pagewidth
\def\do#1{%
\ifx\relax#1\else
\expandafter\def\csname pdf#1\endcsname{\pdfvariable #1}%
\expandafter\xdef\csname pdf#1\endcsname{\pdfvariable #1}%
\expandafter\do
\fi
}%
Expand All @@ -45,7 +45,7 @@
\global\let\dvimode\undefined
\def\do#1{%
\ifx\relax#1\else
\global\expandafter\let\csname pdf#1\endcsname\relax
\global\expandafter\let\csname pdf#1\endcsname\undefined
\expandafter\do
\fi
}%
Expand Down

0 comments on commit 194f703

Please sign in to comment.