Function: cua-toggle-global-mark
cua-toggle-global-mark is an autoloaded, interactive and byte-compiled
function defined in cua-gmrk.el.gz.
Signature
(cua-toggle-global-mark STAY)
Documentation
Set or cancel the global marker.
When the global marker is set, CUA cut and copy commands will automatically insert the inserted, deleted or copied text before the global marker, even when the global marker is in another buffer.
If the global marker isn't set, set the global marker at point in the current buffer. Otherwise jump to the global marker position and cancel it. With prefix argument, don't jump to global mark when canceling it.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/emulation/cua-gmrk.el.gz
(defun cua-toggle-global-mark (stay)
"Set or cancel the global marker.
When the global marker is set, CUA cut and copy commands will
automatically insert the inserted, deleted or copied text before
the global marker, even when the global marker is in another
buffer.
If the global marker isn't set, set the global marker at point in the current
buffer. Otherwise jump to the global marker position and cancel it.
With prefix argument, don't jump to global mark when canceling it."
(interactive "P")
(unless cua--global-mark-initialized
(cua--init-global-mark))
(if (not (cua--global-mark-active))
(if (not buffer-read-only)
(cua--activate-global-mark t)
(ding)
(message "Cannot set global mark in read-only buffer"))
(when (not stay)
(pop-to-buffer (marker-buffer cua--global-mark-marker))
(goto-char cua--global-mark-marker))
(cua--deactivate-global-mark t)))