diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-02-02 21:12:06 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-02-02 21:12:06 +0000 |
commit | 7173ec778ed04cb9f0150cc0116d3fb46649d382 (patch) | |
tree | 78acbde4fd24b1c84c00b21043ec03bcce473f65 /lisp/lpr.el | |
parent | e86fe0d7893ddc1998668d1dfc8cd8440ed365a5 (diff) | |
download | emacs-7173ec778ed04cb9f0150cc0116d3fb46649d382.tar.gz emacs-7173ec778ed04cb9f0150cc0116d3fb46649d382.tar.bz2 emacs-7173ec778ed04cb9f0150cc0116d3fb46649d382.zip |
(lpr-headers-switches): Default is nil.
Diffstat (limited to 'lisp/lpr.el')
-rw-r--r-- | lisp/lpr.el | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/lpr.el b/lisp/lpr.el index c5d9bb2205e..bab4e2e5a04 100644 --- a/lisp/lpr.el +++ b/lisp/lpr.el @@ -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 @@ See definition of `print-region-1' for calling conventions.") (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) |