Mercurial > emacs
comparison lisp/lpr.el @ 30101:178c89d24a0d
(lpr-page-header-switches): Add `-h' switch.
(print-region-1): Don't hard code `-h' here.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Thu, 06 Jul 2000 20:08:45 +0000 |
parents | efd5a62ccce9 |
children | f2e26e453776 |
comparison
equal
deleted
inserted
replaced
30100:020fc2e83129 | 30101:178c89d24a0d |
---|---|
113 :type 'string | 113 :type 'string |
114 :group 'lpr) | 114 :group 'lpr) |
115 | 115 |
116 ;; Berkeley systems support -F, and GNU pr supports both -f and -F, | 116 ;; Berkeley systems support -F, and GNU pr supports both -f and -F, |
117 ;; So it looks like -F is a better default. | 117 ;; So it looks like -F is a better default. |
118 (defcustom lpr-page-header-switches '("-F") | 118 (defcustom lpr-page-header-switches '("-h" "-F") |
119 "*List of strings to use as options for the page-header-generating program. | 119 "*List of strings to use as options for the page-header-generating program. |
120 The variable `lpr-page-header-program' specifies the program to use." | 120 The variable `lpr-page-header-program' specifies the program to use." |
121 :type '(repeat string) | 121 :type '(repeat string) |
122 :group 'lpr) | 122 :group 'lpr) |
123 | 123 |
214 ;; Run a separate program to get page headers. | 214 ;; Run a separate program to get page headers. |
215 (let ((new-coords (print-region-new-buffer start end))) | 215 (let ((new-coords (print-region-new-buffer start end))) |
216 (setq start (car new-coords) end (cdr new-coords))) | 216 (setq start (car new-coords) end (cdr new-coords))) |
217 (apply 'call-process-region start end lpr-page-header-program | 217 (apply 'call-process-region start end lpr-page-header-program |
218 t t nil | 218 t t nil |
219 (nconc (list "-h" title) | 219 lpr-page-header-switches) |
220 lpr-page-header-switches)) | |
221 (setq start (point-min) end (point-max)))) | 220 (setq start (point-min) end (point-max)))) |
222 (let ((printer-name-switch (if (memq system-type | 221 (let ((printer-name-switch (if (memq system-type |
223 '(usg-unix-v dgux hpux irix)) | 222 '(usg-unix-v dgux hpux irix)) |
224 "-d" "-P"))) | 223 "-d" "-P"))) |
225 (apply (or print-region-function 'call-process-region) | 224 (apply (or print-region-function 'call-process-region) |