summaryrefslogtreecommitdiff
path: root/tex/context/base/file-job.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2015-04-08 15:15:05 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2015-04-08 15:15:05 +0200
commit32948ef106b3d0bbe9c0d7622c292a42080f7dbe (patch)
tree30df675c0fdcb654b636359aabfb9bb9f1b0a9cc /tex/context/base/file-job.lua
parentf1cde6067499874bf126dfc6f5bedb598f117073 (diff)
downloadcontext-32948ef106b3d0bbe9c0d7622c292a42080f7dbe.tar.gz
2015-04-08 14:22:00
Diffstat (limited to 'tex/context/base/file-job.lua')
-rw-r--r--tex/context/base/file-job.lua29
1 files changed, 24 insertions, 5 deletions
diff --git a/tex/context/base/file-job.lua b/tex/context/base/file-job.lua
index e8ccb045b..9bf43bbdc 100644
--- a/tex/context/base/file-job.lua
+++ b/tex/context/base/file-job.lua
@@ -794,7 +794,11 @@ function environment.loadexamodes(filename)
end
end
-commands.loadexamodes = environment.loadexamodes
+implement {
+ name = "loadexamodes",
+ actions = environment.loadexamodes,
+ arguments = "string"
+}
-- changed in mtx-context
-- code moved from luat-ini
@@ -881,7 +885,7 @@ implement {
arguments = "integer"
}
-function commands.getcommandline() -- has to happen at the tex end in order to expand
+function document.setcommandline() -- has to happen at the tex end in order to expand
-- the document[arguments|files] tables are copies
@@ -1020,21 +1024,36 @@ local function apply(list,action)
end
end
-function commands.setdocumentmodes() -- was setup: *runtime:modes
+function document.setmodes() -- was setup: *runtime:modes
apply(document.options.ctxfile .modes,context.enablemode)
apply(document.options.commandline.modes,context.enablemode)
end
-function commands.setdocumentmodules() -- was setup: *runtime:modules
+function document.setmodules() -- was setup: *runtime:modules
apply(document.options.ctxfile .modules,context.usemodule)
apply(document.options.commandline.modules,context.usemodule)
end
-function commands.setdocumentenvironments() -- was setup: *runtime:environments
+function document.setenvironments() -- was setup: *runtime:environments
apply(document.options.ctxfile .environments,context.environment)
apply(document.options.commandline.environments,context.environment)
end
+function document.setfilenames()
+ local initialize = environment.initializefilenames
+ if initialize then
+ initialize()
+ else
+ -- fatal error
+ end
+end
+
+implement { name = "setdocumentcommandline", actions = document.setcommandline, onlyonce = true }
+implement { name = "setdocumentmodes", actions = document.setmodes, onlyonce = true }
+implement { name = "setdocumentmodules", actions = document.setmodules, onlyonce = true }
+implement { name = "setdocumentenvironments", actions = document.setenvironments, onlyonce = true }
+implement { name = "setdocumentfilenames", actions = document.setfilenames, onlyonce = true }
+
local report_files = logs.reporter("system","files")
local report_options = logs.reporter("system","options")
local report_file = logs.reporter("used file")