diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-02-06 03:30:19 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-02-06 03:30:19 +0000 |
commit | a3324470da1097287e3fd94ae2ad3029f7818446 (patch) | |
tree | 58a7edd1a3437109d4edf16ccbd05361284acb7f /lisp | |
parent | c066ae5ca0495c433c47f4b242bd1f0a4c568cd2 (diff) | |
download | emacs-a3324470da1097287e3fd94ae2ad3029f7818446.tar.gz |
(lpr-add-switches): Renamed from lpr-add-options.
(print-region-1): If we run pr, give it the -h option
instead of giving lpr the -T option.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/lpr.el | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/lpr.el b/lisp/lpr.el index 9e3c0f59f6f..b05d8a18891 100644 --- a/lisp/lpr.el +++ b/lisp/lpr.el @@ -33,7 +33,7 @@ (defvar lpr-switches nil "*List of strings to pass as extra switch args to `lpr' when it is invoked.") -(defvar lpr-add-options (eq system-type 'berkeley-unix) +(defvar lpr-add-switches (eq system-type 'berkeley-unix) "*Non-nil means construct -T and -J options for the `lpr'.") ;;;###autoload @@ -114,14 +114,20 @@ See definition of `print-region-1' for calling conventions.") switches)) ;; Run a separate program to get page headers. (print-region-new-buffer start end) - (call-process-region start end lpr-page-header-program - t t lpr-page-header-switches) + (apply 'call-process-region start end lpr-page-header-program + t t nil + (nconc (and lpr-add-switches + (list "-h" title)) + lpr-page-header-switches)) (setq start (point-min) end (point-max)))) (apply (or print-region-function 'call-process-region) (nconc (list start end lpr-command nil nil nil) - (nconc (and lpr-add-options - (list "-J" name "-T" title)) + (nconc (and lpr-add-switches + (list "-J" name)) + ;; These belong in pr if we are using that. + (and lpr-add-switches lpr-headers-switches + (list "-T" title)) switches))) (if (markerp end) (set-marker end nil)) |