summaryrefslogtreecommitdiff
path: root/tex/context/base/lang-ini.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/lang-ini.lua')
-rw-r--r--tex/context/base/lang-ini.lua13
1 files changed, 11 insertions, 2 deletions
diff --git a/tex/context/base/lang-ini.lua b/tex/context/base/lang-ini.lua
index b7b908144..c251ab1a6 100644
--- a/tex/context/base/lang-ini.lua
+++ b/tex/context/base/lang-ini.lua
@@ -280,7 +280,7 @@ end
languages.words = languages.words or {}
languages.words.data = languages.words.data or {}
-languages.words.enable = false
+languages.words.enables = false
languages.words.threshold = 4
languages.words.colors = {
@@ -426,7 +426,7 @@ do
local color = attributes.private('color')
function languages.words.check(head)
- if lw.enable and head.next then
+ if lw.enabled and head.next then
local colors = lw.colors
local alc = attributes.list[color]
return lw.methods[lw.method](head, color, alc[colors.known], alc[colors.unknown])
@@ -435,6 +435,15 @@ do
end
end
+ function languages.words.enable()
+ tasks.enableaction("processors","languages.words.check")
+ languages.words.enabled = true
+ end
+
+ function languages.words.disable()
+ languages.words.enabled = false
+ end
+
end
-- for the moment we hook it into the attribute handler