]> git.eshelyaron.com Git - emacs.git/commitdiff
(kill-region): Explicitly test there is a region.
authorRichard M. Stallman <rms@gnu.org>
Mon, 4 Sep 2006 15:03:26 +0000 (15:03 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 4 Sep 2006 15:03:26 +0000 (15:03 +0000)
lisp/simple.el

index 3e19a8573e5f0b2a5221c41620d0a1b85122f855..956468070da3000f47ddf433b745d3f8479d8770 100644 (file)
@@ -2554,6 +2554,8 @@ text.  See `insert-for-yank'."
   ;; 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