]> code.delx.au - gnu-emacs/blobdiff - lisp/simple.el
(copy-region-as-kill): Deactivate mark in transient-mark-mode.
[gnu-emacs] / lisp / simple.el
index 43b3c683c58289f3aa4b09d3e4053e84f988c063..67726a8f6c3cbb2b7a81d9ec99aa6a0b7aad96e7 100644 (file)
@@ -1469,20 +1469,25 @@ to make one entry in the kill ring."
 ;; then corrects it with the intended C-w.
 (defun copy-region-as-kill (beg end)
   "Save the region as if killed, but don't kill it.
+In Transient Mark mode, deactivate the mark.
 If `interprogram-cut-function' is non-nil, also save the text for a window
 system cut and paste."
   (interactive "r")
   (if (eq last-command 'kill-region)
       (kill-append (buffer-substring beg end) (< end beg))
     (kill-new (buffer-substring beg end)))
+  (if transient-mark-mode 
+      (setq mark-active nil))
   nil)
 
 (defun kill-ring-save (beg end)
   "Save the region as if killed, but don't kill it.
-This command is similar to `copy-region-as-kill', except that it gives
-visual feedback indicating the extent of the region being copied.
+In Transient Mark mode, deactivate the mark.
 If `interprogram-cut-function' is non-nil, also save the text for a window
-system cut and paste."
+system cut and paste.
+
+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")
   (copy-region-as-kill beg end)
   (if (interactive-p)