Browse Source

* src/cmd.c: When invoking external viewer, probe VIEWER environment
variable first, then PAGER, then fall back to "view".
* lib/mc.hint: Mention VIEWER environment variable.
* doc/mc.1.in: Document support for VIEWER environment variable.

Pavel Tsekov 19 years ago
parent
commit
b3fa1f0a3e
6 changed files with 23 additions and 4 deletions
  1. 4 0
      ChangeLog
  2. 6 2
      doc/mc.1.in
  3. 4 0
      lib/ChangeLog
  4. 1 1
      lib/mc.hint
  5. 5 0
      src/ChangeLog
  6. 3 1
      src/cmd.c

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+2006-01-29  Julian Mehnle  <julian@mehnle.net>
+
+	* doc/mc.1.in: Document support for VIEWER environment variable.
+
 2005-11-15  Pavel Roskin  <proski@gnu.org>
 
 	* acinclude.m4 (MC_WITH_MCSLANG): Add type tests from S-Lang

+ 6 - 2
doc/mc.1.in

@@ -886,10 +886,14 @@ Internal File Viewer
 .\"Internal File Viewer"
 but if the option "Use internal view" is off, it invokes an external
 file viewer specified by the
-.B PAGER
+.B VIEWER
 environment variable.  If
+.B VIEWER
+is undefined, the
+.B PAGER
+environment variable is tried.  If
 .B PAGER
-is undefined, the "view" command is invoked.  If you use Shift-F3
+is also undefined, the "view" command is invoked.  If you use Shift-F3
 instead, the viewer will be invoked without doing any formatting or
 preprocessing to the file.
 .PP

+ 4 - 0
lib/ChangeLog

@@ -1,3 +1,7 @@
+2006-01-29  Julian Mehnle  <julian@mehnle.net>
+
+	* lib/mc.hint: Mention VIEWER environment variable.
+
 2005-09-06  Roland Illig  <roland.illig@gmx.de>
 
 	* mc.menu: %d is already quoted, so it must not be written "%d".

+ 1 - 1
lib/mc.hint

@@ -31,7 +31,7 @@ Hint: Are some of your keys not working? Look at Options/Learn keys.
 Hint: To look at the output of a command in the viewer, use M-!
 Hint: F13 (or Shift-F3) invokes the viewer in raw mode.
 Hint: You may specify the editor for F4 with the shell variable EDITOR.
-Hint: You may specify the external viewer with the shell variable PAGER.
+Hint: You may specify the external viewer with the shell vars VIEWER or PAGER.
 Hint: You can disable all requests for confirmation in Options/Confirmation.
 Hint: Leap to frequently used directories in a single bound with C-\.
 Hint: You can do anonymous FTP with mc by typing 'cd /#ftp:machine.edu'

+ 5 - 0
src/ChangeLog

@@ -1,3 +1,8 @@
+2006-01-29  Julian Mehnle  <julian@mehnle.net>
+
+	* cmd.c: When invoking external viewer, probe VIEWER environment
+	variable first, then PAGER, then fall back to "view".
+
 2006-01-28  Roland Illig  <roland.illig@gmx.de>
 
 	* cmd.c (toggle_listing_cmd): Included the brief listing mode in

+ 3 - 1
src/cmd.c

@@ -127,7 +127,9 @@ view_file_at_line (const char *filename, int plain_view, int internal,
 	}
     } else {
 	if (!viewer) {
-	    viewer = getenv ("PAGER");
+	    viewer = getenv ("VIEWER");
+	    if (!viewer)
+		viewer = getenv ("PAGER");
 	    if (!viewer)
 		viewer = "view";
 	}