1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-27 10:54:40 +00:00

(print-region-1): Use them instead of just pr.

(lpr-page-header-program, lpr-page-header-switches): New variables.
This commit is contained in:
Richard M. Stallman 1994-09-29 23:12:31 +00:00
parent 4699e6d2a1
commit c820123b60

View File

@ -40,7 +40,7 @@
(defvar lpr-command
(if (memq system-type '(usg-unix-v dgux hpux irix))
"lp" "lpr")
"*Shell command for printing a file")
"*Name of program for printing a file.")
(defvar lpr-headers-switches
(if (memq system-type '(usg-unix-v dgux hpux irix)) nil "-p")
@ -50,6 +50,12 @@
"Function to call to print the region on a printer.
See definition of `print-region-1' for calling conventions.")
(defvar lpr-page-header-program "pr"
"*Name of program for adding page headers to a file.")
(defvar lpr-page-header-switches nil
"*List of strings to use as options for `lpr-page-header-program'.")
;;;###autoload
(defun lpr-buffer ()
"Print buffer contents as with Unix command `lpr'.
@ -103,7 +109,8 @@ See definition of `print-region-1' for calling conventions.")
lpr-headers-switches)
switches))
(print-region-new-buffer start end)
(call-process-region start end "pr" t t nil)
(call-process-region start end lpr-page-header-program
t t lpr-page-header-options)
(setq start (point-min) end (point-max))))
(apply (or print-region-function 'call-process-region)
(nconc (list start end lpr-command