[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/multiple-cursors 39e4eb2 091/434: Added mc-version of mark
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/multiple-cursors 39e4eb2 091/434: Added mc-version of mark-more-like-this-extended |
Date: |
Sat, 7 Aug 2021 09:20:02 -0400 (EDT) |
branch: elpa/multiple-cursors
commit 39e4eb2389b9c9aed1949b086ff9fb07fa6b78b3
Author: Magnar Sveen <magnars@gmail.com>
Commit: Magnar Sveen <magnars@gmail.com>
Added mc-version of mark-more-like-this-extended
---
mc-mark-more.el | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/mc-mark-more.el b/mc-mark-more.el
index fdffc78..0814567 100644
--- a/mc-mark-more.el
+++ b/mc-mark-more.el
@@ -148,6 +148,51 @@ With zero ARG, skip the last one and mark next."
(multiple-cursors-mode 1)
(multiple-cursors-mode 0)))
+;;;###autoload
+(defun mc/mark-more-like-this-extended ()
+ "Like mark-more-like-this, but then lets you adjust with arrows key.
+The actual adjustment made depends on the final component of the
+key-binding used to invoke the command, with all modifiers removed:
+
+ <up> Mark previous like this
+ <down> Mark next like this
+ <left> If last was previous, skip it
+ If last was next, remove it
+ <right> If last was next, skip it
+ If last was previous, remove it
+Then, continue to read input events and further add or move marks
+as long as the input event read (with all modifiers removed)
+is one of the above."
+ (interactive)
+ (let ((first t)
+ (ev last-command-event)
+ (cmd 'mc/mark-next-like-this)
+ (arg 1)
+ last echo-keystrokes)
+ (while cmd
+ (let ((base (event-basic-type ev)))
+ (cond ((eq base 'left)
+ (if (eq last 'mc/mark-previous-like-this)
+ (setq cmd last arg 0)
+ (setq cmd 'mc/mark-next-like-this arg -1)))
+ ((eq base 'up)
+ (setq cmd 'mc/mark-previous-like-this arg 1))
+ ((eq base 'right)
+ (if (eq last 'mc/mark-next-like-this)
+ (setq cmd last arg 0)
+ (setq cmd 'mc/mark-previous-like-this arg -1)))
+ ((eq base 'down)
+ (setq cmd 'mc/mark-next-like-this arg 1))
+ (first
+ (setq cmd 'mc/mark-next-like-this arg 1))
+ (t
+ (setq cmd nil))))
+ (when cmd
+ (ignore-errors
+ (funcall cmd arg))
+ (setq first nil last cmd)
+ (setq ev (read-event "Use arrow keys for more marks: "))))
+ (push ev unread-command-events)))
(provide 'mc-mark-more)
- [nongnu] elpa/multiple-cursors dfaf621 392/434: Fix #254; remove mc/mark-next-like-this-extended, (continued)
- [nongnu] elpa/multiple-cursors dfaf621 392/434: Fix #254; remove mc/mark-next-like-this-extended, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 67d6579 388/434: Updated tests, README., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 277aef4 393/434: Make mc/list-file into defcustom, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 6327681 394/434: Merge pull request #267 from Fuco1/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors f6bac94 402/434: Add note about M-x, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 3f382d2 416/434: Move variables before first use, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 9980faa 419/434: Add dabbrev state variables to mc/cursor-specific-vars, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 5ff2071 420/434: Merge pull request #351 from jrosdahl/dabbrev-expand, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 56d0373 075/434: Fix rectangular-region-mode when adding cursors over hidden areas of the buffer., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors c3c4544 083/434: Place the file definition with the save definition., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 39e4eb2 091/434: Added mc-version of mark-more-like-this-extended,
ELPA Syncer <=
- [nongnu] elpa/multiple-cursors b72e016 098/434: Don't require mark-multiple., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 294d574 093/434: Update README, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors b607794 110/434: Add config for travis-ci, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 32213d4 115/434: Make sure we run the right version of Emacs in travis., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 6e61e3d 114/434: Fix travis badge, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 719fe40 119/434: Integrate with rect.el instead of consolidating/splitting on kill-ring, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 5fcc69c 139/434: Skip keyboard macros, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 3f20fc1 154/434: When no region is active mc/mark-next-like-this and mc/mark-previous-like-this should create a cursor one like up (or down)., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 038c9a7 161/434: Added stop as a possible value for mc/cycle-looping-behaviour., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors e4adefc 158/434: Fix issues with mc/cycle-(backward|forward) where the cycling was dependent on not having an active mark., ELPA Syncer, 2021/08/07