mirror of
https://github.com/magnars/multiple-cursors.el.git
synced 2026-05-10 09:28:18 +00:00
Compare commits
2 Commits
master
...
cl-tidy-up
| Author | SHA1 | Date | |
|---|---|---|---|
| 48e1d3da5c | |||
| 1f3ccfbcd2 |
@@ -1,4 +1,4 @@
|
|||||||
(require 'cl) ;; For lexical-let
|
;; -*- lexical-binding: t -*-
|
||||||
|
|
||||||
(When "^I mark next like this$"
|
(When "^I mark next like this$"
|
||||||
(lambda () (call-interactively 'mc/mark-next-like-this)))
|
(lambda () (call-interactively 'mc/mark-next-like-this)))
|
||||||
@@ -109,26 +109,22 @@
|
|||||||
|
|
||||||
(When "^I copy \"\\(.+\\)\" in another program$"
|
(When "^I copy \"\\(.+\\)\" in another program$"
|
||||||
(lambda (text)
|
(lambda (text)
|
||||||
(lexical-let ((text text))
|
|
||||||
(setq interprogram-paste-function
|
(setq interprogram-paste-function
|
||||||
#'(lambda () (let ((r text)) (setq text nil) r))))))
|
#'(lambda () (let ((r text)) (setq text nil) r)))))
|
||||||
|
|
||||||
(Given "^I have bound C-! to a lambda that inserts \"\\(.+\\)\"$"
|
(Given "^I have bound C-! to a lambda that inserts \"\\(.+\\)\"$"
|
||||||
(lambda (ins)
|
(lambda (ins)
|
||||||
(lexical-let ((ins ins))
|
(global-set-key (kbd "C-!") #'(lambda () (interactive) (insert ins)))))
|
||||||
(global-set-key (kbd "C-!") #'(lambda () (interactive) (insert ins))))))
|
|
||||||
|
|
||||||
(Given "^I have bound C-! to a new command that inserts \"\\(.+\\)\"$"
|
(Given "^I have bound C-! to a new command that inserts \"\\(.+\\)\"$"
|
||||||
(lambda (ins)
|
(lambda (ins)
|
||||||
(lexical-let ((ins ins))
|
|
||||||
(defun mc-test-temp-command () (interactive) (insert ins))
|
(defun mc-test-temp-command () (interactive) (insert ins))
|
||||||
(global-set-key (kbd "C-!") 'mc-test-temp-command))))
|
(global-set-key (kbd "C-!") 'mc-test-temp-command)))
|
||||||
|
|
||||||
(Given "^I have bound C-! to another new command that inserts \"\\(.+\\)\"$"
|
(Given "^I have bound C-! to another new command that inserts \"\\(.+\\)\"$"
|
||||||
(lambda (ins)
|
(lambda (ins)
|
||||||
(lexical-let ((ins ins))
|
|
||||||
(defun mc-test-temp-command-2 () (interactive) (insert ins))
|
(defun mc-test-temp-command-2 () (interactive) (insert ins))
|
||||||
(global-set-key (kbd "C-!") 'mc-test-temp-command-2))))
|
(global-set-key (kbd "C-!") 'mc-test-temp-command-2)))
|
||||||
|
|
||||||
(Given "^I have bound C-! to a keyboard macro that insert \"_\"$"
|
(Given "^I have bound C-! to a keyboard macro that insert \"_\"$"
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
|||||||
+1
-1
@@ -88,7 +88,7 @@
|
|||||||
(cl-defun mc/cycle (next-cursor fallback-cursor loop-message)
|
(cl-defun mc/cycle (next-cursor fallback-cursor loop-message)
|
||||||
(when (null next-cursor)
|
(when (null next-cursor)
|
||||||
(when (eql 'stop (mc/handle-loop-condition loop-message))
|
(when (eql 'stop (mc/handle-loop-condition loop-message))
|
||||||
(return-from mc/cycle nil))
|
(cl-return-from mc/cycle nil))
|
||||||
(setf next-cursor fallback-cursor))
|
(setf next-cursor fallback-cursor))
|
||||||
(mc/create-fake-cursor-at-point)
|
(mc/create-fake-cursor-at-point)
|
||||||
(mc/pop-state-from-overlay next-cursor)
|
(mc/pop-state-from-overlay next-cursor)
|
||||||
|
|||||||
Reference in New Issue
Block a user