aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/lpr.el
diff options
context:
space:
mode:
authorChong Yidong2010-11-27 15:04:57 -0500
committerChong Yidong2010-11-27 15:04:57 -0500
commit07976ae3b816dea4fd541bbba862603d3132eb2c (patch)
tree4a437b7cb3abb01fb144530a130c991882a1b7f2 /lisp/lpr.el
parent9610796712a3bc43730c99005906571a2c0bccbd (diff)
parent402c8a49571227f8a4e678d4a6cdd6ba7841aef9 (diff)
downloademacs-07976ae3b816dea4fd541bbba862603d3132eb2c.tar.gz
emacs-07976ae3b816dea4fd541bbba862603d3132eb2c.zip
Merge changes from emacs-23 branch
Diffstat (limited to 'lisp/lpr.el')
-rw-r--r--lisp/lpr.el18
1 files changed, 14 insertions, 4 deletions
diff --git a/lisp/lpr.el b/lisp/lpr.el
index 559dc5513ae..3b91172a7ef 100644
--- a/lisp/lpr.el
+++ b/lisp/lpr.el
@@ -152,7 +152,9 @@ The variable `lpr-page-header-program' specifies the program to use."
152 "Print buffer contents without pagination or page headers. 152 "Print buffer contents without pagination or page headers.
153See the variables `lpr-switches' and `lpr-command' 153See the variables `lpr-switches' and `lpr-command'
154for customization of the printer command." 154for customization of the printer command."
155 (interactive) 155 (interactive
156 (unless (y-or-n-p "Send current buffer to default printer? ")
157 (error "Cancelled")))
156 (print-region-1 (point-min) (point-max) lpr-switches nil)) 158 (print-region-1 (point-min) (point-max) lpr-switches nil))
157 159
158;;;###autoload 160;;;###autoload
@@ -169,7 +171,9 @@ in the print command itself; we expect them to request pagination.
169 171
170See the variables `lpr-switches' and `lpr-command' 172See the variables `lpr-switches' and `lpr-command'
171for further customization of the printer command." 173for further customization of the printer command."
172 (interactive) 174 (interactive
175 (unless (y-or-n-p "Send current buffer to default printer? ")
176 (error "Cancelled")))
173 (print-region-1 (point-min) (point-max) lpr-switches t)) 177 (print-region-1 (point-min) (point-max) lpr-switches t))
174 178
175;;;###autoload 179;;;###autoload
@@ -177,7 +181,10 @@ for further customization of the printer command."
177 "Print region contents without pagination or page headers. 181 "Print region contents without pagination or page headers.
178See the variables `lpr-switches' and `lpr-command' 182See the variables `lpr-switches' and `lpr-command'
179for customization of the printer command." 183for customization of the printer command."
180 (interactive "r") 184 (interactive
185 (if (y-or-n-p "Send selected text to default printer? ")
186 (list (region-beginning) (region-end))
187 (error "Cancelled")))
181 (print-region-1 start end lpr-switches nil)) 188 (print-region-1 start end lpr-switches nil))
182 189
183;;;###autoload 190;;;###autoload
@@ -194,7 +201,10 @@ in the print command itself; we expect them to request pagination.
194 201
195See the variables `lpr-switches' and `lpr-command' 202See the variables `lpr-switches' and `lpr-command'
196for further customization of the printer command." 203for further customization of the printer command."
197 (interactive "r") 204 (interactive
205 (if (y-or-n-p "Send selected text to default printer? ")
206 (list (region-beginning) (region-end))
207 (error "Cancelled")))
198 (print-region-1 start end lpr-switches t)) 208 (print-region-1 start end lpr-switches t))
199 209
200(defun print-region-1 (start end switches page-headers) 210(defun print-region-1 (start end switches page-headers)