summaryrefslogtreecommitdiff
path: root/tex/context/base/lang-rep.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/lang-rep.lua')
-rw-r--r--tex/context/base/lang-rep.lua15
1 files changed, 3 insertions, 12 deletions
diff --git a/tex/context/base/lang-rep.lua b/tex/context/base/lang-rep.lua
index 16cd93e4a..31ae36e6d 100644
--- a/tex/context/base/lang-rep.lua
+++ b/tex/context/base/lang-rep.lua
@@ -113,15 +113,12 @@ local function hit(a,head)
end
end
-local function process(namespace,attribute,head)
- -- we could avoid this wrapper and use:
- -- local function process(head)
+function replacements.handler(head)
local current = head
- local done = false
+ local done = false
while current do
if current.id == glyph_code then
- -- local a = current[a_replacements]
- local a = current[attribute]
+ local a = getattr(current,a_replacements)
if a then
local last, final = hit(a,current)
if last then
@@ -183,12 +180,6 @@ function replacements.set(n) -- number or 'reset'
texsetattribute(a_replacements,n)
end
-replacements.handler = nodes.installattributehandler {
- name = "replacements",
- namespace = replacements,
- processor = process,
-}
-
-- interface
commands.setreplacements = replacements.set