; * lisp/simple.el (kill-region): A better fix for bug#51320.
This commit is contained in:
parent
ee6bdd6eef
commit
5bc522b4f4
1 changed files with 6 additions and 3 deletions
|
@ -5289,9 +5289,12 @@ Supply two arguments, character positions BEG and END indicating the
|
|||
this command always kills the current region."
|
||||
;; Pass mark first, then point, because the order matters when
|
||||
;; calling `kill-append'.
|
||||
(interactive (list (mark) (point) 'region))
|
||||
(unless (or region (and beg end))
|
||||
(user-error "The mark is not set now, so there is no region"))
|
||||
(interactive (progn
|
||||
(let ((beg (mark))
|
||||
(end (point)))
|
||||
(unless (and beg end)
|
||||
(user-error "The mark is not set now, so there is no region"))
|
||||
(list beg end 'region))))
|
||||
(condition-case nil
|
||||
(let ((string (if region
|
||||
(funcall region-extract-function 'delete)
|
||||
|
|
Loading…
Add table
Reference in a new issue