better multi-cursor laying mechanism

This commit is contained in:
Jean-Philippe Bernardy 2015-10-21 22:31:20 +02:00
parent 861cc05b1a
commit 04ae27a60d
3 changed files with 10 additions and 4 deletions

View file

@ -162,6 +162,7 @@
;; 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

@ -20,8 +20,13 @@
(interactive (list (boon-spec-region "cursor")))
(mc/create-fake-cursor-at-point)
(goto-char (cdr (car regs)))
(set-marker (mark-marker) (car (car regs)))
(mc/maybe-multiple-cursors-mode))
(defun boon-move-cursor (regs)
(interactive (list (boon-spec-region "cursor")))
(goto-char (cdr (car regs))))
(defun boon-drop-mark ()
"Drop a mark; or extend the region to the next full line; or revert to original state."
(interactive)

View file

@ -50,8 +50,8 @@ Point is set at the beginning of the match. Moreover, highlight the regexp."
(boon-set-search-string (boon-stuff-at-point))
(boon-qsearch t)
(activate-mark)
(set-marker (mark-marker) (match-beginning 0))
(goto-char (match-end 0))
(set-marker (mark-marker) (match-end 0))
(goto-char (match-beginning 0))
)
(defun boon-qsearch-previous-at-point ()
@ -65,8 +65,8 @@ Point is set at the beginning of the match. Moreover, highlight the regexp."
(goto-char (region-beginning)))
(boon-qsearch nil))
(activate-mark)
(set-marker (mark-marker) (match-beginning 0))
(goto-char (match-end 0))
(set-marker (mark-marker) (match-end 0))
(goto-char (match-beginning 0))
)
(defun boon-set-search-string (string)