diff options
| author | Richard M. Stallman | 1995-02-06 03:30:19 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-02-06 03:30:19 +0000 |
| commit | a3324470da1097287e3fd94ae2ad3029f7818446 (patch) | |
| tree | 58a7edd1a3437109d4edf16ccbd05361284acb7f | |
| parent | c066ae5ca0495c433c47f4b242bd1f0a4c568cd2 (diff) | |
| download | emacs-a3324470da1097287e3fd94ae2ad3029f7818446.tar.gz emacs-a3324470da1097287e3fd94ae2ad3029f7818446.zip | |
(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.
| -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 @@ | |||
| 33 | (defvar lpr-switches nil | 33 | (defvar lpr-switches nil |
| 34 | "*List of strings to pass as extra switch args to `lpr' when it is invoked.") | 34 | "*List of strings to pass as extra switch args to `lpr' when it is invoked.") |
| 35 | 35 | ||
| 36 | (defvar lpr-add-options (eq system-type 'berkeley-unix) | 36 | (defvar lpr-add-switches (eq system-type 'berkeley-unix) |
| 37 | "*Non-nil means construct -T and -J options for the `lpr'.") | 37 | "*Non-nil means construct -T and -J options for the `lpr'.") |
| 38 | 38 | ||
| 39 | ;;;###autoload | 39 | ;;;###autoload |
| @@ -114,14 +114,20 @@ See definition of `print-region-1' for calling conventions.") | |||
| 114 | switches)) | 114 | switches)) |
| 115 | ;; Run a separate program to get page headers. | 115 | ;; Run a separate program to get page headers. |
| 116 | (print-region-new-buffer start end) | 116 | (print-region-new-buffer start end) |
| 117 | (call-process-region start end lpr-page-header-program | 117 | (apply 'call-process-region start end lpr-page-header-program |
| 118 | t t lpr-page-header-switches) | 118 | t t nil |
| 119 | (nconc (and lpr-add-switches | ||
| 120 | (list "-h" title)) | ||
| 121 | lpr-page-header-switches)) | ||
| 119 | (setq start (point-min) end (point-max)))) | 122 | (setq start (point-min) end (point-max)))) |
| 120 | (apply (or print-region-function 'call-process-region) | 123 | (apply (or print-region-function 'call-process-region) |
| 121 | (nconc (list start end lpr-command | 124 | (nconc (list start end lpr-command |
| 122 | nil nil nil) | 125 | nil nil nil) |
| 123 | (nconc (and lpr-add-options | 126 | (nconc (and lpr-add-switches |
| 124 | (list "-J" name "-T" title)) | 127 | (list "-J" name)) |
| 128 | ;; These belong in pr if we are using that. | ||
| 129 | (and lpr-add-switches lpr-headers-switches | ||
| 130 | (list "-T" title)) | ||
| 125 | switches))) | 131 | switches))) |
| 126 | (if (markerp end) | 132 | (if (markerp end) |
| 127 | (set-marker end nil)) | 133 | (set-marker end nil)) |