1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-04 11:40:22 +00:00

(kill-region): Explicitly test there is a region.

This commit is contained in:
Richard M. Stallman 2006-09-04 15:03:26 +00:00
parent ae6c1c1950
commit f39d6be01d

View 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