[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/multiple-cursors 5fcc69c 139/434: Skip keyboard macros
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/multiple-cursors 5fcc69c 139/434: Skip keyboard macros |
Date: |
Sat, 7 Aug 2021 09:20:12 -0400 (EDT) |
branch: elpa/multiple-cursors
commit 5fcc69cc549224eec41425a3db0ff3a0a2a2626b
Author: Magnar Sveen <magnars@gmail.com>
Commit: Magnar Sveen <magnars@gmail.com>
Skip keyboard macros
- since they will generate actual commands that are also run in the
command loop - we'll handle those later instead.
---
multiple-cursors-core.el | 54 +++++++++++++++++++++++++++---------------------
1 file changed, 30 insertions(+), 24 deletions(-)
diff --git a/multiple-cursors-core.el b/multiple-cursors-core.el
index 12f3f48..c24a9f5 100644
--- a/multiple-cursors-core.el
+++ b/multiple-cursors-core.el
@@ -274,31 +274,37 @@ it will prompt for the proper action and then save that
preference.
Some commands are so unsupported that they are even prevented for
the original cursor, to inform about the lack of support."
- (if (eq 1 (mc/num-cursors)) ;; no fake cursors? disable mc-mode
- (multiple-cursors-mode 0)
+ (unless mc--executing-command-for-fake-cursor
- (when this-original-command
- (let ((original-command (or mc--this-command
- (command-remapping this-original-command)
- this-original-command)))
-
- ;; if it's a lambda, we can't know if it's supported or not
- ;; - so go ahead and assume it's ok, because we're just optimistic
like that
- (if (not (symbolp original-command))
- (mc/execute-command-for-all-fake-cursors original-command)
-
- ;; otherwise it's a symbol, and we can be more thorough
- (if (get original-command 'mc--unsupported)
- (message "%S is not supported with multiple cursors%s"
- original-command
- (get original-command 'mc--unsupported))
- (when (and original-command
- (not (memq original-command
mc--default-cmds-to-run-once))
- (not (memq original-command mc/cmds-to-run-once))
- (or (memq original-command
mc--default-cmds-to-run-for-all)
- (memq original-command mc/cmds-to-run-for-all)
- (mc/prompt-for-inclusion-in-whitelist
original-command)))
- (mc/execute-command-for-all-fake-cursors original-command))))))))
+ (if (eq 1 (mc/num-cursors)) ;; no fake cursors? disable mc-mode
+ (multiple-cursors-mode 0)
+
+ (when this-original-command
+ (let ((original-command (or mc--this-command
+ (command-remapping this-original-command)
+ this-original-command)))
+
+ ;; skip keyboard macros, since they will generate actual commands
that are
+ ;; also run in the command loop - we'll handle those later instead.
+ (when (functionp original-command)
+
+ ;; if it's a lambda, we can't know if it's supported or not
+ ;; - so go ahead and assume it's ok, because we're just optimistic
like that
+ (if (not (symbolp original-command))
+ (mc/execute-command-for-all-fake-cursors original-command)
+
+ ;; otherwise it's a symbol, and we can be more thorough
+ (if (get original-command 'mc--unsupported)
+ (message "%S is not supported with multiple cursors%s"
+ original-command
+ (get original-command 'mc--unsupported))
+ (when (and original-command
+ (not (memq original-command
mc--default-cmds-to-run-once))
+ (not (memq original-command mc/cmds-to-run-once))
+ (or (memq original-command
mc--default-cmds-to-run-for-all)
+ (memq original-command mc/cmds-to-run-for-all)
+ (mc/prompt-for-inclusion-in-whitelist
original-command)))
+ (mc/execute-command-for-all-fake-cursors
original-command))))))))))
(defun mc/remove-fake-cursors ()
"Remove all fake cursors.
- [nongnu] elpa/multiple-cursors 5ff2071 420/434: Merge pull request #351 from jrosdahl/dabbrev-expand, (continued)
- [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, 2021/08/07
- [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 <=
- [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
- [nongnu] elpa/multiple-cursors 1cdd730 221/434: Automatically select word/symbol, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 72ba43a 225/434: add .nosearch to directory with bundled libraries, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 6a5969e 202/434: Adding support for using mc/edit-lines without transient mark mode., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 980a880 223/434: Merge pull request #63 from tkf/select-thing-at-point, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors dce6c00 174/434: Add mc/cursor-specific-vars to handle vars that need to be tracked per cursor., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 0a081a7 184/434: Move mc/maybe-multiple-cursors-mode to core., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 9a376a6 201/434: Add note about yank-rectangle, ELPA Syncer, 2021/08/07