[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/multiple-cursors 224f919 008/434: Explicitly depend on mar
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/multiple-cursors 224f919 008/434: Explicitly depend on mark-multiple. |
Date: |
Sat, 7 Aug 2021 09:19:44 -0400 (EDT) |
branch: elpa/multiple-cursors
commit 224f919d68b304af95b1a1ad95505c654e75d66c
Author: Magnar Sveen <magnars@gmail.com>
Commit: Magnar Sveen <magnars@gmail.com>
Explicitly depend on mark-multiple.
---
README.md | 8 ++++++++
multiple-cursors.el | 17 +++++++++++------
2 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index 5fcd122..44d8534 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,10 @@ An experiment in multiple cursors for emacs. Still very much
in beta.
The basic concept works, but there are definitely some kinks to work out.
+This extension is dependent on the mark-multiple library.
+
+ https://github.com/magnars/mark-multiple.el
+
## Usage
I've set up my key-bindings like so:
@@ -15,6 +19,10 @@ I've set up my key-bindings like so:
To get out of multiple-cursors-mode, press `C-g`.
+You can also switch to multiple-cursors-mode by pressing C-g when in
+mark-multiple-mode. This is symmetrical to how pressing C-g with an active
+region deactivates it. Press C-g again to remove extra cursors.
+
## Contribute
There's plenty wrong with this implementation still. I'm actively trying things
diff --git a/multiple-cursors.el b/multiple-cursors.el
index 2329afa..1a619de 100644
--- a/multiple-cursors.el
+++ b/multiple-cursors.el
@@ -24,6 +24,9 @@
;;
;; The basic concept works, but there are definitely some kinks to work out.
+;; This extension is dependent on the mark-multiple library.
+;; https://github.com/magnars/mark-multiple.el
+
;; ** Usage
;; I've set up my key-bindings like so:
@@ -51,6 +54,8 @@
;;; Code:
+(require 'mark-multiple)
+
(defface mc/cursor-face
'((t (:inverse-video t)))
"The face used for additional cursors"
@@ -120,7 +125,7 @@ from being executed if in multiple-cursors-mode."
move-end-of-line-or-next-line
move-start-of-line-or-prev-line))
-(defun mc/execute-command-for-all-cursors (cmd)
+(defun mc/execute-command-for-all-fake-cursors (cmd)
"Calls CMD interactively for each cursor.
It works by moving point to the fake cursor, setting
up the proper kill-ring, and then removing the cursor.
@@ -152,7 +157,7 @@ cursors."
(message "%S is not supported with multiple cursors"
this-original-command)
(if (not (memq this-original-command mc--cmds))
(message "Skipping %S" this-original-command)
- (mc/execute-command-for-all-cursors this-original-command))))
+ (mc/execute-command-for-all-fake-cursors this-original-command))))
(defun mc/remove-additional-cursors ()
"Remove all fake cursors.
@@ -206,17 +211,17 @@ mark-multiple if point and mark is on different columns."
"Add one cursor to the end of each line in the active region."
(interactive)
(mc/add-multiple-cursors-to-region-lines)
- (mc/execute-command-for-all-cursors 'end-of-line)
+ (mc/execute-command-for-all-fake-cursors 'end-of-line)
(end-of-line))
(defun mc/edit-beginnings-of-lines ()
"Add one cursor to the beginning of each line in the active region."
(interactive)
(mc/add-multiple-cursors-to-region-lines)
- (mc/execute-command-for-all-cursors 'beginning-of-line)
+ (mc/execute-command-for-all-fake-cursors 'beginning-of-line)
(beginning-of-line))
-(defun mc/switch-to-cursors-from-mark-multiple ()
+(defun mc/switch-from-mark-multiple-to-cursors ()
"Removes mark-multiple and switches to multiple cursors instead"
(interactive)
(let ((offset (- (point) (overlay-start mm/master))))
@@ -228,7 +233,7 @@ mark-multiple if point and mark is on different columns."
(deactivate-mark)
(multiple-cursors-mode)))
-(define-key mm/keymap (kbd "C-g") 'mc/switch-to-cursors-from-mark-multiple)
+(define-key mm/keymap (kbd "C-g") 'mc/switch-from-mark-multiple-to-cursors)
(provide 'multiple-cursors)
- [nongnu] branch elpa/multiple-cursors created (now 616fbdd), ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 224f919 008/434: Explicitly depend on mark-multiple.,
ELPA Syncer <=
- [nongnu] elpa/multiple-cursors e44f45f 019/434: More white-listing in multiple-cursors., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors b28e8f9 023/434: Update test to fix missing step definition., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors a682c15 027/434: Disable regions first with C-g, then multiple-cursors., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 13668a9 001/434: initial commit, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors c18aa84 002/434: Separate kill-ring for each cursor., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 0d40ea1 003/434: Updated readme., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 18f7f1a 010/434: More white-listed commands for multiple cursors., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors cf82088 014/434: Add backward-list to white-list., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 26d0e52 015/434: Add more commands to white-list., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 5e64246 025/434: Move todo to own file., ELPA Syncer, 2021/08/07