Index: lisp/lpr.el =================================================================== RCS file: /sources/emacs/emacs/lisp/lpr.el,v retrieving revision 1.69 diff -c -r1.69 lpr.el *** lisp/lpr.el 6 Feb 2006 14:33:34 -0000 1.69 --- lisp/lpr.el 5 Sep 2006 14:22:01 -0000 *************** *** 140,147 **** ;; 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. The variable `lpr-page-header-program' specifies the program to use." :type '(repeat string) :group 'lpr) --- 140,148 ---- ;; 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 '("-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,250 **** (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))) (setq start (point-min) end (point-max)))) (apply (or print-region-function 'call-process-region) --- 244,251 ---- (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 ! (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) Index: lisp/ChangeLog =================================================================== RCS file: /sources/emacs/emacs/lisp/ChangeLog,v retrieving revision 1.9966 diff -c -0 -r1.9966 ChangeLog *** lisp/ChangeLog 27 Aug 2006 07:08:19 -0000 1.9966 --- lisp/ChangeLog 5 Sep 2006 14:22:14 -0000 *************** *** 0 **** --- 1,5 ---- + 2006-09-05 Michaël Cadilhac + + * lpr.el (lpr-page-header-switches): Page title switch is one of them. + (print-region-1): Substitute `%s' in every switches by the page title. +