aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-09-29 23:12:31 +0000
committerRichard M. Stallman1994-09-29 23:12:31 +0000
commitc820123b60386cc62e238d76f6a4cb1e93d0e059 (patch)
tree9da6c09285b9c3c632c976e1d093299ac09323b7
parent4699e6d2a1a94b81e853c8afd48e652af232e529 (diff)
downloademacs-c820123b60386cc62e238d76f6a4cb1e93d0e059.tar.gz
emacs-c820123b60386cc62e238d76f6a4cb1e93d0e059.zip
(print-region-1): Use them instead of just pr.
(lpr-page-header-program, lpr-page-header-switches): New variables.
-rw-r--r--lisp/lpr.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/lpr.el b/lisp/lpr.el
index 272d5af04d8..a2c9cd55345 100644
--- a/lisp/lpr.el
+++ b/lisp/lpr.el
@@ -40,7 +40,7 @@
40(defvar lpr-command 40(defvar lpr-command
41 (if (memq system-type '(usg-unix-v dgux hpux irix)) 41 (if (memq system-type '(usg-unix-v dgux hpux irix))
42 "lp" "lpr") 42 "lp" "lpr")
43 "*Shell command for printing a file") 43 "*Name of program for printing a file.")
44 44
45(defvar lpr-headers-switches 45(defvar lpr-headers-switches
46 (if (memq system-type '(usg-unix-v dgux hpux irix)) nil "-p") 46 (if (memq system-type '(usg-unix-v dgux hpux irix)) nil "-p")
@@ -50,6 +50,12 @@
50 "Function to call to print the region on a printer. 50 "Function to call to print the region on a printer.
51See definition of `print-region-1' for calling conventions.") 51See definition of `print-region-1' for calling conventions.")
52 52
53(defvar lpr-page-header-program "pr"
54 "*Name of program for adding page headers to a file.")
55
56(defvar lpr-page-header-switches nil
57 "*List of strings to use as options for `lpr-page-header-program'.")
58
53;;;###autoload 59;;;###autoload
54(defun lpr-buffer () 60(defun lpr-buffer ()
55 "Print buffer contents as with Unix command `lpr'. 61 "Print buffer contents as with Unix command `lpr'.
@@ -103,7 +109,8 @@ See definition of `print-region-1' for calling conventions.")
103 lpr-headers-switches) 109 lpr-headers-switches)
104 switches)) 110 switches))
105 (print-region-new-buffer start end) 111 (print-region-new-buffer start end)
106 (call-process-region start end "pr" t t nil) 112 (call-process-region start end lpr-page-header-program
113 t t lpr-page-header-options)
107 (setq start (point-min) end (point-max)))) 114 (setq start (point-min) end (point-max))))
108 (apply (or print-region-function 'call-process-region) 115 (apply (or print-region-function 'call-process-region)
109 (nconc (list start end lpr-command 116 (nconc (list start end lpr-command