[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/multiple-cursors 9182897 046/434: Add message about delete
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/multiple-cursors 9182897 046/434: Add message about delete-char vs delete-forward-char |
Date: |
Sat, 7 Aug 2021 09:19:52 -0400 (EDT) |
branch: elpa/multiple-cursors
commit 918289791892ceedd250fe0cec792ab2435226dc
Author: Magnar Sveen <magnars@gmail.com>
Commit: Magnar Sveen <magnars@gmail.com>
Add message about delete-char vs delete-forward-char
---
multiple-cursors-core.el | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/multiple-cursors-core.el b/multiple-cursors-core.el
index 6ddbd01..b4d14c2 100644
--- a/multiple-cursors-core.el
+++ b/multiple-cursors-core.el
@@ -126,7 +126,9 @@ Commands that are neither supported nor explicitly
unsupported
is executed normally for point, but skipped for the fake
cursors."
(if (memq this-original-command mc--unsupported-cmds)
- (message "%S is not supported with multiple cursors"
this-original-command)
+ (message "%S is not supported with multiple cursors. %s"
+ this-original-command
+ (get this-original-command 'mc--unsupported-msg))
(if (not (memq this-original-command mc--cmds))
(when (not (memq this-original-command mc--cmds-run-once))
(message "Skipping %S" this-original-command))
@@ -168,19 +170,21 @@ multiple cursors editing.")
"List of commands that does not work well with multiple cursors.
Set up with the unsupported-cmd macro.")
-(defmacro unsupported-cmd (cmd)
+(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)
(defadvice ,cmd (around unsupported-advice activate)
"command isn't supported with multiple cursors"
- (unless multiple-cursors-mode
+ (unless (and multiple-cursors-mode (called-interactively-p 'any))
ad-do-it))))
;; Commands that does not work with multiple-cursors
-(unsupported-cmd isearch-forward)
-(unsupported-cmd isearch-backward)
+(unsupported-cmd isearch-forward ". Feel free to add a multiple-cursors
friendly version.")
+(unsupported-cmd isearch-backward ". Feel free to add a multiple-cursors
friendly version.")
+(unsupported-cmd delete-char ", delete-forward-char is preferred for
interactive use.")
;; Commands to run only once (not yet in use)
(setq mc--cmds-run-once '(mark-next-like-this
@@ -219,7 +223,7 @@ from being executed if in multiple-cursors-mode."
kill-whole-line
backward-kill-word
backward-delete-char-untabify
- delete-char c-electric-delete-forward
+ delete-forward-char c-electric-delete-forward
delete-backward-char c-electric-backspace
c-electric-paren
c-electric-semi&comma
- [nongnu] elpa/multiple-cursors 26d0e52 015/434: Add more commands to white-list., (continued)
- [nongnu] elpa/multiple-cursors 26d0e52 015/434: Add more commands to white-list., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 5e64246 025/434: Move todo to own file., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors e0ffd9c 026/434: Disable marker when done with it, for performance reasons., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 9938aca 028/434: Save er/history for each cursor, to be able to contract., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors dfe8a2d 029/434: Slight optimisation, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 6c0e16e 033/434: More things to do., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 07a4411 036/434: More things to do., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 75581da 037/434: Fix bug with expand-region dependency., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 8d49171 039/434: Update todo, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 80fdb6f 007/434: Hook multiple-cursors into mark-multiple, first step:, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 9182897 046/434: Add message about delete-char vs delete-forward-char,
ELPA Syncer <=
- [nongnu] elpa/multiple-cursors c34e4df 064/434: Don't grow cursor overlays., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 382616a 020/434: Don't get annoyed so easily at multiple cursors., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors b99d54a 047/434: Fix error message., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 4c56cb8 065/434: Tests for white-list prompt., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 4078570 066/434: Switch to multiple-cursors-mode from rectangular-region with <return>, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors b2906bb 097/434: Don't forget to autoload, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 16563e3 104/434: Add hooks when mc-mode is enabled and disabled., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 6926ca3 105/434: Avoid strange smooth-scrolling behavior., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 059ee6b 109/434: Merge pull request #7 from Mon-Ouie/fix/macro-expansion, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 35921b5 130/434: Clarify that you need to set up own keybindings, ELPA Syncer, 2021/08/07