mirror of
https://github.com/vale981/boon
synced 2025-03-05 17:41:42 -05:00
remove (failed) mc/handling experiment
This commit is contained in:
parent
c0413bf1ea
commit
d753df2dc1
4 changed files with 0 additions and 30 deletions
|
@ -175,8 +175,6 @@
|
||||||
;; Bottom row
|
;; Bottom row
|
||||||
;; z
|
;; z
|
||||||
;; reserved (repeat?)
|
;; reserved (repeat?)
|
||||||
(define-key boon-command-map "z" 'boon-drop-cursor)
|
|
||||||
(define-key boon-command-map "Z" 'boon-move-cursor)
|
|
||||||
;; x
|
;; x
|
||||||
(define-key boon-command-map "x" boon-x-map)
|
(define-key boon-command-map "x" boon-x-map)
|
||||||
;; c
|
;; c
|
||||||
|
|
|
@ -228,10 +228,8 @@ This is because no command mode is activated in the minibuffer."
|
||||||
(setq mc--default-cmds-to-run-once
|
(setq mc--default-cmds-to-run-once
|
||||||
(append mc--default-cmds-to-run-once
|
(append mc--default-cmds-to-run-once
|
||||||
'(boon-adjust-indent
|
'(boon-adjust-indent
|
||||||
boon-drop-cursor
|
|
||||||
boon-drop-mark
|
boon-drop-mark
|
||||||
boon-enclose
|
boon-enclose
|
||||||
boon-move-cursor
|
|
||||||
boon-qsearch-next
|
boon-qsearch-next
|
||||||
boon-qsearch-next-at-point
|
boon-qsearch-next-at-point
|
||||||
boon-qsearch-previous
|
boon-qsearch-previous
|
||||||
|
|
24
boon-main.el
24
boon-main.el
|
@ -71,30 +71,6 @@ If possible, prompt the symbol at point."
|
||||||
,body
|
,body
|
||||||
(progn (exchange-point-and-mark) ,body (exchange-point-and-mark))))
|
(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 ()
|
(defun boon-drop-or-extend-mark ()
|
||||||
"Drop a mark; or extend the region to the next full line; or revert to original state."
|
"Drop a mark; or extend the region to the next full line; or revert to original state."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
|
@ -133,8 +133,6 @@
|
||||||
;; Bottom row
|
;; Bottom row
|
||||||
;; z
|
;; z
|
||||||
;; reserved (repeat?)
|
;; reserved (repeat?)
|
||||||
(define-key boon-command-map "z" 'boon-drop-cursor)
|
|
||||||
(define-key boon-command-map "Z" 'boon-move-cursor)
|
|
||||||
;; x
|
;; x
|
||||||
(define-key boon-command-map "x" boon-x-map)
|
(define-key boon-command-map "x" boon-x-map)
|
||||||
;; c
|
;; c
|
||||||
|
|
Loading…
Add table
Reference in a new issue