diff options
author | Eli Zaretskii <eliz@gnu.org> | 2006-09-09 10:40:27 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2006-09-09 10:40:27 +0000 |
commit | c98557ae615167cf93075d5c28dc18a281db1472 (patch) | |
tree | 1321ff2dbba895499469271a9d8276b0d658417f /lisp/lpr.el | |
parent | 7b26001712700bc0718a8c0ef8eaf0246be7bf39 (diff) | |
download | emacs-c98557ae615167cf93075d5c28dc18a281db1472.tar.gz emacs-c98557ae615167cf93075d5c28dc18a281db1472.tar.bz2 emacs-c98557ae615167cf93075d5c28dc18a281db1472.zip |
(lpr-page-header-switches): Page title switch is one of them.
(print-region-1): Substitute `%s' with the page title.
Diffstat (limited to 'lisp/lpr.el')
-rw-r--r-- | lisp/lpr.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/lpr.el b/lisp/lpr.el index 14d1049f074..dd39eb24349 100644 --- a/lisp/lpr.el +++ b/lisp/lpr.el @@ -140,8 +140,9 @@ See definition of `print-region-1' for calling conventions." ;; Berkeley systems support -F, and GNU pr supports both -f and -F, ;; So it looks like -F is a better default. -(defcustom lpr-page-header-switches '("-F") - "*List of strings to use as options for the page-header-generating program. +(defcustom lpr-page-header-switches '("-h %s" "-F") + "List of strings to use as options for the page-header-generating program. +If `%s' appears in one of the strings, it is substituted by the page title. The variable `lpr-page-header-program' specifies the program to use." :type '(repeat string) :group 'lpr) @@ -243,8 +244,8 @@ for further customization of the printer command." (let ((new-coords (print-region-new-buffer start end))) (apply 'call-process-region (car new-coords) (cdr new-coords) lpr-page-header-program t t nil - (nconc (list "-h" title) - lpr-page-header-switches))) + (mapcar (lambda (e) (format e title)) + lpr-page-header-switches))) (setq start (point-min) end (point-max)))) (apply (or print-region-function 'call-process-region) |