[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/multiple-cursors f73569f 125/434: Update documentation.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/multiple-cursors f73569f 125/434: Update documentation. |
Date: |
Sat, 7 Aug 2021 09:20:09 -0400 (EDT) |
branch: elpa/multiple-cursors
commit f73569fe134a2c71ab06c651a996e54c59852b83
Author: Magnar Sveen <magnars@gmail.com>
Commit: Magnar Sveen <magnars@gmail.com>
Update documentation.
---
multiple-cursors-core.el | 22 ++++++++++++++--------
multiple-cursors.el | 1 -
rectangular-region-mode.el | 8 ++++++++
3 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/multiple-cursors-core.el b/multiple-cursors-core.el
index ce65729..233eff5 100644
--- a/multiple-cursors-core.el
+++ b/multiple-cursors-core.el
@@ -250,14 +250,14 @@ cursor with updated info."
(overlays-in (point-min) (point-max)))))
(defun mc/execute-this-command-for-all-cursors ()
- "Used with post-command-hook to execute supported commands for
-all cursors. It also checks a list of explicitly unsupported
-commands that is prevented even for the original cursor, to
-inform about the lack of support.
-
-Commands that are neither supported nor explicitly unsupported
-is executed normally for point, but skipped for the fake
-cursors."
+ "Used with post-command-hook to execute supported commands for all cursors.
+
+It uses two lists of commands to know what to do: the run-once
+list and the run-for-all list. If a command is in neither of these lists,
+it will prompt for the proper action and then save that preference.
+
+Some commands are so unsupported that they are even prevented for
+the original cursor, to inform about the lack of support."
(if (eq 1 (mc/num-cursors)) ;; no fake cursors? disable mc-mode
(multiple-cursors-mode 0)
(let ((original-command (or (command-remapping this-original-command)
@@ -306,6 +306,7 @@ multiple cursors editing.")
(define-key mc/keymap (kbd "<return>") 'multiple-cursors-mode))
(defun mc--all-equal (entries)
+ "Are all these entries equal?"
(let ((first (car entries))
(all-equal t))
(while (and all-equal entries)
@@ -314,12 +315,16 @@ multiple cursors editing.")
all-equal))
(defun mc--kill-ring-entries ()
+ "Return the latest kill-ring entry for each cursor.
+The entries are returned in the order they are found in the buffer."
(let (entries)
(mc/for-each-cursor-ordered
(setq entries (cons (car (overlay-get cursor 'kill-ring)) entries)))
(reverse entries)))
(defun mc--maybe-set-killed-rectangle ()
+ "Add the latest kill-ring entry for each cursor to killed-rectangle.
+So you can paste it in later with `yank-rectangle'."
(let ((entries (mc--kill-ring-entries)))
(unless (mc--all-equal entries)
(setq killed-rectangle entries))))
@@ -382,6 +387,7 @@ from being executed if in multiple-cursors-mode."
for running commands with multiple cursors.")
(defun mc/save-lists ()
+ "Saves preferences for running commands with multiple cursors to
`mc/list-file'"
(with-temp-file mc/list-file
(emacs-lisp-mode)
(insert ";; This file is automatically generated by the multiple-cursors
extension.")
diff --git a/multiple-cursors.el b/multiple-cursors.el
index 98b593c..31c3bb9 100644
--- a/multiple-cursors.el
+++ b/multiple-cursors.el
@@ -125,7 +125,6 @@
;;
;;; Code:
-(require 'multiple-cursors-core)
(require 'mc-edit-lines)
(require 'mc-cycle-cursors)
(require 'mc-mark-more)
diff --git a/rectangular-region-mode.el b/rectangular-region-mode.el
index d0c3c8d..d6c9b73 100644
--- a/rectangular-region-mode.el
+++ b/rectangular-region-mode.el
@@ -39,6 +39,7 @@
(define-key rectangular-region-mode-map (kbd "<return>")
'rrm/switch-to-multiple-cursors)
(defun rrm/keyboard-quit ()
+ "Exit rectangular-region-mode."
(interactive)
(rectangular-region-mode 0)
(rrm/remove-rectangular-region-overlays)
@@ -47,12 +48,17 @@
;; Bind this to a key (for instance H-SPC) to start rectangular-region-mode
;;;###autoload
(defun set-rectangular-region-anchor ()
+ "Anchors the rectangular region at point.
+
+Think of this one as `set-mark' except you're marking a rectangular region. It
is
+an exceedingly quick way of adding multiple cursors to multiple lines."
(interactive)
(set-marker rrm/anchor (point))
(push-mark (point))
(rectangular-region-mode 1))
(defun rrm/remove-rectangular-region-overlays ()
+ "Remove all rectangular-region overlays."
(mc/remove-fake-cursors)
(mapc #'(lambda (o)
(when (eq (overlay-get o 'type) 'additional-region)
@@ -60,6 +66,7 @@
(overlays-in (point-min) (point-max))))
(defun rrm/repaint ()
+ "Start from the anchor and draw a rectangle between it and point."
(rrm/remove-rectangular-region-overlays)
(let* ((annoying-arrows-mode nil)
(point-column (current-column))
@@ -83,6 +90,7 @@
(mc/create-fake-cursor-at-point)))))))
(defun rrm/switch-to-multiple-cursors (&rest forms)
+ "Switch from rectangular-region-mode to multiple-cursors-mode."
(interactive)
(rectangular-region-mode 0)
(multiple-cursors-mode 1))
- [nongnu] elpa/multiple-cursors 00896cf 030/434: Refactor: simplify saving of state for cursors., (continued)
- [nongnu] elpa/multiple-cursors 00896cf 030/434: Refactor: simplify saving of state for cursors., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors c07d761 009/434: Some thoughts about combining with mark-multiple., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors d8f5116 013/434: Add more commands to multiple-cursors whitelist., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 1fcf7ed 016/434: More white-listing of commands., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors b51ee01 017/434: More white-listing., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 53dd119 032/434: Add docstring., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors c2bb81f 042/434: Dont forget to require rectangular-region-mode, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors ba11b12 051/434: Make interprogram-paste work for all cursors., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 8c8d52f 049/434: Run pre-command-hooks for each cursor, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors c1fba2c 111/434: Add travis badge, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors f73569f 125/434: Update documentation.,
ELPA Syncer <=
- [nongnu] elpa/multiple-cursors ce777dc 134/434: Add some mouse-commands to the run-once list., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 879ddb0 150/434: Add Takafumi Arakaki to list of contributors, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 64ffd81 142/434: Add quoted-insert to run-for-all list., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 00f9055 146/434: Add mc/dump-list to make mc/save-lists diff-friendly, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 7a6eb0d 145/434: Never execute keyboard macros for fake cursors., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 82a1fe3 209/434: Add mc/sort-regions and mc/reverse-regions, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors aa9a1ec 220/434: Add failing scenarios for mark-all-symbols/words, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors e7a5fe6 213/434: Release 1.2.1, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 6b09b9c 172/434: Add some more basic commands to the run-all and run-once lists., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 7382b46 170/434: Merge pull request #30 from gvol/master, ELPA Syncer, 2021/08/07