[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/multiple-cursors fca0685 055/434: Use symbol properties on
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/multiple-cursors fca0685 055/434: Use symbol properties on commands instead of maintaining a list of unsupported commands. |
Date: |
Sat, 7 Aug 2021 09:19:54 -0400 (EDT) |
branch: elpa/multiple-cursors
commit fca06858e946bbe8a6299c24cc014edaa2334382
Author: Magnar Sveen <magnars@gmail.com>
Commit: Magnar Sveen <magnars@gmail.com>
Use symbol properties on commands instead of maintaining a list of
unsupported commands.
---
multiple-cursors-core.el | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/multiple-cursors-core.el b/multiple-cursors-core.el
index b293947..1e675e9 100644
--- a/multiple-cursors-core.el
+++ b/multiple-cursors-core.el
@@ -132,10 +132,10 @@ is executed normally for point, but skipped for the fake
cursors."
(let ((original-command (or (command-remapping this-original-command)
this-original-command)))
- (if (memq original-command mc--unsupported-cmds)
+ (if (get original-command 'mc--unsupported)
(message "%S is not supported with multiple cursors%s"
original-command
- (get original-command 'mc--unsupported-msg))
+ (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))
@@ -173,16 +173,11 @@ multiple cursors editing.")
(remove-hook 'post-command-hook 'mc/execute-this-command-for-all-cursors t)
(mc/remove-fake-cursors)))
-(defvar mc--unsupported-cmds '()
- "List of commands that does not work well with multiple cursors.
-Set up with the unsupported-cmd macro.")
-
(defmacro unsupported-cmd (cmd msg)
"Adds command to list of unsupported commands and prevents it
from being executed if in multiple-cursors-mode."
`(progn
- (push (quote ,cmd) mc--unsupported-cmds)
- (put (quote ,cmd) 'mc--unsupported-msg ,msg)
+ (put (quote ,cmd) 'mc--unsupported ,msg)
(defadvice ,cmd (around unsupported-advice activate)
"command isn't supported with multiple cursors"
(unless (and multiple-cursors-mode (called-interactively-p 'any))
- [nongnu] elpa/multiple-cursors 759391e 045/434: Don't message about skipping known run-once commands, (continued)
- [nongnu] elpa/multiple-cursors 759391e 045/434: Don't message about skipping known run-once commands, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 71f444a 050/434: Remove unused commands from whitelist., ELPA Syncer, 2021/08/07
- [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 <=
- [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, 2021/08/07
- [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