[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/multiple-cursors de0519e 057/434: Add support for running
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/multiple-cursors de0519e 057/434: Add support for running lambdas for each cursor. |
Date: |
Sat, 7 Aug 2021 09:19:54 -0400 (EDT) |
branch: elpa/multiple-cursors
commit de0519e0f011d7e55bc4261fb2790ad42f32bbdd
Author: Magnar Sveen <magnars@gmail.com>
Commit: Magnar Sveen <magnars@gmail.com>
Add support for running lambdas for each cursor.
- can't know if it's safe, so we assume it is.
---
multiple-cursors-core.el | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/multiple-cursors-core.el b/multiple-cursors-core.el
index 1e675e9..910dfdc 100644
--- a/multiple-cursors-core.el
+++ b/multiple-cursors-core.el
@@ -132,14 +132,21 @@ is executed normally for point, but skipped for the fake
cursors."
(let ((original-command (or (command-remapping this-original-command)
this-original-command)))
- (if (get original-command 'mc--unsupported)
- (message "%S is not supported with multiple cursors%s"
- original-command
- (get original-command 'mc--unsupported))
- (if (not (memq original-command mc--cmds))
- (when (not (memq original-command mc--cmds-run-once))
- (message "Skipping %S" original-command))
- (mc/execute-command-for-all-fake-cursors 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))
+ (if (not (memq original-command mc--cmds))
+ (when (not (memq original-command mc--cmds-run-once))
+ (message "Skipping %S" original-command))
+ (mc/execute-command-for-all-fake-cursors original-command))))))
(defun mc/remove-fake-cursors ()
"Remove all fake cursors.
- [nongnu] elpa/multiple-cursors 822bf18 056/434: Update test., (continued)
- [nongnu] elpa/multiple-cursors 822bf18 056/434: Update test., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 700db99 062/434: Add kill-ring-save to whitelist., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors ed678df 061/434: Couple more core-tests., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors a19c8c3 077/434: Add cycle-backwards to once-list, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 51b282e 078/434: Switch to multiple-cursors-mode from rectangular-region-mode when doing expand-region, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors c331366 099/434: Add multiple-cursors-pkg, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 4c91260 004/434: Updated readme., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 399db27 012/434: More white-listed commands:, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors fca0685 055/434: Use symbol properties on commands instead of maintaining a list of unsupported commands., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 50851e7 060/434: Add more core tests., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors de0519e 057/434: Add support for running lambdas for each cursor.,
ELPA Syncer <=
- [nongnu] elpa/multiple-cursors 8ec468f 080/434: Don't save .mc-list.el when running tests., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 4003aa1 102/434: Replace outdated function name with new one, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 605894d 121/434: Add link to video., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 26544fa 126/434: Bump version to 1.1.0, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 466d8bd 127/434: Don't use next-line non-interactively, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 80bc6f6 135/434: Temporarily disable auto-complete-mode in multiple-cursors-mode, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 80ebdbb 156/434: Added test for mc/mark-(next|previous)-like-this when there is no active region., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 324d935 157/434: Split macro mc/for-each-fake-cursor into a function returning all the cursor overlays and a macro to loop over this list., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors a8b6323 159/434: Remove superfluous lambda., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 2818d9e 163/434: Rename mc/(first|last)-cursor-(before|after)-point to mention that they operate on fake cursors, ELPA Syncer, 2021/08/07