summaryrefslogtreecommitdiff
path: root/lisp/simple.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 4f711d60ea2..9b622847e5b 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -5293,12 +5293,16 @@ Lisp programs should use this function for killing text.
Supply two arguments, character positions BEG and END indicating the
stretch of text to be killed. If the optional argument REGION is
non-nil, the function ignores BEG and END, and kills the current
- region instead."
+ region instead. Interactively, REGION is always non-nil, and so
+ 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 (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)