File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 81
81
; ; Integrate with `symbol-overlay'
82
82
(with-eval-after-load 'symbol-overlay
83
83
; ; https://lmno.lol/alvaro/its-all-up-for-grabs-and-it-compounds
84
- (defun +mc/mark-all-symbol-overlays ()
85
- " Mark all symbol overlays using multiple cursors."
86
- (interactive )
87
- (mc/remove-fake-cursors)
84
+ (defun +mc/mark-all-symbol-overlays (&optional discard)
85
+ " Mark all symbol overlays using multiple cursors.
86
+ When DISCARD is non-nil, discard the current cursors before creating the
87
+ new ones."
88
+ (interactive " P" )
89
+ (when discard (mc/remove-fake-cursors))
88
90
(when-let* ((overlays (symbol-overlay-get-list 0 ))
89
91
(point (point ))
90
92
(point-overlay (seq-find
104
106
105
107
(with-eval-after-load 'transient
106
108
; ; Add to the transient menu after the "s"
107
- (transient-append-suffix '+mc/transient " s" '(" S" " symbol overlays" +mc/mark-all-symbol-overlays)))))
109
+ (transient-append-suffix '+mc/transient " s" '(" S" " symbol overlays" +mc/mark-all-symbol-overlays)))
110
+
111
+ (with-eval-after-load 'casual-symbol-overlay
112
+ (transient-append-suffix 'casual-symbol-overlay-tmenu '(-2 )
113
+ [" Multiple cursors" (" c" " Mark all" +mc/mark-all-symbol-overlays)]))))
108
114
109
115
110
116
(provide 'me-multi-cursors )
You can’t perform that action at this time.
0 commit comments