From f72cea2d5294cfd955a11a8e0972834001259fa6 Mon Sep 17 00:00:00 2001 From: Oleh Krehel Date: Fri, 15 Apr 2016 18:59:23 +0200 Subject: [PATCH] swiper.el (swiper-mc): Restore interactive The command is bound in `swiper-map'. Add a warning for when it's called via "M-x", since it's not supposed to be called that way. --- swiper.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/swiper.el b/swiper.el index 90e25b5f3..349c3d4c1 100644 --- a/swiper.el +++ b/swiper.el @@ -174,8 +174,12 @@ (declare-function multiple-cursors-mode "ext:multiple-cursors-core") (defun swiper-mc () + "Create a fake cursor for each `swiper' candidate." + (interactive) (unless (require 'multiple-cursors nil t) (error "multiple-cursors isn't installed")) + (unless (window-minibuffer-p) + (error "Call me only from `swiper'")) (let ((cands (nreverse ivy--old-cands))) (unless (string= ivy-text "") (ivy-exit-with-action -- 2.39.2