emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/objed 89e1e18 016/166: Also activate mc if only one fak


From: Clemens Radermacher
Subject: [elpa] externals/objed 89e1e18 016/166: Also activate mc if only one fake cursor
Date: Sun, 29 Dec 2019 08:20:53 -0500 (EST)

branch: externals/objed
commit 89e1e1840a9838557bcc266ba9f20e998062ac1c
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>

    Also activate mc if only one fake cursor
---
 objed.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/objed.el b/objed.el
index 30d16ab..c6cf713 100644
--- a/objed.el
+++ b/objed.el
@@ -393,6 +393,7 @@ To avoid loading `avy' set this var before activating 
`objed-mode.'"
 (declare-function hl-line-unhighlight "ext:hl-line")
 (declare-function hl-line-highlight "ext:hl-line")
 (declare-function mc/create-fake-cursor-at-point "ext:multiple-cursors")
+(declare-function mc/num-cursors "ext:multiple-cursors")
 
 
 
@@ -3454,8 +3455,10 @@ and RANGE hold the object position data."
     (cond ((eq 'keep exit)
            (ignore))
           ((eq 'mc exit)
-           (when (fboundp 'mc/maybe-multiple-cursors-mode)
-             (mc/maybe-multiple-cursors-mode))
+           (when (fboundp 'multiple-cursors-mode)
+             (if (> (mc/num-cursors) 0)
+                 (multiple-cursors-mode 1)
+               (multiple-cursors-mode 0)))
            (objed--exit-objed))
           ((eq 'current exit)
            ;; use the markers for updated object



reply via email to

[Prev in Thread] Current Thread [Next in Thread]