summaryrefslogtreecommitdiff
path: root/Master/texmf/scripts
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-07-31 14:21:33 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-07-31 14:21:33 +0000
commit2fd61852ed1bac0d34d1121293339b56de2cd2d2 (patch)
tree9282accece924ee3b2552404e9ff9d4f97f8e436 /Master/texmf/scripts
parent189801bc1f2d57992933d03be6953f59ca7bf46f (diff)
Add a special feature (hack?) for sty files (most probably coming from and
alias, see texmf/texdoc/texdoc.cnf). Doesn't allow to really list all files (eg in TEXMFHOME and TEXMFDIST) but this could come later. git-svn-id: svn://tug.org/texlive/trunk@9936 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf/scripts')
-rwxr-xr-xMaster/texmf/scripts/texlive/texdoc.tlu30
1 files changed, 25 insertions, 5 deletions
diff --git a/Master/texmf/scripts/texlive/texdoc.tlu b/Master/texmf/scripts/texlive/texdoc.tlu
index 596aa15746d..ab3f6d73b70 100755
--- a/Master/texmf/scripts/texlive/texdoc.tlu
+++ b/Master/texmf/scripts/texlive/texdoc.tlu
@@ -246,6 +246,14 @@ function rmdirs (files)
return res
end
+-- for sty files, we obviously don't want to look in TEXDOCS...
+-- and we don't need a list since those are not duplicated (ahem...)
+function special_sty_search (styname)
+ exact_docfiles = { kpse.find_file (styname) }
+ rel_docfiles = {}
+end
+
+
-- functions to set config values and aliases
---------------------------------------------
@@ -736,17 +744,26 @@ setup_config_from_defaults ()
exit_code = 0
no_regex = true
real_ext_list = config.ext_list
+real_populate_docfiles = populate_docfiles
+real_mixed_populate_docfiles = mixed_populate_docfiles
+real_real_path = real_path
for docname in list (arg) do
if config.alias_switch and alias[docname] then
print ("texdoc info: "..docname.." aliased to "..alias[docname])
docname = alias[docname]
end
- docname_base, docname_ext = string.match(docname, '^(.*)%.(.*)$')
- if docname_ext then
- config.ext_list = { docname_ext }
- docname = docname_base
+ if config.mode ~= 'regex' then
+ docname_base, docname_ext = string.match (docname, '^(.*)%.(.*)$')
+ if docname_ext == 'sty' then
+ print ("texdoc info: using special search mode for sty files")
+ populate_docfiles = special_sty_search
+ mixed_populate_docfiles = special_sty_search
+ real_path = function (arg) return arg end
+ elseif docname_ext then
+ config.ext_list = { docname_ext }
+ docname = docname_base
+ end
end
- local docfound = false
if (config.mode == 'regex') then
no_regex = false
populate_docfiles(docname)
@@ -789,6 +806,9 @@ for docname in list (arg) do
end
end -- if construct "case config.mode in"
config.ext_list = real_ext_list
+ populate_docfiles = real_populate_docfiles
+ mixed_populate_docfiles = real_mixed_populate_docfiles
+ real_path = real_real_path
end -- for docname in arg
os.exit(exit_code)