mirror of
https://github.com/magnars/multiple-cursors.el.git
synced 2025-10-13 21:03:05 +00:00
Separate default cmd-lists and those populated by the end user.
This commit is contained in:
parent
608ceb4b81
commit
1d5b54e5f4
@ -178,8 +178,8 @@ cursor with updated info."
|
|||||||
(defun mc/prompt-for-inclusion-in-whitelist (original-command)
|
(defun mc/prompt-for-inclusion-in-whitelist (original-command)
|
||||||
"Asks the user, then adds the command either to the once-list or the all-list."
|
"Asks the user, then adds the command either to the once-list or the all-list."
|
||||||
(if (y-or-n-p (format "Do %S for all cursors?" original-command))
|
(if (y-or-n-p (format "Do %S for all cursors?" original-command))
|
||||||
(add-to-list 'mc--default-cmds-to-run-for-all original-command)
|
(add-to-list 'mc/cmds-to-run-for-all original-command)
|
||||||
(add-to-list 'mc--default-cmds-to-run-once original-command)
|
(add-to-list 'mc/cmds-to-run-once original-command)
|
||||||
nil))
|
nil))
|
||||||
|
|
||||||
(defun mc/num-cursors ()
|
(defun mc/num-cursors ()
|
||||||
@ -213,7 +213,9 @@ cursors."
|
|||||||
(get original-command 'mc--unsupported))
|
(get original-command 'mc--unsupported))
|
||||||
(when (and original-command
|
(when (and original-command
|
||||||
(not (memq original-command mc--default-cmds-to-run-once))
|
(not (memq original-command mc--default-cmds-to-run-once))
|
||||||
|
(not (memq original-command mc/cmds-to-run-once))
|
||||||
(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)
|
||||||
(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)))))))
|
||||||
|
|
||||||
@ -291,18 +293,18 @@ from being executed if in multiple-cursors-mode."
|
|||||||
(overlay-put cursor 'kill-ring-yank-pointer kill-ring-yank-pointer)))))))
|
(overlay-put cursor 'kill-ring-yank-pointer kill-ring-yank-pointer)))))))
|
||||||
;;----------------------------------------------------------------------------------------
|
;;----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
(defvar mc--default-cmds-to-run-once '(save-buffer
|
(defvar mc--default-cmds-to-run-once '(mc/switch-from-mark-multiple-to-cursors
|
||||||
|
mc/edit-lines
|
||||||
|
mc/edit-ends-of-lines
|
||||||
|
mc/edit-beginnings-of-lines
|
||||||
|
mc/mark-next-like-this
|
||||||
|
save-buffer
|
||||||
ido-exit-minibuffer
|
ido-exit-minibuffer
|
||||||
undo undo-tree-undo
|
undo undo-tree-undo
|
||||||
redo undo-tree-redo
|
redo undo-tree-redo
|
||||||
universal-argument
|
universal-argument
|
||||||
universal-argument-other-key
|
universal-argument-other-key
|
||||||
top-level
|
top-level)
|
||||||
mc/switch-from-mark-multiple-to-cursors
|
|
||||||
mc/edit-lines
|
|
||||||
mc/edit-ends-of-lines
|
|
||||||
mc/edit-beginnings-of-lines
|
|
||||||
mc/mark-next-like-this)
|
|
||||||
"Default set of commands to run only once in multiple-cursors-mode.")
|
"Default set of commands to run only once in multiple-cursors-mode.")
|
||||||
|
|
||||||
(defvar mc/cmds-to-run-once nil
|
(defvar mc/cmds-to-run-once nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user