From f39d6be01d06026a64e08009b773dc6b7c9d7a2b Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 4 Sep 2006 15:03:26 +0000 Subject: [PATCH] (kill-region): Explicitly test there is a region. --- lisp/simple.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/simple.el b/lisp/simple.el index 3e19a8573e5..956468070da 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -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 -- 2.39.2