changeset 72638:abebf4e18f10

(kill-region): Explicitly test there is a region.
author Richard M. Stallman <rms@gnu.org>
date Mon, 04 Sep 2006 15:03:26 +0000
parents 9db8c9a68f0f
children ade5681a8e7e
files lisp/simple.el
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Mon Sep 04 14:47:52 2006 +0000
+++ b/lisp/simple.el	Mon Sep 04 15:03:26 2006 +0000
@@ -2554,6 +2554,8 @@
   ;; Pass point first, then mark, because the order matters
   ;; when calling kill-append.
   (interactive (list (point) (mark)))
+  (unless (and beg end)
+    (error "The mark is not set now, so there is no region"))
   (condition-case nil
       (let ((string (filter-buffer-substring beg end t)))
 	(when string			;STRING is nil if BEG = END