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:
parent
ae6c1c1950
commit
f39d6be01d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user