X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/086add1519b5c5a69a1a35aadbfd4d7cc6a2b294..b3d90e4611747fe8aa17c2e3e8895b8749276712:/lisp/lpr.el diff --git a/lisp/lpr.el b/lisp/lpr.el index 5714c74663..2c2e8c872c 100644 --- a/lisp/lpr.el +++ b/lisp/lpr.el @@ -1,7 +1,7 @@ ;;; lpr.el --- print Emacs buffer on line printer -;; Copyright (C) 1985, 1988, 1992, 1994, 2001, 2003 -;; Free Software Foundation, Inc. +;; Copyright (C) 1985, 1988, 1992, 1994, 2001, 2002, 2003, +;; 2004, 2005, 2006 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: unix @@ -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") +(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)