summaryrefslogtreecommitdiff
path: root/tex/context/base/file-job.mkvi
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2011-07-22 01:29:00 +0200
committerHans Hagen <pragma@wxs.nl>2011-07-22 01:29:00 +0200
commit0fec6e92a4f8bb230117f2392bd2d5e20fb2c836 (patch)
tree382aea36d7d41d5b9c2b25d7c88e4b6867bdab54 /tex/context/base/file-job.mkvi
parentaf52cdd22674c1f88ce50121a68be65052ddfa04 (diff)
downloadcontext-0fec6e92a4f8bb230117f2392bd2d5e20fb2c836.tar.gz
beta 2011.07.22 01:29
Diffstat (limited to 'tex/context/base/file-job.mkvi')
-rw-r--r--tex/context/base/file-job.mkvi19
1 files changed, 15 insertions, 4 deletions
diff --git a/tex/context/base/file-job.mkvi b/tex/context/base/file-job.mkvi
index b33bb9e19..47509754b 100644
--- a/tex/context/base/file-job.mkvi
+++ b/tex/context/base/file-job.mkvi
@@ -137,10 +137,21 @@
\unexpanded\def\dostartcomponent [#name]{\ctxcommand{startcomponent ("#name")}}
\unexpanded\def\dostartenvironment[#name]{\ctxcommand{startenvironment("#name")}}
-\unexpanded\def\stopproject {\ctxcommand{stopproject ()}}
-\unexpanded\def\stopproduct {\ctxcommand{stopproduct ()}}
-\unexpanded\def\stopcomponent {\ctxcommand{stopcomponent ()}}
-\unexpanded\def\stopenvironment {\ctxcommand{stopenvironment()}}
+\newconditional\endofinput % hack, needed because \endinput happens one level down in the input when we write from lua
+
+\unexpanded\def\signalendofinput#1% argument just for tracing
+ {\global\settrue\endofinput}
+
+\unexpanded\def\honorendofinput
+ {\ifconditional\endofinput
+ \global\setfalse\endofinput
+ \endinput
+ \fi}
+
+\unexpanded\def\stopproject {\ctxcommand{stopproject ()}\honorendofinput}
+\unexpanded\def\stopproduct {\ctxcommand{stopproduct ()}\honorendofinput}
+\unexpanded\def\stopcomponent {\ctxcommand{stopcomponent ()}\honorendofinput}
+\unexpanded\def\stopenvironment {\ctxcommand{stopenvironment()}\honorendofinput}
\def\currentproject {\ctxcommand{currentproject ()}}
\def\currentproduct {\ctxcommand{currentproduct ()}}