remove (failed) mc/handling experiment

This commit is contained in:
Jean-Philippe Bernardy 2016-08-31 14:15:50 +02:00
parent c0413bf1ea
commit d753df2dc1
4 changed files with 0 additions and 30 deletions

View file

@ -175,8 +175,6 @@
;; Bottom row
;; z
;; reserved (repeat?)
(define-key boon-command-map "z" 'boon-drop-cursor)
(define-key boon-command-map "Z" 'boon-move-cursor)
;; x
(define-key boon-command-map "x" boon-x-map)
;; c

View file

@ -228,10 +228,8 @@ This is because no command mode is activated in the minibuffer."
(setq mc--default-cmds-to-run-once
(append mc--default-cmds-to-run-once
'(boon-adjust-indent
boon-drop-cursor
boon-drop-mark
boon-enclose
boon-move-cursor
boon-qsearch-next
boon-qsearch-next-at-point
boon-qsearch-previous

View file

@ -71,30 +71,6 @@ If possible, prompt the symbol at point."
,body
(progn (exchange-point-and-mark) ,body (exchange-point-and-mark))))
(defun boon-drop-cursor ()
"Drop a new cursor at the first position given by REGS.
NOTE: Do not run for every cursor."
(interactive)
(if multiple-cursors-mode
;; attempt to deactivate mc without deleting the cursors
(let ((cursors (mapcar (lambda (o) (cons (overlay-get o 'point) (overlay-get o 'mark)))(mc/all-fake-cursors))))
;; does not work because deactivating mc destroys the overlays
(multiple-cursors-mode 0)
(dolist (p (cdr cursors))
(goto-char (car p))
(set-marker (mark-marker) (cdr p))
(mc/create-fake-cursor-at-point)))
(when (and mark-active (> (point) (mark)))
(exchange-point-and-mark))
;; so that searching for the region gives a similar position
(mc/create-fake-cursor-at-point)))
(defun boon-move-cursor (regs)
"Move the cursor at the first position given by REGS.
NOTE: Do not run for every cursor."
(interactive (list (boon-spec-region "cursor")))
(goto-char (boon-reg-point (car regs))))
(defun boon-drop-or-extend-mark ()
"Drop a mark; or extend the region to the next full line; or revert to original state."
(interactive)

View file

@ -133,8 +133,6 @@
;; Bottom row
;; z
;; reserved (repeat?)
(define-key boon-command-map "z" 'boon-drop-cursor)
(define-key boon-command-map "Z" 'boon-move-cursor)
;; x
(define-key boon-command-map "x" boon-x-map)
;; c