mirror of
https://github.com/magnars/multiple-cursors.el.git
synced 2025-10-13 21:03:05 +00:00
Move mc/maybe-multiple-cursors-mode to core.
This commit is contained in:
parent
839c6ef077
commit
0a081a7c5f
@ -80,12 +80,6 @@
|
||||
(mc/cursor-end cursor))))
|
||||
strings))
|
||||
|
||||
(defun mc/maybe-multiple-cursors-mode ()
|
||||
"Enable multiple-cursors-mode if there is more than one currently active cursor."
|
||||
(if (> (mc/num-cursors) 1)
|
||||
(multiple-cursors-mode 1)
|
||||
(multiple-cursors-mode 0)))
|
||||
|
||||
(defvar mc/enclose-search-term nil
|
||||
"How should mc/mark-more-* search for more matches?
|
||||
|
||||
|
@ -458,6 +458,12 @@ They are temporarily disabled when multiple-cursors are active.")
|
||||
|
||||
(add-hook 'after-revert-hook #'(lambda () (multiple-cursors-mode 0)))
|
||||
|
||||
(defun mc/maybe-multiple-cursors-mode ()
|
||||
"Enable multiple-cursors-mode if there is more than one currently active cursor."
|
||||
(if (> (mc/num-cursors) 1)
|
||||
(multiple-cursors-mode 1)
|
||||
(multiple-cursors-mode 0)))
|
||||
|
||||
(defmacro unsupported-cmd (cmd msg)
|
||||
"Adds command to list of unsupported commands and prevents it
|
||||
from being executed if in multiple-cursors-mode."
|
||||
|
Loading…
x
Reference in New Issue
Block a user