summaryrefslogtreecommitdiff
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorDima Kogan <dima@secretsauce.net>2013-12-17 23:48:26 +0800
committerChong Yidong <cyd@gnu.org>2013-12-17 23:48:26 +0800
commit76da345537e550892b8bc9434ee0b3b82b44c573 (patch)
treeeaa328625be59e8397e393286a6f6576bef487a9 /lisp/simple.el
parent2b84d7639569b9476aa32c8301cb25dd58792e0f (diff)
downloademacs-76da345537e550892b8bc9434ee0b3b82b44c573.tar.gz
emacs-76da345537e550892b8bc9434ee0b3b82b44c573.tar.bz2
emacs-76da345537e550892b8bc9434ee0b3b82b44c573.zip
* simple.el (kill-region): Pass mark first then point, so kill-append works right.
(copy-region-as-kill, kill-ring-save): Likewise. Fixes: debbugs:12819
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el16
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 78fb12f8c9c..412d75f9221 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3638,9 +3638,9 @@ to make one entry in the kill ring.
The optional argument REGION if non-nil, indicates that we're not just killing
some text between BEG and END, but we're killing the region."
- ;; Pass point first, then mark, because the order matters
- ;; when calling kill-append.
- (interactive (list (point) (mark) 'region))
+ ;; Pass mark first, then point, because the order matters when
+ ;; calling `kill-append'.
+ (interactive (list (mark) (point) 'region))
(unless (and beg end)
(error "The mark is not set now, so there is no region"))
(condition-case nil
@@ -3686,7 +3686,10 @@ The optional argument REGION if non-nil, indicates that we're not just copying
some text between BEG and END, but we're copying the region.
This command's old key binding has been given to `kill-ring-save'."
- (interactive "r\np")
+ ;; Pass mark first, then point, because the order matters when
+ ;; calling `kill-append'.
+ (interactive (list (mark) (point)
+ (prefix-numeric-value current-prefix-arg)))
(let ((str (if region
(funcall region-extract-function nil)
(filter-buffer-substring beg end))))
@@ -3710,7 +3713,10 @@ some text between BEG and END, but we're copying the region.
This command is similar to `copy-region-as-kill', except that it gives
visual feedback indicating the extent of the region being copied."
- (interactive "r\np")
+ ;; Pass mark first, then point, because the order matters when
+ ;; calling `kill-append'.
+ (interactive (list (mark) (point)
+ (prefix-numeric-value current-prefix-arg)))
(copy-region-as-kill beg end region)
;; This use of called-interactively-p is correct because the code it
;; controls just gives the user visual feedback.