diff options
author | mattkae <mattkae@protonmail.com> | 2022-05-11 09:23:58 -0400 |
---|---|---|
committer | mattkae <mattkae@protonmail.com> | 2022-05-11 09:23:58 -0400 |
commit | 3f4a0d5370ae6c34afe180df96add3b8522f4af1 (patch) | |
tree | ae901409e02bde8ee278475f8cf6818f8f680a60 /elpa/multiple-cursors-20220328.1724/mc-mark-pop.el |
initial commit
Diffstat (limited to 'elpa/multiple-cursors-20220328.1724/mc-mark-pop.el')
-rw-r--r-- | elpa/multiple-cursors-20220328.1724/mc-mark-pop.el | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/elpa/multiple-cursors-20220328.1724/mc-mark-pop.el b/elpa/multiple-cursors-20220328.1724/mc-mark-pop.el new file mode 100644 index 0000000..8a18381 --- /dev/null +++ b/elpa/multiple-cursors-20220328.1724/mc-mark-pop.el @@ -0,0 +1,22 @@ +;;; mc-mark-pop.el --- Pop cursors off of the mark stack + +(require 'multiple-cursors-core) + +;;;###autoload +(defun mc/mark-pop () + "Add a cursor at the current point, pop off mark ring and jump +to the popped mark." + (interactive) + ;; If the mark happens to be at the current point, just pop that one off. + (while (eql (mark) (point)) + (pop-mark)) + (mc/create-fake-cursor-at-point) + (exchange-point-and-mark) + (pop-mark) + (mc/maybe-multiple-cursors-mode)) + +;; A good key binding for this feature is perhaps "C-S-p" ('p' for pop). + +(provide 'mc-mark-pop) + +;;; mc-mark-pop.el ends here |