update mc
[emacs.git] / .emacs.d / elisp / multiple-cursors / mc-mark-pop.el
1 ;;; mc-mark-pop.el --- Pop cursors off of the mark stack
2
3 (require 'multiple-cursors-core)
4
5 ;;;###autoload
6 (defun mc/mark-pop ()
7 "Add a cursor at the current point, pop off mark ring and jump
8 to the popped mark."
9 (interactive)
10 ;; If the mark happens to be at the current point, just pop that one off.
11 (while (eql (mark) (point))
12 (pop-mark))
13 (mc/create-fake-cursor-at-point)
14 (exchange-point-and-mark)
15 (pop-mark)
16 (mc/maybe-multiple-cursors-mode))
17
18 ;; A good key binding for this feature is perhaps "C-S-p" ('p' for pop).
19
20 (provide 'mc-mark-pop)
21
22 ;;; mc-mark-pop.el ends here