summaryrefslogtreecommitdiff
path: root/tex/context/base/char-utf.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/char-utf.lua')
-rw-r--r--tex/context/base/char-utf.lua23
1 files changed, 15 insertions, 8 deletions
diff --git a/tex/context/base/char-utf.lua b/tex/context/base/char-utf.lua
index c30a160bc..79f5718fd 100644
--- a/tex/context/base/char-utf.lua
+++ b/tex/context/base/char-utf.lua
@@ -127,7 +127,7 @@ do
ug("(.)", cfup.high)
end
- for _, ch in pairs({ '~', '#', '$', '%', '^', '&', '_', '{', '}' }) do
+ for _, ch in ipairs({ '~', '#', '$', '%', '^', '&', '_', '{', '}' }) do
cfup.set(ch)
end
@@ -200,10 +200,12 @@ callback.register('process_input_buffer', characters.filters.process)
</typing>
<p>The following helper functions may disappear (or become optional)
-in the future.</p>
+in the future. Well, they are now.</p>
--ldx]]--
-characters.filters.sequences = { }
+--[[obsolete--
+
+characters.filters.sequences = characters.filters.sequences or { }
characters.filters.activated = false
function characters.filters.append(name)
@@ -215,7 +217,7 @@ function characters.filters.prepend(name)
end
function characters.filters.remove(name)
- for k,v in pairs(characters.filters.sequences) do
+ for k,v in ipairs(characters.filters.sequences) do
if v == name then
table.remove(characters.filters.sequences,k)
end
@@ -223,25 +225,28 @@ function characters.filters.remove(name)
end
function characters.filters.replace(name_1,name_2)
- for k,v in pairs(characters.filters.sequences) do
- if v == name then
+ for k,v in ipairs(characters.filters.sequences) do
+ if v == name_1 then
characters.filters.sequences[k] = name_2
+ break
end
end
end
function characters.filters.insert_before(name_1,name_2)
- for k,v in pairs(characters.filters.sequences) do
+ for k,v in ipairs(characters.filters.sequences) do
if v == name_1 then
table.insert(characters.filters.sequences,k,name_2)
+ break
end
end
end
function characters.filters.insert_after(name_1,name_2)
- for k,v in pairs(characters.filters.sequences) do
+ for k,v in ipairs(characters.filters.sequences) do
if v == name_1 then
table.insert(characters.filters.sequences,k+1,name_2)
+ break
end
end
end
@@ -261,6 +266,8 @@ function characters.filters.process(str)
end
end
+--obsolete]]--
+
--[[ldx--
<p>The following code is no longer needed and replaced by token
collectors somehwere else.</p>