From: Richard M. Stallman Date: Mon, 4 Sep 2006 15:03:26 +0000 (+0000) Subject: (kill-region): Explicitly test there is a region. X-Git-Tag: emacs-pretest-22.0.90~770 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f39d6be01d06026a64e08009b773dc6b7c9d7a2b;p=emacs.git (kill-region): Explicitly test there is a region. --- 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