summaryrefslogtreecommitdiff
path: root/tex/context/base/typo-dig.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-09-11 16:40:26 +0300
committerMarius <mariausol@gmail.com>2013-09-11 16:40:26 +0300
commit7e8fc3c7ea353c9331f92634ceeeaa724ccdeb01 (patch)
treeefcde28721b46ef2c02a33518f788cd3a5d806e4 /tex/context/base/typo-dig.lua
parent415f53ecf56e5353a9f14ae136ac0d4aea5dbf3d (diff)
downloadcontext-7e8fc3c7ea353c9331f92634ceeeaa724ccdeb01.tar.gz
beta 2013.09.11 15:37
Diffstat (limited to 'tex/context/base/typo-dig.lua')
-rw-r--r--tex/context/base/typo-dig.lua17
1 files changed, 5 insertions, 12 deletions
diff --git a/tex/context/base/typo-dig.lua b/tex/context/base/typo-dig.lua
index 829e4cc7a..ef05e62da 100644
--- a/tex/context/base/typo-dig.lua
+++ b/tex/context/base/typo-dig.lua
@@ -55,7 +55,6 @@ digits.actions = { }
local actions = digits.actions
local a_digits = attributes.private("digits")
-digits.attribute = a_digits
-- at some point we can manipulate the glyph node so then i need
-- to rewrite this then
@@ -83,7 +82,7 @@ function nodes.aligned(head,start,stop,width,how)
end
end
-actions[1] = function(head,start,attribute,attr)
+actions[1] = function(head,start,attr)
local font = start.font
local char = start.char
local unic = chardata[font][char].tounicode
@@ -102,16 +101,16 @@ actions[1] = function(head,start,attribute,attr)
return head, start, false
end
-local function process(namespace,attribute,head)
+function digits.handler(head)
local done, current, ok = false, head, false
while current do
if current.id == glyph_code then
- local attr = current[attribute]
+ local attr = current[a_digits]
if attr and attr > 0 then
- current[attribute] = unsetvalue
+ current[a_digits] = unsetvalue
local action = actions[attr%100] -- map back to low number
if action then
- head, current, ok = action(head,current,attribute,attr)
+ head, current, ok = action(head,current,attr)
done = done and ok
elseif trace_digits then
report_digits("unknown digit trigger %a",attr)
@@ -151,12 +150,6 @@ function digits.set(n) -- number or 'reset'
texsetattribute(a_digits,n)
end
-digits.handler = nodes.installattributehandler { -- we could avoid this wrapper
- name = "digits",
- namespace = digits,
- processor = process,
-}
-
-- interface
commands.setdigitsmanipulation = digits.set