summaryrefslogtreecommitdiff
path: root/Master/texmf/scripts
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-04-02 22:24:10 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-04-02 22:24:10 +0000
commitfbfd5c86c705f4977a0b15dc7e2cd9611f76d5d0 (patch)
tree49cde3b7eb075ca3ec245a9fe95b689cc24faa51 /Master/texmf/scripts
parent3cb2271bc67884876da9885429ca597d0f900098 (diff)
Experimental undocumented option --just-view for use with texdoctk.
git-svn-id: svn://tug.org/texlive/trunk@17656 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf/scripts')
-rw-r--r--Master/texmf/scripts/texdoc/config.tlu3
-rw-r--r--Master/texmf/scripts/texdoc/constants.tlu2
-rw-r--r--Master/texmf/scripts/texdoc/main.tlu7
-rw-r--r--Master/texmf/scripts/texdoc/view.tlu1
4 files changed, 12 insertions, 1 deletions
diff --git a/Master/texmf/scripts/texdoc/config.tlu b/Master/texmf/scripts/texdoc/config.tlu
index a03ca8f5cd5..d0534f2a8fc 100644
--- a/Master/texmf/scripts/texdoc/config.tlu
+++ b/Master/texmf/scripts/texdoc/config.tlu
@@ -245,6 +245,9 @@ function setup_config_from_cl(arg)
'ext_list should be set in a configuration file instead.')
err_print('warning',
'Please protest on the texdoc mailing list if you need this.')
+ -- just view (undocumented option fur use with texdoctk)
+ elseif curr_arg == '--just-view' then
+ real_set_config('just_view', true)
-- problem
else
err_print('error', "unknown option: "..curr_arg)
diff --git a/Master/texmf/scripts/texdoc/constants.tlu b/Master/texmf/scripts/texdoc/constants.tlu
index a8ffabede36..8441450e089 100644
--- a/Master/texmf/scripts/texdoc/constants.tlu
+++ b/Master/texmf/scripts/texdoc/constants.tlu
@@ -93,7 +93,7 @@ max_verbosity='3'
def_verbosity='2'
exit_ok = 0
---exit_error = 1 -- apparently hard-coded in Lua
+exit_error = 1 -- apparently hard-coded in Lua
exit_usage = 2
known_debugs = {
diff --git a/Master/texmf/scripts/texdoc/main.tlu b/Master/texmf/scripts/texdoc/main.tlu
index 3b5d2851475..9fc20ae1182 100644
--- a/Master/texmf/scripts/texdoc/main.tlu
+++ b/Master/texmf/scripts/texdoc/main.tlu
@@ -11,6 +11,7 @@ load_env(L, {
'os', 'arg', 'print',
'setup_config_and_alias', 'init_databases', 'print_usage',
'get_doclist', 'deliver_results', 'aliased_names',
+ 'config', 'view_file',
})
-- get started
@@ -23,6 +24,12 @@ if not arg[1] then
os.exit(C.exit_usage)
end
+-- special case for just view
+if config.just_view then
+ local ok = view_file(arg[1])
+ os.exit(ok and C.exit_ok or C.exit_error)
+end
+
-- main loop
local docname
for _, docname in ipairs(arg) do
diff --git a/Master/texmf/scripts/texdoc/view.tlu b/Master/texmf/scripts/texdoc/view.tlu
index 9d924992b11..913cc4e6a62 100644
--- a/Master/texmf/scripts/texdoc/view.tlu
+++ b/Master/texmf/scripts/texdoc/view.tlu
@@ -184,5 +184,6 @@ end
-- finally export a few symbols
export_symbols(L, {
+ 'view_file',
'deliver_results',
})