summaryrefslogtreecommitdiff
path: root/tex/context/base/strc-lst.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2014-03-24 00:52:00 +0100
committerHans Hagen <pragma@wxs.nl>2014-03-24 00:52:00 +0100
commit752a8cf2ff8a794c0a3b4f109f8568a897cc58fc (patch)
treec0010f2bdaa26cf0576491a04b2d6aeb1d5a0669 /tex/context/base/strc-lst.lua
parentc70b2e466bbb07e976f8684d56ae4e5398169e7d (diff)
downloadcontext-752a8cf2ff8a794c0a3b4f109f8568a897cc58fc.tar.gz
beta 2014.03.24 00:52
Diffstat (limited to 'tex/context/base/strc-lst.lua')
-rw-r--r--tex/context/base/strc-lst.lua21
1 files changed, 13 insertions, 8 deletions
diff --git a/tex/context/base/strc-lst.lua b/tex/context/base/strc-lst.lua
index 6ad491be2..16160e273 100644
--- a/tex/context/base/strc-lst.lua
+++ b/tex/context/base/strc-lst.lua
@@ -132,10 +132,15 @@ end
local function finalizer()
local flaginternals = references.flaginternals
+ local usedviews = references.usedviews
for i=1,#tobesaved do
local r = tobesaved[i].references
- if r and flaginternals[r.internal] then
- r.used = true
+ if r then
+ local i = r.internal
+ local f = flaginternals[i]
+ if f then
+ r.used = usedviews[i] or true
+ end
end
end
end
@@ -151,11 +156,11 @@ end
-- we could use t (as hash key) in order to check for dup entries
-function lists.addto(t)
+function lists.addto(t) -- maybe more more here (saves parsing at the tex end)
local m = t.metadata
local u = t.userdata
if u and type(u) == "string" then
- t.userdata = helpers.touserdata(u) -- nicer at the tex end
+ t.userdata = helpers.touserdata(u)
end
local numberdata = t.numberdata
local group = numberdata and numberdata.group
@@ -170,6 +175,10 @@ function lists.addto(t)
numberdata.numbers = cached[groupindex].numberdata.numbers
end
end
+ local setcomponent = references.setcomponent
+ if setcomponent then
+ setcomponent(t) -- can be inlined
+ end
local r = t.references
local i = r and r.internal or 0 -- brrr
local p = pushed[i]
@@ -179,10 +188,6 @@ function lists.addto(t)
pushed[i] = p
r.listindex = p
end
- local setcomponent = references.setcomponent
- if setcomponent then
- setcomponent(t) -- might move to the tex end
- end
if group then
groupindices[name][group] = p
end