Mercurial > emacs
comparison lisp/simple.el @ 2111:d38d32084c15
* simple.el (kill-ring-save): Doc fix.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Thu, 11 Mar 1993 07:07:17 +0000 |
parents | ec62da254d4d |
children | a7d915ce7676 |
comparison
equal
deleted
inserted
replaced
2110:2c87b7e144c0 | 2111:d38d32084c15 |
---|---|
1016 (kill-new (buffer-substring beg end))) | 1016 (kill-new (buffer-substring beg end))) |
1017 (setq this-command 'kill-region) | 1017 (setq this-command 'kill-region) |
1018 nil) | 1018 nil) |
1019 | 1019 |
1020 (defun kill-ring-save (beg end) | 1020 (defun kill-ring-save (beg end) |
1021 "Save the region as if killed, but don't kill it." | 1021 "Save the region as if killed, but don't kill it. |
1022 This command is similar to copy-region-as-kill, except that it gives | |
1023 visual feedback indicating the extent of the region being copied. | |
1024 If `interprogram-cut-function' is non-nil, also save the text for a window | |
1025 system cut and paste." | |
1022 (interactive "r") | 1026 (interactive "r") |
1023 (copy-region-as-kill beg end) | 1027 (copy-region-as-kill beg end) |
1024 (if (interactive-p) | 1028 (if (interactive-p) |
1025 (save-excursion | 1029 (save-excursion |
1026 (let ((other-end (if (= (point) beg) end beg))) | 1030 (let ((other-end (if (= (point) beg) end beg))) |
1065 (setq this-command 'yank) | 1069 (setq this-command 'yank) |
1066 (let ((before (< (point) (mark)))) | 1070 (let ((before (< (point) (mark)))) |
1067 (delete-region (point) (mark)) | 1071 (delete-region (point) (mark)) |
1068 (set-mark (point)) | 1072 (set-mark (point)) |
1069 (insert (current-kill arg)) | 1073 (insert (current-kill arg)) |
1070 (if before (exchange-point-and-mark)))) | 1074 (if before (exchange-point-and-mark))) |
1075 nil) | |
1071 | 1076 |
1072 (defun yank (&optional arg) | 1077 (defun yank (&optional arg) |
1073 "Reinsert the last stretch of killed text. | 1078 "Reinsert the last stretch of killed text. |
1074 More precisely, reinsert the stretch of killed text most recently | 1079 More precisely, reinsert the stretch of killed text most recently |
1075 killed OR yanked. Put point at end, and set mark at beginning. | 1080 killed OR yanked. Put point at end, and set mark at beginning. |
1082 (insert (current-kill (cond | 1087 (insert (current-kill (cond |
1083 ((listp arg) 0) | 1088 ((listp arg) 0) |
1084 ((eq arg '-) -1) | 1089 ((eq arg '-) -1) |
1085 (t (1- arg))))) | 1090 (t (1- arg))))) |
1086 (if (consp arg) | 1091 (if (consp arg) |
1087 (exchange-point-and-mark))) | 1092 (exchange-point-and-mark)) |
1093 nil) | |
1088 | 1094 |
1089 (defun rotate-yank-pointer (arg) | 1095 (defun rotate-yank-pointer (arg) |
1090 "Rotate the yanking point in the kill ring. | 1096 "Rotate the yanking point in the kill ring. |
1091 With argument, rotate that many kills forward (or backward, if negative)." | 1097 With argument, rotate that many kills forward (or backward, if negative)." |
1092 (interactive "p") | 1098 (interactive "p") |