96 |
insert the deleted or copied text before the global marker, even when the |
insert the deleted or copied text before the global marker, even when the |
97 |
global marker is in another buffer. |
global marker is in another buffer. |
98 |
If the global marker isn't set, set the global marker at point in the current |
If the global marker isn't set, set the global marker at point in the current |
99 |
buffer. Otherwise jump to the global marker position and cancel it. |
buffer. Otherwise jump to the global marker position and cancel it. |
100 |
With prefix argument, don't jump to global mark when cancelling it." |
With prefix argument, don't jump to global mark when cancelling it." |
101 |
(interactive "P") |
(interactive "P") |
102 |
(unless cua--global-mark-initialized |
(unless cua--global-mark-initialized |
105 |
(if (not buffer-read-only) |
(if (not buffer-read-only) |
106 |
(cua--activate-global-mark t) |
(cua--activate-global-mark t) |
107 |
(ding) |
(ding) |
108 |
(message "Cannot set global mark in read-only buffer.")) |
(message "Cannot set global mark in read-only buffer")) |
109 |
(when (not stay) |
(when (not stay) |
110 |
(pop-to-buffer (marker-buffer cua--global-mark-marker)) |
(pop-to-buffer (marker-buffer cua--global-mark-marker)) |
111 |
(goto-char cua--global-mark-marker)) |
(goto-char cua--global-mark-marker)) |
165 |
(if (equal (marker-buffer cua--global-mark-marker) src-buf) |
(if (equal (marker-buffer cua--global-mark-marker) src-buf) |
166 |
(if (and (< start (marker-position cua--global-mark-marker)) |
(if (and (< start (marker-position cua--global-mark-marker)) |
167 |
(< (marker-position cua--global-mark-marker) end)) |
(< (marker-position cua--global-mark-marker) end)) |
168 |
(message "Can't move region into itself.") |
(message "Can't move region into itself") |
169 |
(let ((text (buffer-substring-no-properties start end)) |
(let ((text (buffer-substring-no-properties start end)) |
170 |
(p1 (copy-marker start)) |
(p1 (copy-marker start)) |
171 |
(p2 (copy-marker end))) |
(p2 (copy-marker end))) |
222 |
(setq in-rect t olist nil) |
(setq in-rect t olist nil) |
223 |
(setq olist (cdr olist)))) |
(setq olist (cdr olist)))) |
224 |
(if in-rect |
(if in-rect |
225 |
(message "Can't move rectangle into itself.") |
(message "Can't move rectangle into itself") |
226 |
(let ((text (cua--extract-rectangle))) |
(let ((text (cua--extract-rectangle))) |
227 |
(cua--delete-rectangle) |
(cua--delete-rectangle) |
228 |
(goto-char (marker-position cua--global-mark-marker)) |
(goto-char (marker-position cua--global-mark-marker)) |