diff options
Diffstat (limited to 'tex/context/base/pack-obj.lua')
-rw-r--r-- | tex/context/base/pack-obj.lua | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/tex/context/base/pack-obj.lua b/tex/context/base/pack-obj.lua index 1e4e0f59e..c580aaa62 100644 --- a/tex/context/base/pack-obj.lua +++ b/tex/context/base/pack-obj.lua @@ -11,8 +11,6 @@ if not modules then modules = { } end modules ['pack-obj'] = { reusable components.</p> --ldx]]-- -local commands, context = commands, context - local texcount = tex.count local allocate = utilities.storage.allocate @@ -48,30 +46,15 @@ end function jobobjects.number(tag,default) local o = collected[tag] or tobesaved[tag] - return o and o[1] or default + context((o and o[1]) or default) end function jobobjects.page(tag,default) local o = collected[tag] or tobesaved[tag] - return o and o[2] or default -end - --- interface - -commands.saveobject = jobobjects.save -commands.setobject = jobobjects.set - -function commands.objectnumber(tag,default) - local o = collected[tag] or tobesaved[tag] - context(o and o[1] or default) -end - -function commands.objectpage(tag,default) - local o = collected[tag] or tobesaved[tag] - context(o and o[2] or default) + context((o and o[2]) or default) end -function commands.doifobjectreferencefoundelse(tag) - commands.doifelse(collected[tag] or tobesaved[tag]) +function jobobjects.doifelse(tag) + commands.testcase(collected[tag] or tobesaved[tag]) end |