summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2012-11-16 23:51:00 +0100
committerHans Hagen <pragma@wxs.nl>2012-11-16 23:51:00 +0100
commitc603ddfa8569d8caa9d13701a4d7229ee9585813 (patch)
tree23f66f26cec7a4287ef3a92c9195d7fdeb2bf7ae /scripts
parent86e5f7baaba8a418ab5a97af769c015dda19500c (diff)
downloadcontext-c603ddfa8569d8caa9d13701a4d7229ee9585813.tar.gz
beta 2012.11.16 23:51
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtx-patterns.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/context/lua/mtx-patterns.lua b/scripts/context/lua/mtx-patterns.lua
index a436b0157..86f63bb16 100644
--- a/scripts/context/lua/mtx-patterns.lua
+++ b/scripts/context/lua/mtx-patterns.lua
@@ -16,6 +16,7 @@ local helpinfo = [[
--check check pattern file (or those used by context when no file given)
--path source path where hyph-foo.tex files are stored
--destination destination path
+--specification additional patterns: e.g.: =cy,hyph-cy,welsh
examples of usage:
@@ -454,7 +455,19 @@ function scripts.patterns.save(destination,mnemonic,name,patternsnew,hyphenation
end
function scripts.patterns.prepare()
+ --
dofile(resolvers.findfile("char-def.lua"))
+ --
+ local specification = environment.argument("specification")
+ if specification then
+ local components = utilities.parsers.settings_to_array(specification)
+ if #components == 3 then
+ table.insert(scripts.patterns.list,1,components)
+ report("specification added: %s %s %s",table.unpack(components))
+ else
+ report('invalid specification: %q, "xx,lang-yy,zzzz" expected',specification)
+ end
+ end
end
function scripts.patterns.check()