diff options
Diffstat (limited to 'tex/context/base/mkxl/node-met.lmt')
-rw-r--r-- | tex/context/base/mkxl/node-met.lmt | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/tex/context/base/mkxl/node-met.lmt b/tex/context/base/mkxl/node-met.lmt index 72f4cf844..83712b5e7 100644 --- a/tex/context/base/mkxl/node-met.lmt +++ b/tex/context/base/mkxl/node-met.lmt @@ -534,56 +534,3 @@ metatable.__unm = function(head) n_setnext(last) return first end - --- also handy n.. do we still need this ... needs an update anyway - -local tonode = node.direct.tonode -local whatsit_code = nodecodes.whatsit -local getfields = node.fields -local sort = table.sort -local whatsitkeys = { } -local keys = { whatsit = whatsitkeys } -local messyhack = table.tohash { -- temporary solution - nodecodes.attributelist, - nodecodes.attribute, - nodecodes.action, -- hm -} - -setmetatableindex(keys,function(t,k) - local v = (k == "attributelist" or k == nodecodes.attributelist) and { } or getfields(k) - if messyhack[k] then - for i=1,#v do - if v[i] == "subtype" then - remove(v,i) - break - end - end - end - if v[ 0] then v[#v+1] = "next" v[ 0] = nil end - if v[-1] then v[#v+1] = "prev" v[-1] = nil end - sort(v) - t[k] = v - return v -end) - -setmetatableindex(whatsitkeys,function(t,k) - local v = getfields(whatsit_code,k) - if v[ 0] then v[#v+1] = "next" v[ 0] = nil end - if v[-1] then v[#v+1] = "prev" v[-1] = nil end - sort(v) - t[k] = v - return v -end) - -local function nodefields(n) - n = tonode(n) - local id = n.id - if id == whatsit_code then - return whatsitkeys[n.subtype] - else - return keys[id] - end -end - -nodes.keys = keys -- [id][subtype] -nodes.fields = nodefields -- (n) |