From 0a081a7c5ff2a5a2357069bfb6a3717134c3d425 Mon Sep 17 00:00:00 2001 From: Magnar Sveen Date: Sun, 18 Nov 2012 21:10:09 +0100 Subject: [PATCH] Move mc/maybe-multiple-cursors-mode to core. --- mc-mark-more.el | 6 ------ multiple-cursors-core.el | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mc-mark-more.el b/mc-mark-more.el index 95b843e..44b7d80 100644 --- a/mc-mark-more.el +++ b/mc-mark-more.el @@ -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? diff --git a/multiple-cursors-core.el b/multiple-cursors-core.el index ea20b6b..98114e4 100644 --- a/multiple-cursors-core.el +++ b/multiple-cursors-core.el @@ -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."