Function: mh-exchange-point-and-mark-preserving-active-mark
mh-exchange-point-and-mark-preserving-active-mark is an interactive
and byte-compiled function defined in mh-e.el.gz.
Signature
(mh-exchange-point-and-mark-preserving-active-mark)
Documentation
Put the mark where point is now, and point where the mark is now.
This command works even when the mark is not active, and preserves whether the mark is active or not.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/mh-e/mh-e.el.gz
(defun mh-exchange-point-and-mark-preserving-active-mark ()
"Put the mark where point is now, and point where the mark is now.
This command works even when the mark is not active, and
preserves whether the mark is active or not."
(interactive nil)
(let ((is-active mark-active))
(let ((omark (mark t)))
(if (null omark)
(error "No mark set in this buffer"))
(set-mark (point))
(goto-char omark)
(setq mark-active is-active)
nil)))