[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100223: Prompt before running pri
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100223: Prompt before running print commands. |
Date: |
Sat, 20 Nov 2010 15:23:26 -0500 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 100223
committer: Chong Yidong <address@hidden>
branch nick: emacs-23
timestamp: Sat 2010-11-20 15:23:26 -0500
message:
Prompt before running print commands.
* lpr.el (lpr-buffer, print-buffer, lpr-region, print-region):
Prompt user before actually printing.
modified:
lisp/ChangeLog
lisp/lpr.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-11-18 02:09:41 +0000
+++ b/lisp/ChangeLog 2010-11-20 20:23:26 +0000
@@ -1,7 +1,13 @@
+2010-11-20 Chong Yidong <address@hidden>
+
+ * lpr.el (lpr-buffer, print-buffer, lpr-region, print-region):
+ Prompt user before actually printing.
+
2010-11-18 Stefan Monnier <address@hidden>
* simple.el (kill-new, kill-append, kill-region):
- * comint.el (comint-kill-region): Make the yank-handler argument
obsolete.
+ * comint.el (comint-kill-region): Make the yank-handler argument
+ obsolete.
2010-11-17 Stefan Monnier <address@hidden>
=== modified file 'lisp/lpr.el'
--- a/lisp/lpr.el 2010-01-13 08:35:10 +0000
+++ b/lisp/lpr.el 2010-11-20 20:23:26 +0000
@@ -152,7 +152,9 @@
"Print buffer contents without pagination or page headers.
See the variables `lpr-switches' and `lpr-command'
for customization of the printer command."
- (interactive)
+ (interactive
+ (unless (y-or-n-p "Send current buffer to default printer? ")
+ (error "Cancelled")))
(print-region-1 (point-min) (point-max) lpr-switches nil))
;;;###autoload
@@ -169,7 +171,9 @@
See the variables `lpr-switches' and `lpr-command'
for further customization of the printer command."
- (interactive)
+ (interactive
+ (unless (y-or-n-p "Send current buffer to default printer? ")
+ (error "Cancelled")))
(print-region-1 (point-min) (point-max) lpr-switches t))
;;;###autoload
@@ -177,7 +181,10 @@
"Print region contents without pagination or page headers.
See the variables `lpr-switches' and `lpr-command'
for customization of the printer command."
- (interactive "r")
+ (interactive
+ (if (y-or-n-p "Send selected text to default printer? ")
+ (list (region-beginning) (region-end))
+ (error "Cancelled")))
(print-region-1 start end lpr-switches nil))
;;;###autoload
@@ -194,7 +201,10 @@
See the variables `lpr-switches' and `lpr-command'
for further customization of the printer command."
- (interactive "r")
+ (interactive
+ (if (y-or-n-p "Send selected text to default printer? ")
+ (list (region-beginning) (region-end))
+ (error "Cancelled")))
(print-region-1 start end lpr-switches t))
(defun print-region-1 (start end switches page-headers)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100223: Prompt before running print commands.,
Chong Yidong <=