changeset 39273:5bd3a872b655

(ps-print-region, ps-print-region-with-faces) (ps-nb-pages-region): Signal an error if called interactively and the mark is not active.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 13 Sep 2001 10:11:58 +0000
parents d8fa6a1b7667
children 58cf0f945881
files lisp/ps-print.el
diffstat 1 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ps-print.el	Thu Sep 13 10:04:14 2001 +0000
+++ b/lisp/ps-print.el	Thu Sep 13 10:11:58 2001 +0000
@@ -3211,7 +3211,10 @@
 (defun ps-print-region (from to &optional filename)
   "Generate and print a PostScript image of the region.
 Like `ps-print-buffer', but prints just the current region."
-  (interactive (list (point) (mark) (ps-print-preprint current-prefix-arg)))
+  (interactive
+   (unless mark-active
+     (error "The mark is not set now"))
+   (list (point) (mark) (ps-print-preprint current-prefix-arg)))
   (ps-print-without-faces from to filename t))
 
 
@@ -3221,7 +3224,10 @@
 Like `ps-print-region', but includes font, color, and underline information in
 the generated image.  This command works only if you are using a window system,
 so it has a way to determine color values."
-  (interactive (list (point) (mark) (ps-print-preprint current-prefix-arg)))
+  (interactive
+   (unless mark-active
+     (error "The mark is not set now"))
+   (list (point) (mark) (ps-print-preprint current-prefix-arg)))
   (ps-print-with-faces from to filename t))
 
 
@@ -3302,7 +3308,10 @@
 (defun ps-nb-pages-region (nb-lines)
   "Display number of pages to print the region, for various font heights.
 The table depends on the current ps-print setup."
-  (interactive (list (count-lines (mark) (point))))
+  (interactive
+   (unless mark-active
+     (error "The mark is not set now"))
+   (list (count-lines (mark) (point))))
   (ps-nb-pages nb-lines))
 
 (defvar ps-prefix-quote nil