aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-12-21 01:52:31 +0000
committerRichard M. Stallman1997-12-21 01:52:31 +0000
commit0e2648474eb4f0aae21fe572738cae7cd8559ada (patch)
tree3ee97cd4862845a081fbcf9df2b294fb622227c7
parent6998e1a1e534c28c3b14881203c5e6e1dc6e0064 (diff)
downloademacs-0e2648474eb4f0aae21fe572738cae7cd8559ada.tar.gz
emacs-0e2648474eb4f0aae21fe572738cae7cd8559ada.zip
(copy-region-as-kill): Deactivate mark in transient-mark-mode.
(copy-region-as-kill, kill-ring-save): Doc fixes.
-rw-r--r--lisp/simple.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 43b3c683c58..67726a8f6c3 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1469,20 +1469,25 @@ to make one entry in the kill ring."
1469;; then corrects it with the intended C-w. 1469;; then corrects it with the intended C-w.
1470(defun copy-region-as-kill (beg end) 1470(defun copy-region-as-kill (beg end)
1471 "Save the region as if killed, but don't kill it. 1471 "Save the region as if killed, but don't kill it.
1472In Transient Mark mode, deactivate the mark.
1472If `interprogram-cut-function' is non-nil, also save the text for a window 1473If `interprogram-cut-function' is non-nil, also save the text for a window
1473system cut and paste." 1474system cut and paste."
1474 (interactive "r") 1475 (interactive "r")
1475 (if (eq last-command 'kill-region) 1476 (if (eq last-command 'kill-region)
1476 (kill-append (buffer-substring beg end) (< end beg)) 1477 (kill-append (buffer-substring beg end) (< end beg))
1477 (kill-new (buffer-substring beg end))) 1478 (kill-new (buffer-substring beg end)))
1479 (if transient-mark-mode
1480 (setq mark-active nil))
1478 nil) 1481 nil)
1479 1482
1480(defun kill-ring-save (beg end) 1483(defun kill-ring-save (beg end)
1481 "Save the region as if killed, but don't kill it. 1484 "Save the region as if killed, but don't kill it.
1482This command is similar to `copy-region-as-kill', except that it gives 1485In Transient Mark mode, deactivate the mark.
1483visual feedback indicating the extent of the region being copied.
1484If `interprogram-cut-function' is non-nil, also save the text for a window 1486If `interprogram-cut-function' is non-nil, also save the text for a window
1485system cut and paste." 1487system cut and paste.
1488
1489This command is similar to `copy-region-as-kill', except that it gives
1490visual feedback indicating the extent of the region being copied."
1486 (interactive "r") 1491 (interactive "r")
1487 (copy-region-as-kill beg end) 1492 (copy-region-as-kill beg end)
1488 (if (interactive-p) 1493 (if (interactive-p)