aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2000-03-31 11:29:51 +0000
committerGerd Moellmann2000-03-31 11:29:51 +0000
commitba74d3e36a2d3d1ae68a8268c3cf6c5a2b562cd0 (patch)
treea7da55387ca8f9669bd7f9a858cdcdf3a6a32242
parentc3b2784b4bfd506726bf046e6f0bd4283bb8be42 (diff)
downloademacs-ba74d3e36a2d3d1ae68a8268c3cf6c5a2b562cd0.tar.gz
emacs-ba74d3e36a2d3d1ae68a8268c3cf6c5a2b562cd0.zip
(print-region-1): Use -d to specify printer name for
systems `usg-unix-v*, `dgux', `hpux', `irix'.
-rw-r--r--lisp/lpr.el26
1 files changed, 15 insertions, 11 deletions
diff --git a/lisp/lpr.el b/lisp/lpr.el
index a6fe0459e73..7eb76613719 100644
--- a/lisp/lpr.el
+++ b/lisp/lpr.el
@@ -219,17 +219,21 @@ for further customization of the printer command."
219 (nconc (list "-h" title) 219 (nconc (list "-h" title)
220 lpr-page-header-switches)) 220 lpr-page-header-switches))
221 (setq start (point-min) end (point-max)))) 221 (setq start (point-min) end (point-max))))
222 (apply (or print-region-function 'call-process-region) 222 (let ((printer-name-switch (if (memq system-type
223 (nconc (list start end lpr-command 223 '(usg-unix-v dgux hpux irix))
224 nil nil nil) 224 "-d" "-P")))
225 (nconc (and lpr-add-switches 225 (apply (or print-region-function 'call-process-region)
226 (list "-J" name)) 226 (nconc (list start end lpr-command
227 ;; These belong in pr if we are using that. 227 nil nil nil)
228 (and lpr-add-switches lpr-headers-switches 228 (nconc (and lpr-add-switches
229 (list "-T" title)) 229 (list "-J" name))
230 (and (stringp printer-name) 230 ;; These belong in pr if we are using that.
231 (list (concat "-P" printer-name))) 231 (and lpr-add-switches lpr-headers-switches
232 switches))) 232 (list "-T" title))
233 (and (stringp printer-name)
234 (list (concat printer-name-switch
235 printer-name)))
236 switches))))
233 (if (markerp end) 237 (if (markerp end)
234 (set-marker end nil)) 238 (set-marker end nil))
235 (message "Spooling%s...done" switch-string)))) 239 (message "Spooling%s...done" switch-string))))