Commit 0e264847 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(copy-region-as-kill): Deactivate mark in transient-mark-mode.

(copy-region-as-kill, kill-ring-save): Doc fixes.
parent 6998e1a1
...@@ -1469,20 +1469,25 @@ to make one entry in the kill ring." ...@@ -1469,20 +1469,25 @@ to make one entry in the kill ring."
;; then corrects it with the intended C-w. ;; then corrects it with the intended C-w.
(defun copy-region-as-kill (beg end) (defun copy-region-as-kill (beg end)
"Save the region as if killed, but don't kill it. "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 If `interprogram-cut-function' is non-nil, also save the text for a window
system cut and paste." system cut and paste."
(interactive "r") (interactive "r")
(if (eq last-command 'kill-region) (if (eq last-command 'kill-region)
(kill-append (buffer-substring beg end) (< end beg)) (kill-append (buffer-substring beg end) (< end beg))
(kill-new (buffer-substring beg end))) (kill-new (buffer-substring beg end)))
(if transient-mark-mode
(setq mark-active nil))
nil) nil)
(defun kill-ring-save (beg end) (defun kill-ring-save (beg end)
"Save the region as if killed, but don't kill it. "Save the region as if killed, but don't kill it.
This command is similar to `copy-region-as-kill', except that it gives In Transient Mark mode, deactivate the mark.
visual feedback indicating the extent of the region being copied.
If `interprogram-cut-function' is non-nil, also save the text for a window 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") (interactive "r")
(copy-region-as-kill beg end) (copy-region-as-kill beg end)
(if (interactive-p) (if (interactive-p)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment