aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDima Kogan2013-12-17 23:48:26 +0800
committerChong Yidong2013-12-17 23:48:26 +0800
commit76da345537e550892b8bc9434ee0b3b82b44c573 (patch)
treeeaa328625be59e8397e393286a6f6576bef487a9
parent2b84d7639569b9476aa32c8301cb25dd58792e0f (diff)
downloademacs-76da345537e550892b8bc9434ee0b3b82b44c573.tar.gz
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
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/simple.el16
2 files changed, 17 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 23c146fb128..8d67a12e3d6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12013-12-17 Dima Kogan <dima@secretsauce.net> (tiny change)
2
3 * simple.el (kill-region): Pass mark first, then point, so that
4 kill-append works right (Bug#12819).
5 (copy-region-as-kill, kill-ring-save): Likewise.
6
12013-12-17 Leo Liu <sdl.web@gmail.com> 72013-12-17 Leo Liu <sdl.web@gmail.com>
2 8
3 * net/rcirc.el (rcirc-add-face): 9 * net/rcirc.el (rcirc-add-face):
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.
3638 3638
3639The optional argument REGION if non-nil, indicates that we're not just killing 3639The optional argument REGION if non-nil, indicates that we're not just killing
3640some text between BEG and END, but we're killing the region." 3640some text between BEG and END, but we're killing the region."
3641 ;; Pass point first, then mark, because the order matters 3641 ;; Pass mark first, then point, because the order matters when
3642 ;; when calling kill-append. 3642 ;; calling `kill-append'.
3643 (interactive (list (point) (mark) 'region)) 3643 (interactive (list (mark) (point) 'region))
3644 (unless (and beg end) 3644 (unless (and beg end)
3645 (error "The mark is not set now, so there is no region")) 3645 (error "The mark is not set now, so there is no region"))
3646 (condition-case nil 3646 (condition-case nil
@@ -3686,7 +3686,10 @@ The optional argument REGION if non-nil, indicates that we're not just copying
3686some text between BEG and END, but we're copying the region. 3686some text between BEG and END, but we're copying the region.
3687 3687
3688This command's old key binding has been given to `kill-ring-save'." 3688This command's old key binding has been given to `kill-ring-save'."
3689 (interactive "r\np") 3689 ;; Pass mark first, then point, because the order matters when
3690 ;; calling `kill-append'.
3691 (interactive (list (mark) (point)
3692 (prefix-numeric-value current-prefix-arg)))
3690 (let ((str (if region 3693 (let ((str (if region
3691 (funcall region-extract-function nil) 3694 (funcall region-extract-function nil)
3692 (filter-buffer-substring beg end)))) 3695 (filter-buffer-substring beg end))))
@@ -3710,7 +3713,10 @@ some text between BEG and END, but we're copying the region.
3710 3713
3711This command is similar to `copy-region-as-kill', except that it gives 3714This command is similar to `copy-region-as-kill', except that it gives
3712visual feedback indicating the extent of the region being copied." 3715visual feedback indicating the extent of the region being copied."
3713 (interactive "r\np") 3716 ;; Pass mark first, then point, because the order matters when
3717 ;; calling `kill-append'.
3718 (interactive (list (mark) (point)
3719 (prefix-numeric-value current-prefix-arg)))
3714 (copy-region-as-kill beg end region) 3720 (copy-region-as-kill beg end region)
3715 ;; This use of called-interactively-p is correct because the code it 3721 ;; This use of called-interactively-p is correct because the code it
3716 ;; controls just gives the user visual feedback. 3722 ;; controls just gives the user visual feedback.