summaryrefslogtreecommitdiff
path: root/tex/context/base/data-tex.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2012-06-05 23:00:15 +0300
committerMarius <mariausol@gmail.com>2012-06-05 23:00:15 +0300
commit7eed65970869ede47697d448e88fa4722418b7f3 (patch)
tree923cbee85f394d0613817412b9188cfb9810d030 /tex/context/base/data-tex.lua
parent6bfe227f2a770f059502000d4c7f20d5d8ef4024 (diff)
downloadcontext-7eed65970869ede47697d448e88fa4722418b7f3.tar.gz
beta 2012.06.05 21:45
Diffstat (limited to 'tex/context/base/data-tex.lua')
-rw-r--r--tex/context/base/data-tex.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/tex/context/base/data-tex.lua b/tex/context/base/data-tex.lua
index 6cb361699..2105f29f4 100644
--- a/tex/context/base/data-tex.lua
+++ b/tex/context/base/data-tex.lua
@@ -7,6 +7,7 @@ if not modules then modules = { } end modules ['data-tex'] = {
}
local char = string.char
+local insert, remove = table.insert, table.remove
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
@@ -51,6 +52,10 @@ appendgroup(textlineactions,"after" ) -- user
local ctrl_d = char( 4) -- unix
local ctrl_z = char(26) -- windows
+resolvers.inputstack = resolvers.inputstack or { }
+
+local inputstack = resolvers.inputstack
+
function helpers.textopener(tag,filename,filehandle,coding)
local lines
local t_filehandle = type(filehandle)
@@ -92,6 +97,7 @@ function helpers.textopener(tag,filename,filehandle,coding)
lines[noflines] = nil
end
logs.show_open(filename)
+ insert(inputstack,filename)
return {
filename = filename,
noflines = noflines,
@@ -101,6 +107,7 @@ function helpers.textopener(tag,filename,filehandle,coding)
report_tex("%s closer, '%s' closed",tag,filename)
end
logs.show_close(filename)
+ remove(inputstack)
t = nil
end,
reader = function(self)