Skip to content

Commit

Permalink
Move mc/maybe-multiple-cursors-mode to core.
Browse files Browse the repository at this point in the history
  • Loading branch information
magnars committed Nov 18, 2012
1 parent 839c6ef commit 0a081a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 0 additions & 6 deletions mc-mark-more.el
Expand Up @@ -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?
Expand Down
6 changes: 6 additions & 0 deletions multiple-cursors-core.el
Expand Up @@ -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."
Expand Down

0 comments on commit 0a081a7

Please sign in to comment.