summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/lang-ini.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-05-25 13:21:58 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-05-25 13:21:58 +0200
commit82aed3e7e8af29f359ebef4f93684d20e98107e6 (patch)
tree2b92c44d14566481aad5635f479b1b106d4e2347 /tex/context/base/mkiv/lang-ini.lua
parentaceba29d651766f5621b9812d4c40e28029bc4ea (diff)
downloadcontext-82aed3e7e8af29f359ebef4f93684d20e98107e6.tar.gz
2017-05-25 12:56:00
Diffstat (limited to 'tex/context/base/mkiv/lang-ini.lua')
-rw-r--r--tex/context/base/mkiv/lang-ini.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/lang-ini.lua b/tex/context/base/mkiv/lang-ini.lua
index 6de951998..e68938e35 100644
--- a/tex/context/base/mkiv/lang-ini.lua
+++ b/tex/context/base/mkiv/lang-ini.lua
@@ -270,6 +270,8 @@ local function unique(tag,requested,loaded)
end
end
+local shared = false
+
local function loaddefinitions(tag,specification)
statistics.starttiming(languages)
local data, instance = resolve(tag)
@@ -295,6 +297,19 @@ local function loaddefinitions(tag,specification)
local ok = false
local resources = data.resources or { }
data.resources = resources
+ if not shared then
+ local found = resolvers.findfile("lang-exc.lua")
+ if found then
+ shared = dofile(found)
+ if type(shared) == "table" then
+ shared = concat(shared," ")
+ else
+ shared = true
+ end
+ else
+ shared = true
+ end
+ end
for i=1,#definitions do
local definition = definitions[i]
if definition == "" then
@@ -344,13 +359,18 @@ local function loaddefinitions(tag,specification)
end
end
if #ploaded > 0 then
+ -- why not always clear
instance:clear_patterns()
instance:patterns(unique(tag,requested,ploaded))
end
if #eloaded > 0 then
+ -- why not always clear
instance:clear_hyphenation()
instance:hyphenation(concat(eloaded," "))
end
+ if type(shared) == "string" then
+ instance:hyphenation(shared)
+ end
return ok
elseif trace_patterns then
report_initialization("no definitions for language %a",tag)