aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-02-09 06:34:50 +0000
committerRichard M. Stallman1995-02-09 06:34:50 +0000
commit5bbf28a8ac8c6b96fb98e646e23a7e0d8cf77190 (patch)
treed0b5840243cfba9f43aa1e11214b596ac59c7fdd
parenta681b2a1c52951c661b68a52c1ec8f76aa969238 (diff)
downloademacs-5bbf28a8ac8c6b96fb98e646e23a7e0d8cf77190.tar.gz
emacs-5bbf28a8ac8c6b96fb98e646e23a7e0d8cf77190.zip
(print-region-1): Include print options in echo area msgs.
-rw-r--r--lisp/lpr.el27
1 files changed, 18 insertions, 9 deletions
diff --git a/lisp/lpr.el b/lisp/lpr.el
index e331060e9b9..33acdfe32e6 100644
--- a/lisp/lpr.el
+++ b/lisp/lpr.el
@@ -93,9 +93,22 @@ See definition of `print-region-1' for calling conventions.")
93 ;; and it seems to annoying to do for that MIPS system. 93 ;; and it seems to annoying to do for that MIPS system.
94 (let ((name (concat (buffer-name) " Emacs buffer")) 94 (let ((name (concat (buffer-name) " Emacs buffer"))
95 (title (concat (buffer-name) " Emacs buffer")) 95 (title (concat (buffer-name) " Emacs buffer"))
96 (width tab-width)) 96 (width tab-width)
97 switch-string)
97 (save-excursion 98 (save-excursion
98 (message "Spooling...") 99 (if page-headers
100 (if lpr-headers-switches
101 ;; It is possible to use an lpr option
102 ;; to get page headers.
103 (setq switches (append (if (stringp lpr-headers-switches)
104 (list lpr-headers-switches)
105 lpr-headers-switches)
106 switches))))
107 (setq switch-string
108 (if switches (concat " with options "
109 (mapconcat 'identity switches " "))
110 ""))
111 (message "Spooling%s..." switch-string)
99 (if (/= tab-width 8) 112 (if (/= tab-width 8)
100 (let ((new-coords (print-region-new-buffer start end))) 113 (let ((new-coords (print-region-new-buffer start end)))
101 (setq start (car new-coords) end (cdr new-coords)) 114 (setq start (car new-coords) end (cdr new-coords))
@@ -106,12 +119,8 @@ See definition of `print-region-1' for calling conventions.")
106 (untabify (point-min) (point-max)))) 119 (untabify (point-min) (point-max))))
107 (if page-headers 120 (if page-headers
108 (if lpr-headers-switches 121 (if lpr-headers-switches
109 ;; It is possible to use an lpr option 122 ;; We handled this above by modifying SWITCHES.
110 ;; to get page headers. 123 nil
111 (setq switches (append (if (stringp lpr-headers-switches)
112 (list lpr-headers-switches)
113 lpr-headers-switches)
114 switches))
115 ;; Run a separate program to get page headers. 124 ;; Run a separate program to get page headers.
116 (let ((new-coords (print-region-new-buffer start end))) 125 (let ((new-coords (print-region-new-buffer start end)))
117 (setq start (car new-coords) end (cdr new-coords))) 126 (setq start (car new-coords) end (cdr new-coords)))
@@ -132,7 +141,7 @@ See definition of `print-region-1' for calling conventions.")
132 switches))) 141 switches)))
133 (if (markerp end) 142 (if (markerp end)
134 (set-marker end nil)) 143 (set-marker end nil))
135 (message "Spooling...done")))) 144 (message "Spooling%s...done" switch-string))))
136 145
137;; This function copies the text between start and end 146;; This function copies the text between start and end
138;; into a new buffer, makes that buffer current. 147;; into a new buffer, makes that buffer current.