summaryrefslogtreecommitdiff
path: root/tex/context/base/scrn-wid.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/scrn-wid.lua')
-rw-r--r--tex/context/base/scrn-wid.lua24
1 files changed, 16 insertions, 8 deletions
diff --git a/tex/context/base/scrn-wid.lua b/tex/context/base/scrn-wid.lua
index 4ad46761e..5b319b07e 100644
--- a/tex/context/base/scrn-wid.lua
+++ b/tex/context/base/scrn-wid.lua
@@ -9,19 +9,27 @@ if not modules then modules = { } end modules ['scrn-wid'] = {
interactions = interactions or { }
local interactions = interactions
-local attachments = { }
-local comments = { }
-local soundclips = { }
-local renderings = { }
-local linkedlists = { }
+local context = context
+
+local allocate = utilities.storage.allocate
+
+local attachments = allocate()
+local comments = allocate()
+local soundclips = allocate()
+local renderings = allocate()
+local linkedlists = allocate()
interactions.attachments = attachments
interactions.soundclips = soundclips
interactions.renderings = renderings
interactions.linkedlists = linkedlists
+local texsetbox = tex.setbox
+
local jobpasses = job.passes
+local texgetcount = tex.getcount
+
local codeinjections = backends.codeinjections
local nodeinjections = backends.nodeinjections
@@ -103,7 +111,7 @@ end
commands.registerattachment = attachments.register
function commands.insertattachment(specification)
- tex.box["b_scrn_attachment_link"] = attachments.insert(specification)
+ texsetbox("b_scrn_attachment_link",(attachments.insert(specification)))
end
-- Comment
@@ -117,7 +125,7 @@ function comments.insert(specification)
end
function commands.insertcomment(specification)
- tex.box["b_scrn_comment_link"] = comments.insert(specification)
+ texsetbox("b_scrn_comment_link",(comments.insert(specification)))
end
-- Soundclips
@@ -195,7 +203,7 @@ end
function commands.enhancelinkedlist(tag,n)
local ll = jobpasses.gettobesaved(tag)
if ll then
- ll[n] = texcount.realpageno
+ ll[n] = texgetcount("realpageno")
end
end