Skip keyboard macros

- since they will generate actual commands that are also run in the
   command loop - we'll handle those later instead.
This commit is contained in:
Magnar Sveen 2012-09-27 18:53:05 +02:00
parent d98b85bb1e
commit 5fcc69cc54

View File

@ -274,6 +274,8 @@ it will prompt for the proper action and then save that preference.
Some commands are so unsupported that they are even prevented for Some commands are so unsupported that they are even prevented for
the original cursor, to inform about the lack of support." the original cursor, to inform about the lack of support."
(unless mc--executing-command-for-fake-cursor
(if (eq 1 (mc/num-cursors)) ;; no fake cursors? disable mc-mode (if (eq 1 (mc/num-cursors)) ;; no fake cursors? disable mc-mode
(multiple-cursors-mode 0) (multiple-cursors-mode 0)
@ -282,6 +284,10 @@ the original cursor, to inform about the lack of support."
(command-remapping this-original-command) (command-remapping this-original-command)
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 ;; 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 ;; - so go ahead and assume it's ok, because we're just optimistic like that
(if (not (symbolp original-command)) (if (not (symbolp original-command))
@ -298,7 +304,7 @@ the original cursor, to inform about the lack of support."
(or (memq original-command mc--default-cmds-to-run-for-all) (or (memq original-command mc--default-cmds-to-run-for-all)
(memq original-command mc/cmds-to-run-for-all) (memq original-command mc/cmds-to-run-for-all)
(mc/prompt-for-inclusion-in-whitelist original-command))) (mc/prompt-for-inclusion-in-whitelist original-command)))
(mc/execute-command-for-all-fake-cursors 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.