# HG changeset patch # User Richard M. Stallman # Date 791759526 0 # Node ID 6e25c10f6fe84a1a89aeb55c4281e2159e0f53d2 # Parent 6f9d0e6976783bf0cc25e84c56038e21e81630f3 (lpr-headers-switches): Default is nil. diff -r 6f9d0e697678 -r 6e25c10f6fe8 lisp/lpr.el --- a/lisp/lpr.el Thu Feb 02 19:28:31 1995 +0000 +++ b/lisp/lpr.el Thu Feb 02 21:12:06 1995 +0000 @@ -42,9 +42,12 @@ "lp" "lpr") "*Name of program for printing a file.") -(defvar lpr-headers-switches - (if (equal lpr-command "lpr") '("-p") nil) - "*List of strings to use as options for `lpr' to request page headings.") +;; Default is nil, because that enables us to use pr -f +;; which is more reliable than pr with no args, which is what lpr -p does. +(defvar lpr-headers-switches nil + "*List of strings to use as options for `lpr' to request page headings. +If nil, we run `lpr-page-header-program' to make page headings +and print the result.") (defvar print-region-function nil "Function to call to print the region on a printer. @@ -103,11 +106,13 @@ (untabify (point-min) (point-max)))) (if page-headers (if lpr-headers-switches - ;; On BSD, use an option to get page headers. + ;; It is possible to use an lpr option + ;; to get page headers. (setq switches (append (if (stringp lpr-headers-switches) (list lpr-headers-switches) lpr-headers-switches) switches)) + ;; Run a separate program to get page headers. (print-region-new-buffer start end) (call-process-region start end lpr-page-header-program t t lpr-page-header-options)