Add variable manual-command to override the manual program name.
authorChris Hanson <org/chris-hanson/cph>
Fri, 13 Nov 1992 22:22:53 +0000 (22:22 +0000)
committerChris Hanson <org/chris-hanson/cph>
Fri, 13 Nov 1992 22:22:53 +0000 (22:22 +0000)
v7/src/edwin/loadef.scm
v7/src/edwin/manual.scm

index 8019fb9a6fb1d003c3bb846dd8b241ca8415553b..a775cdb2b789ad4704606a676d5e98088af2c64f 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Id: loadef.scm,v 1.18 1992/11/05 23:31:52 cph Exp $
+;;;    $Id: loadef.scm,v 1.19 1992/11/13 22:22:53 cph Exp $
 ;;;
 ;;;    Copyright (c) 1986, 1989-92 Massachusetts Institute of Technology
 ;;;
@@ -151,6 +151,13 @@ Otherwise, a new buffer is created for each topic."
   false
   boolean?)
 
+(define-variable manual-command
+  "A string containing the manual page formatting command.  
+Section (if any) and topic strings are appended (with space separators)
+and the resulting string is provided to a shell running in a subprocess."
+  false
+  string-or-false?)
+
 (define-library 'print
   '("print" (EDWIN)))
 
@@ -193,7 +200,7 @@ variable's value is #F, the text is printed using LPR-COMMAND."
 
 (define-autoload-command 'print-region 'PRINT
   "Print region contents as with Unix command `lpr -p'.")
-
+\f
 (define-library 'SORT
   '("sort" (EDWIN)))
 
index 2cfa5c8a2985775438d38a652649c7a06779d709..28ed5f52acf1d64a0512fd715768b4382f7b57c3 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/manual.scm,v 1.10 1992/08/25 19:27:22 cph Exp $
+;;;    $Id: manual.scm,v 1.11 1992/11/13 22:22:45 cph Exp $
 ;;;
 ;;;    Copyright (c) 1991-92 Massachusetts Institute of Technology
 ;;;
@@ -85,9 +85,10 @@ where SECTION is the desired section of the manual, as in `tty(4)'."
                 topic
                 "...")
        (shell-command false (buffer-point buffer) false false
-                      (string-append (if (file-exists? "/usr/bin/man")
-                                         "/usr/bin/man"
-                                         "/usr/ucb/man")
+                      (string-append (or (ref-variable manual-command)
+                                         (if (file-exists? "/usr/bin/man")
+                                             "/usr/bin/man"
+                                             "/usr/ucb/man"))
                                      (if section
                                          (string-append " " section)
                                          "")