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."
;; 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)
......
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