diff options
author | Marius <mariausol@gmail.com> | 2012-10-19 01:20:13 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2012-10-19 01:20:13 +0300 |
commit | 69d2352af4b60929b37fc49f3bdb263977016244 (patch) | |
tree | db5eb11398e345dfa23b4c4500fb93575d2afb7c /tex/context/base/pack-obj.lua | |
parent | c18f7cbe51449a611ea1819fedd9a4ff18529b7d (diff) | |
download | context-69d2352af4b60929b37fc49f3bdb263977016244.tar.gz |
stable 2012.05.30 11:26
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 |