Mercurial > emacs
diff lisp/lpr.el @ 72747:4dea9a34fd2e
(lpr-page-header-switches): Page title switch is one of them.
(print-region-1): Substitute `%s' with the page title.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 09 Sep 2006 10:39:45 +0000 |
parents | 3bd95f4f2941 |
children | 575850f5bd53 a1a25ac6c88a |
line wrap: on
line diff
--- a/lisp/lpr.el Sat Sep 09 10:34:23 2006 +0000 +++ b/lisp/lpr.el Sat Sep 09 10:39:45 2006 +0000 @@ -140,8 +140,9 @@ ;; 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 @@ (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)