diff options
author | Hans Hagen <pragma@wxs.nl> | 2010-09-03 11:05:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2010-09-03 11:05:00 +0200 |
commit | 0da1a7a94f55a5dc0d318f399eb843303d5b62f6 (patch) | |
tree | b5493406b2f6d8954204b532df5549acbc4baee8 /tex/context/base/scrp-ini.lua | |
parent | bbc8970958af29626335568414a4278d852e086f (diff) | |
download | context-0da1a7a94f55a5dc0d318f399eb843303d5b62f6.tar.gz |
beta 2010.09.03 11:05
Diffstat (limited to 'tex/context/base/scrp-ini.lua')
-rw-r--r-- | tex/context/base/scrp-ini.lua | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/tex/context/base/scrp-ini.lua b/tex/context/base/scrp-ini.lua index 949bbe2a7..b543053af 100644 --- a/tex/context/base/scrp-ini.lua +++ b/tex/context/base/scrp-ini.lua @@ -15,6 +15,8 @@ local trace_injections = false trackers.register("scripts.injections", function local report_preprocessing = logs.new("preprocessing") +local allocate = utilities.storage.allocate + local set_attribute = node.set_attribute local has_attribute = node.has_attribute local first_character = node.first_character @@ -32,23 +34,23 @@ local prestat = attributes.private('prestat') local fontdata = fonts.ids -local fcs = (fonts.color and fonts.color.set) or function() end -local fcr = (fonts.color and fonts.color.reset) or function() end +local fcs = fonts.colors.set +local fcr = fonts.colors.reset -scripts = scripts or { } -local scripts = scripts +scripts = scripts or { } +local scripts = scripts -scripts.handlers = scripts.handlers or { } -local handlers = scripts.handlers +scripts.handlers = scripts.handlers or { } +local handlers = scripts.handlers -scripts.names = scripts.names or { } -local names = scripts.names +scripts.names = allocate() +local names = scripts.names -scripts.numbers = scripts.numbers or { } -local numbers = scripts.numbers +scripts.numbers = allocate() +local numbers = scripts.numbers -scripts.hash = scripts.hash or { } -local hash = scripts.hash +scripts.hash = scripts.hash or { } +local hash = scripts.hash storage.register("scripts/hash", hash, "scripts.hash") @@ -181,7 +183,7 @@ end -- the following tables will become a proper installer -scripts.colors = { -- todo: just named colors +scripts.colors = allocate { -- todo: just named colors korean = "font:isol", chinese = "font:rest", full_width_open = "font:init", @@ -197,7 +199,7 @@ scripts.colors = { -- todo: just named colors local colors = scripts.colors -local numbertokind = { +local numbertokind = allocate { "korean", "chinese", "full_width_open", @@ -211,7 +213,7 @@ local numbertokind = { "jamo_final", } -local kindtonumber = { +local kindtonumber = allocate { korean = 1, chinese = 2, full_width_open = 3, |