summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMaster/texmf/scripts/texlive/texdoc.tlu38
1 files changed, 29 insertions, 9 deletions
diff --git a/Master/texmf/scripts/texlive/texdoc.tlu b/Master/texmf/scripts/texlive/texdoc.tlu
index 6ced5f191e5..83b96f76764 100755
--- a/Master/texmf/scripts/texlive/texdoc.tlu
+++ b/Master/texmf/scripts/texlive/texdoc.tlu
@@ -408,19 +408,38 @@ end
-- set config from environment if available
function setup_config_from_env ()
set_config_list {
- viewer_pdf = os.getenv ("PDFVIEWER")
- or os.getenv ("TEXDOCVIEW_pdf") or os.getenv ("TEXDOC_VIEWER_PDF"),
- viewer_ps = os.getenv ("PSVIEWER")
- or os.getenv ("TEXDOCVIEW_ps") or os.getenv ("TEXDOC_VIEWER_PS"),
- viewer_dvi = os.getenv ("DVIVIEWER")
- or os.getenv ("TEXDOCVIEW_dvi") or os.getenv ("TEXDOC_VIEWER_DVI"),
- viewer_html = os.getenv ("BROWSER")
- or os.getenv ("TEXDOCVIEW_html") or os.getenv ("TEXDOC_VIEWER_HTML"),
- viewer_txt = os.getenv ("PAGER")
+ viewer_pdf = os.getenv ("PDFVIEWER_texdoc")
+ or os.getenv ("TEXDOCVIEW_pdf") or os.getenv ("TEXDOC_VIEWER_PDF")
+ or os.getenv ("PDFVIEWER"),
+ viewer_ps = os.getenv ("PSVIEWER_texdoc")
+ or os.getenv ("TEXDOCVIEW_ps") or os.getenv ("TEXDOC_VIEWER_PS")
+ or os.getenv ("PSVIEWER"),
+ viewer_dvi = os.getenv ("DVIVIEWER_texdoc")
+ or os.getenv ("TEXDOCVIEW_dvi") or os.getenv ("TEXDOC_VIEWER_DVI")
+ or os.getenv ("DVIVIEWER"),
+ viewer_html = os.getenv ("BROWSER_texdoc")
+ or os.getenv ("TEXDOCVIEW_html") or os.getenv ("TEXDOC_VIEWER_HTML")
+ or os.getenv ("BROWSER"),
+ viewer_txt = os.getenv ("PAGER_texdoc")
or os.getenv ("TEXDOCVIEW_txt") or os.getenv ("TEXDOC_VIEWER_TXT")
+ or os.getenv ("PAGER"),
}
end
+-- warn about old envvar being in use
+function complain_about_old_envvar ()
+ for ext in list {'pdf', 'pds', 'dvi', 'html', 'txt'} do
+ for var in list
+ {"TEXDOCVIEW_"..ext, "TEXDOC_VIEWER_"..string.upper(ext) } do
+ if os.getenv (var) then
+ err_print ("Environment variable "..var..
+ " deprecated. See the manual\n\tsection ?.?, ?.? for details.",
+ "warning")
+ end
+ end
+ end
+end
+
-- set config+aliases from a particular config file if it exists
function read_config_file(configfile)
if (lfs.isfile(configfile)) then -- configfile exists
@@ -768,6 +787,7 @@ assert_arg_not_empty ()
setup_config_from_cl ()
assert_arg_not_empty ()
setup_config_from_env ()
+complain_about_old_envvar ()
setup_config_from_files ()
setup_config_from_defaults ()