mirror of
https://github.com/magnars/multiple-cursors.el.git
synced 2025-10-15 13:53:05 +00:00
Add a scenario for mc/mark-all-symbols-like-this
This commit is contained in:
parent
a6e0ccb22f
commit
373dcbe002
18
features/mark-things.feature
Normal file
18
features/mark-things.feature
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
Feature: Mark things
|
||||||
|
|
||||||
|
Scenario: Mark symbols in defun with select
|
||||||
|
Given I turn on emacs-lisp-mode
|
||||||
|
And I turn on delete-selection-mode
|
||||||
|
And I insert:
|
||||||
|
"""
|
||||||
|
(defun abc (ghi) (message ghi))
|
||||||
|
(defun def (ghi) (message some-other-ghi))
|
||||||
|
"""
|
||||||
|
When I select "ghi"
|
||||||
|
And I mark all symbols like this in defun
|
||||||
|
And I type "hmm"
|
||||||
|
Then I should see:
|
||||||
|
"""
|
||||||
|
(defun abc (hmm) (message hmm))
|
||||||
|
(defun def (ghi) (message some-other-ghi))
|
||||||
|
"""
|
@ -95,3 +95,11 @@
|
|||||||
(assert search nil "The text '%s' was not found in the current buffer." text))
|
(assert search nil "The text '%s' was not found in the current buffer." text))
|
||||||
(set-mark (point))
|
(set-mark (point))
|
||||||
(re-search-forward text)))
|
(re-search-forward text)))
|
||||||
|
|
||||||
|
(When "^I mark all \\(.+\\)$"
|
||||||
|
(lambda (rest)
|
||||||
|
(let ((func (intern (mapconcat 'identity
|
||||||
|
(cons "mc/mark-all"
|
||||||
|
(split-string rest))
|
||||||
|
"-"))))
|
||||||
|
(call-interactively func))))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user