mirror of
https://github.com/magnars/multiple-cursors.el.git
synced 2025-10-13 21:03:05 +00:00
Add support for modes that remap commands.
- for instance subword-mode
This commit is contained in:
parent
b99d54a3d9
commit
1db643c4d6
@ -125,14 +125,16 @@ inform about the lack of support.
|
|||||||
Commands that are neither supported nor explicitly unsupported
|
Commands that are neither supported nor explicitly unsupported
|
||||||
is executed normally for point, but skipped for the fake
|
is executed normally for point, but skipped for the fake
|
||||||
cursors."
|
cursors."
|
||||||
(if (memq this-original-command mc--unsupported-cmds)
|
(let ((original-command (or (command-remapping this-original-command)
|
||||||
(message "%S is not supported with multiple cursors%s"
|
this-original-command)))
|
||||||
this-original-command
|
(if (memq original-command mc--unsupported-cmds)
|
||||||
(get this-original-command 'mc--unsupported-msg))
|
(message "%S is not supported with multiple cursors%s"
|
||||||
(if (not (memq this-original-command mc--cmds))
|
original-command
|
||||||
(when (not (memq this-original-command mc--cmds-run-once))
|
(get original-command 'mc--unsupported-msg))
|
||||||
(message "Skipping %S" this-original-command))
|
(if (not (memq original-command mc--cmds))
|
||||||
(mc/execute-command-for-all-fake-cursors this-original-command))))
|
(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 ()
|
(defun mc/remove-fake-cursors ()
|
||||||
"Remove all fake cursors.
|
"Remove all fake cursors.
|
||||||
@ -210,9 +212,9 @@ from being executed if in multiple-cursors-mode."
|
|||||||
right-word forward-word
|
right-word forward-word
|
||||||
left-char backward-char
|
left-char backward-char
|
||||||
left-word backward-word
|
left-word backward-word
|
||||||
subword-upcase upcase-word
|
upcase-word
|
||||||
subword-downcase downcase-word
|
downcase-word
|
||||||
subword-capitalize capitalize-word
|
capitalize-word
|
||||||
forward-list
|
forward-list
|
||||||
backward-list
|
backward-list
|
||||||
hippie-expand hippie-expand-lines
|
hippie-expand hippie-expand-lines
|
||||||
@ -221,6 +223,15 @@ from being executed if in multiple-cursors-mode."
|
|||||||
kill-region-or-backward-word
|
kill-region-or-backward-word
|
||||||
kill-line
|
kill-line
|
||||||
kill-whole-line
|
kill-whole-line
|
||||||
|
subword-forward
|
||||||
|
subword-backward
|
||||||
|
subword-mark
|
||||||
|
subword-kill
|
||||||
|
subword-backward-kill
|
||||||
|
subword-transpose
|
||||||
|
subword-capitalize
|
||||||
|
subword-upcase
|
||||||
|
subword-downcase
|
||||||
backward-kill-word
|
backward-kill-word
|
||||||
backward-delete-char-untabify
|
backward-delete-char-untabify
|
||||||
delete-forward-char c-electric-delete-forward
|
delete-forward-char c-electric-delete-forward
|
||||||
|
Loading…
x
Reference in New Issue
Block a user