Mercurial > emacs
comparison lisp/lpr.el @ 922:52cd80cb5be1
*** empty log message ***
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Tue, 04 Aug 1992 04:09:07 +0000 |
parents | 20674ae6bf52 |
children | 2fee5d1fe47e |
comparison
equal
deleted
inserted
replaced
921:c5c4c2ee8f26 | 922:52cd80cb5be1 |
---|---|
74 (setq tab-width width) | 74 (setq tab-width width) |
75 (untabify (point-min) (point-max)))) | 75 (untabify (point-min) (point-max)))) |
76 (if page-headers | 76 (if page-headers |
77 (if (eq system-type 'usg-unix-v) | 77 (if (eq system-type 'usg-unix-v) |
78 (progn | 78 (progn |
79 (print-region-new-buffer) | 79 (print-region-new-buffer start end) |
80 (call-process-region start end "pr" t t nil)) | 80 (call-process-region start end "pr" t t nil)) |
81 ;; On BSD, use an option to get page headers. | 81 ;; On BSD, use an option to get page headers. |
82 (setq switches (cons "-p" switches)))) | 82 (setq switches (cons "-p" switches)))) |
83 (apply (or print-region-function 'call-process-region) | 83 (apply (or print-region-function 'call-process-region) |
84 (nconc (list start end lpr-command | 84 (nconc (list start end lpr-command |
90 | 90 |
91 ;; This function copies the text between start and end | 91 ;; This function copies the text between start and end |
92 ;; into a new buffer, makes that buffer current, | 92 ;; into a new buffer, makes that buffer current, |
93 ;; and sets start and end to the buffer bounds. | 93 ;; and sets start and end to the buffer bounds. |
94 ;; start and end are used free. | 94 ;; start and end are used free. |
95 (defun print-region-new-buffer () | 95 (defun print-region-new-buffer (start end) |
96 (or (string= (buffer-name) " *spool temp*") | 96 (or (string= (buffer-name) " *spool temp*") |
97 (let ((oldbuf (current-buffer))) | 97 (let ((oldbuf (current-buffer))) |
98 (set-buffer (get-buffer-create " *spool temp*")) | 98 (set-buffer (get-buffer-create " *spool temp*")) |
99 (widen) (erase-buffer) | 99 (widen) (erase-buffer) |
100 (insert-buffer-substring oldbuf start end) | 100 (insert-buffer-substring oldbuf start end) |