From 2c3f68a21b2a59c4e09dff9f6252549d59ba47dd Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Thu, 23 Nov 2023 19:45:24 +0100 Subject: [PATCH] update multiple-cursors Signed-off-by: Andreas Gerler --- .../multiple-cursors-pkg.el | 5 - .../mc-cycle-cursors.el | 6 +- .../mc-edit-lines.el | 2 +- .../mc-hide-unmatched-lines-mode.el | 10 +- .../mc-mark-more.el | 96 ++-- .../mc-mark-pop.el | 0 .../mc-separate-operations.el | 3 +- .../multiple-cursors-autoloads.el | 198 ++++--- .../multiple-cursors-core.el | 485 ++++++++++-------- .../multiple-cursors-pkg.el | 12 + .../multiple-cursors.el | 4 +- .../rectangular-region-mode.el | 9 +- 12 files changed, 483 insertions(+), 347 deletions(-) delete mode 100644 elpa/multiple-cursors-20191210.1759/multiple-cursors-pkg.el rename elpa/{multiple-cursors-20191210.1759 => multiple-cursors-20230309.1204}/mc-cycle-cursors.el (96%) rename elpa/{multiple-cursors-20191210.1759 => multiple-cursors-20230309.1204}/mc-edit-lines.el (98%) rename elpa/{multiple-cursors-20191210.1759 => multiple-cursors-20230309.1204}/mc-hide-unmatched-lines-mode.el (97%) rename elpa/{multiple-cursors-20191210.1759 => multiple-cursors-20230309.1204}/mc-mark-more.el (92%) rename elpa/{multiple-cursors-20191210.1759 => multiple-cursors-20230309.1204}/mc-mark-pop.el (100%) rename elpa/{multiple-cursors-20191210.1759 => multiple-cursors-20230309.1204}/mc-separate-operations.el (98%) rename elpa/{multiple-cursors-20191210.1759 => multiple-cursors-20230309.1204}/multiple-cursors-autoloads.el (65%) rename elpa/{multiple-cursors-20191210.1759 => multiple-cursors-20230309.1204}/multiple-cursors-core.el (89%) create mode 100644 elpa/multiple-cursors-20230309.1204/multiple-cursors-pkg.el rename elpa/{multiple-cursors-20191210.1759 => multiple-cursors-20230309.1204}/multiple-cursors.el (98%) rename elpa/{multiple-cursors-20191210.1759 => multiple-cursors-20230309.1204}/rectangular-region-mode.el (95%) diff --git a/elpa/multiple-cursors-20191210.1759/multiple-cursors-pkg.el b/elpa/multiple-cursors-20191210.1759/multiple-cursors-pkg.el deleted file mode 100644 index ceb4014f..00000000 --- a/elpa/multiple-cursors-20191210.1759/multiple-cursors-pkg.el +++ /dev/null @@ -1,5 +0,0 @@ -(define-package "multiple-cursors" "20191210.1759" "Multiple cursors for Emacs." - '((cl-lib "0.5"))) -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/elpa/multiple-cursors-20191210.1759/mc-cycle-cursors.el b/elpa/multiple-cursors-20230309.1204/mc-cycle-cursors.el similarity index 96% rename from elpa/multiple-cursors-20191210.1759/mc-cycle-cursors.el rename to elpa/multiple-cursors-20230309.1204/mc-cycle-cursors.el index 85af3529..0248b9cd 100644 --- a/elpa/multiple-cursors-20191210.1759/mc-cycle-cursors.el +++ b/elpa/multiple-cursors-20230309.1204/mc-cycle-cursors.el @@ -88,7 +88,11 @@ (cl-defun mc/cycle (next-cursor fallback-cursor loop-message) (when (null next-cursor) (when (eql 'stop (mc/handle-loop-condition loop-message)) - (return-from mc/cycle nil)) + (cond + ((fboundp 'cl-return-from) + (cl-return-from mc/cycle nil)) + ((fboundp 'return-from) + (cl-return-from mc/cycle nil)))) (setf next-cursor fallback-cursor)) (mc/create-fake-cursor-at-point) (mc/pop-state-from-overlay next-cursor) diff --git a/elpa/multiple-cursors-20191210.1759/mc-edit-lines.el b/elpa/multiple-cursors-20230309.1204/mc-edit-lines.el similarity index 98% rename from elpa/multiple-cursors-20191210.1759/mc-edit-lines.el rename to elpa/multiple-cursors-20230309.1204/mc-edit-lines.el index 55772afa..33e7df24 100644 --- a/elpa/multiple-cursors-20191210.1759/mc-edit-lines.el +++ b/elpa/multiple-cursors-20230309.1204/mc-edit-lines.el @@ -50,7 +50,7 @@ that symbol is used instead of `mc/edit-lines-empty-lines'. Otherwise, if ARG negative, short lines will be ignored. Any other non-nil value will cause short lines to be padded." (interactive "P") - (when (not (and mark-active (/= (point) (mark)))) + (unless mark-active (error "Mark a set of lines first")) (mc/remove-fake-cursors) (let* ((col (current-column)) diff --git a/elpa/multiple-cursors-20191210.1759/mc-hide-unmatched-lines-mode.el b/elpa/multiple-cursors-20230309.1204/mc-hide-unmatched-lines-mode.el similarity index 97% rename from elpa/multiple-cursors-20191210.1759/mc-hide-unmatched-lines-mode.el rename to elpa/multiple-cursors-20230309.1204/mc-hide-unmatched-lines-mode.el index 0167dbcd..7565c0b8 100644 --- a/elpa/multiple-cursors-20191210.1759/mc-hide-unmatched-lines-mode.el +++ b/elpa/multiple-cursors-20230309.1204/mc-hide-unmatched-lines-mode.el @@ -1,4 +1,4 @@ -;;; mc-hide-unmatched-lines.el +;;; mc-hide-unmatched-lines-mode.el ;; Copyright (C) 2014 Aleksey Fedotov @@ -54,8 +54,9 @@ also hum/lines-to-expand below and above) To make use of this mode press \"C-'\" while multiple-cursor-mode is active. You can still edit lines while you are in mc-hide-unmatched-lines mode. To leave this mode press or \"C-g\"" - nil " hu" - hum/hide-unmatched-lines-mode-map + :init-value nil + :lighter " hu" + :keymap hum/hide-unmatched-lines-mode-map (if mc-hide-unmatched-lines-mode ;;just in case if mc mode will be disabled while hide-unmatched-lines is active (progn @@ -103,5 +104,6 @@ mode. To leave this mode press or \"C-g\"" (defun hum/unhide-unmatched-lines () (remove-overlays nil nil hum/invisible-overlay-name t)) -(provide 'mc-hide-unmatched-lines-mode) (define-key mc/keymap (kbd "C-'") 'mc-hide-unmatched-lines-mode) + +(provide 'mc-hide-unmatched-lines-mode) diff --git a/elpa/multiple-cursors-20191210.1759/mc-mark-more.el b/elpa/multiple-cursors-20230309.1204/mc-mark-more.el similarity index 92% rename from elpa/multiple-cursors-20191210.1759/mc-mark-more.el rename to elpa/multiple-cursors-20230309.1204/mc-mark-more.el index 2e631307..e4a141e3 100644 --- a/elpa/multiple-cursors-20191210.1759/mc-mark-more.el +++ b/elpa/multiple-cursors-20230309.1204/mc-mark-more.el @@ -190,7 +190,7 @@ With zero ARG, skip the last one and mark next." (defun mc/mark-next-word-like-this (arg) "Find and mark the next word of the buffer matching the currently active region The matching region must be a whole word to be a match -If no region is active, mark the symbol at the point and find the next match +If no region is active add a cursor on the next line With negative ARG, delete the last one instead. With zero ARG, skip the last one and mark next." (interactive "p") @@ -201,7 +201,7 @@ With zero ARG, skip the last one and mark next." (defun mc/mark-next-symbol-like-this (arg) "Find and mark the next symbol of the buffer matching the currently active region The matching region must be a whole symbol to be a match -If no region is active, mark the symbol at the point and find the next match +If no region is active add a cursor on the next line With negative ARG, delete the last one instead. With zero ARG, skip the last one and mark next." (interactive "p") @@ -210,9 +210,13 @@ With zero ARG, skip the last one and mark next." ;;;###autoload (defun mc/mark-previous-like-this (arg) - "Find and mark the previous part of the buffer matching the currently active region -If no region is active add a cursor on the previous line + "Find and mark the previous part of the buffer matching the +currently active region. + +If no region is active ,add a cursor on the previous line. + With negative ARG, delete the last one instead. + With zero ARG, skip the last one and mark next." (interactive "p") (if (< arg 0) @@ -227,9 +231,14 @@ With zero ARG, skip the last one and mark next." ;;;###autoload (defun mc/mark-previous-like-this-word (arg) - "Find and mark the previous part of the buffer matching the currently active region -If no region is active, mark the word at the point and find the previous match + "Find and mark the previous part of the buffer matching the +currently active region. + +If no region is active, mark the word at the point and find the +previous match. + With negative ARG, delete the last one instead. + With zero ARG, skip the last one and mark previous." (interactive "p") (if (< arg 0) @@ -244,9 +253,14 @@ With zero ARG, skip the last one and mark previous." (mc/maybe-multiple-cursors-mode)) (defun mc/mark-previous-like-this-symbol (arg) - "Find and mark the previous part of the buffer matching the currently active region -If no region is active, mark the symbol at the point and find the previous match + "Find and mark the previous part of the buffer matching the +currently active region. + +If no region is active, mark the symbol at the point and find the +previous match. + With negative ARG, delete the last one instead. + With zero ARG, skip the last one and mark previous." (interactive "p") (if (< arg 0) @@ -263,10 +277,15 @@ With zero ARG, skip the last one and mark previous." ;;;###autoload (defun mc/mark-previous-word-like-this (arg) - "Find and mark the previous part of the buffer matching the currently active region -The matching region must be a whole word to be a match -If no region is active add a cursor on the previous line + "Find and mark the previous part of the buffer matching the +currently active region. + +The matching region must be a whole word to be a match. + +If no region is active, add a cursor on the previous line. + With negative ARG, delete the last one instead. + With zero ARG, skip the last one and mark next." (interactive "p") (let ((mc/enclose-search-term 'words)) @@ -274,10 +293,15 @@ With zero ARG, skip the last one and mark next." ;;;###autoload (defun mc/mark-previous-symbol-like-this (arg) - "Find and mark the previous part of the buffer matching the currently active region -The matching region must be a whole symbol to be a match -If no region is active add a cursor on the previous line + "Find and mark the previous part of the buffer matching +the currently active region. + +The matching region must be a whole symbol to be a match. + +If no region is active add a cursor on the previous line. + With negative ARG, delete the last one instead. + With zero ARG, skip the last one and mark next." (interactive "p") (let ((mc/enclose-search-term 'symbols)) @@ -324,13 +348,15 @@ With zero ARG, skip the last one and mark next." ;;;###autoload (defun mc/skip-to-next-like-this () - "Skip the current one and select the next part of the buffer matching the currently active region." + "Skip the current one and select the next part of the buffer +matching the currently active region." (interactive) (mc/mark-next-like-this 0)) ;;;###autoload (defun mc/skip-to-previous-like-this () - "Skip the current one and select the prev part of the buffer matching the currently active region." + "Skip the current one and select the prev part of the buffer +matching the currently active region." (interactive) (mc/mark-previous-like-this 0)) @@ -355,7 +381,7 @@ With zero ARG, skip the last one and mark next." (when point-first (exchange-point-and-mark))))) (if (> (mc/num-cursors) 1) (multiple-cursors-mode 1) - (multiple-cursors-mode 0))) + (mc/disable-multiple-cursors-mode))) (defun mc--select-thing-at-point (thing) (let ((bound (bounds-of-thing-at-point thing))) @@ -393,16 +419,18 @@ With zero ARG, skip the last one and mark next." (progn (mc/remove-fake-cursors) (goto-char beg) - (while (search-forward search end t) - (push-mark (match-beginning 0)) - (mc/create-fake-cursor-at-point)) - (let ((first (mc/furthest-cursor-before-point))) - (if (not first) - (error "Search failed for %S" search) - (mc/pop-state-from-overlay first))) - (if (> (mc/num-cursors) 1) - (multiple-cursors-mode 1) - (multiple-cursors-mode 0)))))) + (let ((lastmatch)) + (while (search-forward search end t) + (push-mark (match-beginning 0)) + (mc/create-fake-cursor-at-point) + (setq lastmatch t)) + (unless lastmatch + (error "Search failed for %S" search))) + (goto-char (match-end 0)) + (if (< (mc/num-cursors) 3) + (mc/disable-multiple-cursors-mode) + (mc/pop-state-from-overlay (mc/furthest-cursor-before-point)) + (multiple-cursors-mode 1)))))) ;;;###autoload (defun mc/mark-all-in-region-regexp (beg end) @@ -427,7 +455,7 @@ With zero ARG, skip the last one and mark next." (error "Search failed for %S" search))) (goto-char (match-end 0)) (if (< (mc/num-cursors) 3) - (multiple-cursors-mode 0) + (mc/disable-multiple-cursors-mode) (mc/pop-state-from-overlay (mc/furthest-cursor-before-point)) (multiple-cursors-mode 1)))))) @@ -471,7 +499,7 @@ remove the keymap depends on user input and KEEP-PRED: ;;;###autoload (defun mc/mark-more-like-this-extended () - "Like mark-more-like-this, but then lets you adjust with arrows key. + "Like mark-more-like-this, but then lets you adjust with arrow keys. The adjustments work like this: Mark previous like this and set direction to 'up @@ -487,13 +515,15 @@ If direction is 'down: Remove the cursor furthest down Skip past the cursor furthest down -The bindings for these commands can be changed. See `mc/mark-more-like-this-extended-keymap'." +The bindings for these commands can be changed. +See `mc/mark-more-like-this-extended-keymap'." (interactive) (mc/mmlte--down) - (set-temporary-overlay-map mc/mark-more-like-this-extended-keymap t)) + (set-transient-map mc/mark-more-like-this-extended-keymap t)) (defvar mc/mark-more-like-this-extended-direction nil - "When using mc/mark-more-like-this-extended are we working on the next or previous cursors?") + "When using mc/mark-more-like-this-extended +are we working on the next or previous cursors?") (make-variable-buffer-local 'mc/mark-more-like-this-extended) @@ -639,7 +669,7 @@ If the region is inactive or on a single line, it will behave like (last (progn (when (looking-at "<") (forward-char 1)) - (when (looking-back ">") (forward-char -1)) + (when (looking-back ">" 1) (forward-char -1)) (sgml-get-context))))) (defun mc--on-tag-name-p () diff --git a/elpa/multiple-cursors-20191210.1759/mc-mark-pop.el b/elpa/multiple-cursors-20230309.1204/mc-mark-pop.el similarity index 100% rename from elpa/multiple-cursors-20191210.1759/mc-mark-pop.el rename to elpa/multiple-cursors-20230309.1204/mc-mark-pop.el diff --git a/elpa/multiple-cursors-20191210.1759/mc-separate-operations.el b/elpa/multiple-cursors-20230309.1204/mc-separate-operations.el similarity index 98% rename from elpa/multiple-cursors-20191210.1759/mc-separate-operations.el rename to elpa/multiple-cursors-20230309.1204/mc-separate-operations.el index f123ccaa..ddc7395b 100644 --- a/elpa/multiple-cursors-20191210.1759/mc-separate-operations.el +++ b/elpa/multiple-cursors-20230309.1204/mc-separate-operations.el @@ -106,7 +106,8 @@ (progn (mc/mark-next-lines 1) (mc/reverse-regions) - (multiple-cursors-mode 0)) + (mc/disable-multiple-cursors-mode) + ) (unless (use-region-p) (mc/execute-command-for-all-cursors 'mark-sexp)) (setq mc--strings-to-replace (nreverse (mc--ordered-region-strings))) diff --git a/elpa/multiple-cursors-20191210.1759/multiple-cursors-autoloads.el b/elpa/multiple-cursors-20230309.1204/multiple-cursors-autoloads.el similarity index 65% rename from elpa/multiple-cursors-20191210.1759/multiple-cursors-autoloads.el rename to elpa/multiple-cursors-20230309.1204/multiple-cursors-autoloads.el index 1ddb851c..35f90fba 100644 --- a/elpa/multiple-cursors-20191210.1759/multiple-cursors-autoloads.el +++ b/elpa/multiple-cursors-20230309.1204/multiple-cursors-autoloads.el @@ -1,4 +1,4 @@ -;;; multiple-cursors-autoloads.el --- automatically extracted autoloads +;;; multiple-cursors-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*- ;; ;;; Code: @@ -10,7 +10,7 @@ ;;;;;; 0 0 0)) ;;; Generated autoloads from mc-cycle-cursors.el -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "mc-cycle-cursors" '("mc/"))) +(register-definition-prefixes "mc-cycle-cursors" '("mc/")) ;;;*** @@ -32,16 +32,12 @@ other non-nil value will cause short lines to be padded. \(fn &optional ARG)" t nil) (autoload 'mc/edit-ends-of-lines "mc-edit-lines" "\ -Add one cursor to the end of each line in the active region. - -\(fn)" t nil) +Add one cursor to the end of each line in the active region." t nil) (autoload 'mc/edit-beginnings-of-lines "mc-edit-lines" "\ -Add one cursor to the beginning of each line in the active region. - -\(fn)" t nil) +Add one cursor to the beginning of each line in the active region." t nil) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "mc-edit-lines" '("mc/edit-lines-empty-lines"))) +(register-definition-prefixes "mc-edit-lines" '("mc/edit-lines-empty-lines")) ;;;*** @@ -56,9 +52,24 @@ mode press \"C-'\" while multiple-cursor-mode is active. You can still edit lines while you are in mc-hide-unmatched-lines mode. To leave this mode press or \"C-g\" +This is a minor mode. If called interactively, toggle the +`Mc-Hide-Unmatched-Lines mode' mode. If the prefix argument is +positive, enable the mode, and if it is zero or negative, disable +the mode. + +If called from Lisp, toggle the mode if ARG is `toggle'. Enable +the mode if ARG is nil, omitted, or is a positive number. +Disable the mode if ARG is a negative number. + +To check whether the minor mode is enabled in the current buffer, +evaluate `mc-hide-unmatched-lines-mode'. + +The mode's hook is called both when the mode is enabled and when +it is disabled. + \(fn &optional ARG)" t nil) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "mc-hide-unmatched-lines-mode" '("hum/"))) +(register-definition-prefixes "mc-hide-unmatched-lines-mode" '("hum/")) ;;;*** @@ -84,7 +95,7 @@ With zero ARG, skip the last one and mark next. (autoload 'mc/mark-next-word-like-this "mc-mark-more" "\ Find and mark the next word of the buffer matching the currently active region The matching region must be a whole word to be a match -If no region is active, mark the symbol at the point and find the next match +If no region is active add a cursor on the next line With negative ARG, delete the last one instead. With zero ARG, skip the last one and mark next. @@ -93,42 +104,61 @@ With zero ARG, skip the last one and mark next. (autoload 'mc/mark-next-symbol-like-this "mc-mark-more" "\ Find and mark the next symbol of the buffer matching the currently active region The matching region must be a whole symbol to be a match -If no region is active, mark the symbol at the point and find the next match +If no region is active add a cursor on the next line With negative ARG, delete the last one instead. With zero ARG, skip the last one and mark next. \(fn ARG)" t nil) (autoload 'mc/mark-previous-like-this "mc-mark-more" "\ -Find and mark the previous part of the buffer matching the currently active region -If no region is active add a cursor on the previous line +Find and mark the previous part of the buffer matching the +currently active region. + +If no region is active ,add a cursor on the previous line. + With negative ARG, delete the last one instead. + With zero ARG, skip the last one and mark next. \(fn ARG)" t nil) (autoload 'mc/mark-previous-like-this-word "mc-mark-more" "\ -Find and mark the previous part of the buffer matching the currently active region -If no region is active, mark the word at the point and find the previous match +Find and mark the previous part of the buffer matching the +currently active region. + +If no region is active, mark the word at the point and find the +previous match. + With negative ARG, delete the last one instead. + With zero ARG, skip the last one and mark previous. \(fn ARG)" t nil) (autoload 'mc/mark-previous-word-like-this "mc-mark-more" "\ -Find and mark the previous part of the buffer matching the currently active region -The matching region must be a whole word to be a match -If no region is active add a cursor on the previous line +Find and mark the previous part of the buffer matching the +currently active region. + +The matching region must be a whole word to be a match. + +If no region is active, add a cursor on the previous line. + With negative ARG, delete the last one instead. + With zero ARG, skip the last one and mark next. \(fn ARG)" t nil) (autoload 'mc/mark-previous-symbol-like-this "mc-mark-more" "\ -Find and mark the previous part of the buffer matching the currently active region -The matching region must be a whole symbol to be a match -If no region is active add a cursor on the previous line +Find and mark the previous part of the buffer matching +the currently active region. + +The matching region must be a whole symbol to be a match. + +If no region is active add a cursor on the previous line. + With negative ARG, delete the last one instead. + With zero ARG, skip the last one and mark next. \(fn ARG)" t nil) @@ -144,39 +174,25 @@ With zero ARG, skip the last one and mark next. \(fn ARG)" t nil) (autoload 'mc/unmark-next-like-this "mc-mark-more" "\ -Deselect next part of the buffer matching the currently active region. - -\(fn)" t nil) +Deselect next part of the buffer matching the currently active region." t nil) (autoload 'mc/unmark-previous-like-this "mc-mark-more" "\ -Deselect prev part of the buffer matching the currently active region. - -\(fn)" t nil) +Deselect prev part of the buffer matching the currently active region." t nil) (autoload 'mc/skip-to-next-like-this "mc-mark-more" "\ -Skip the current one and select the next part of the buffer matching the currently active region. - -\(fn)" t nil) +Skip the current one and select the next part of the buffer +matching the currently active region." t nil) (autoload 'mc/skip-to-previous-like-this "mc-mark-more" "\ -Skip the current one and select the prev part of the buffer matching the currently active region. - -\(fn)" t nil) +Skip the current one and select the prev part of the buffer +matching the currently active region." t nil) (autoload 'mc/mark-all-like-this "mc-mark-more" "\ -Find and mark all the parts of the buffer matching the currently active region +Find and mark all the parts of the buffer matching the currently active region" t nil) -\(fn)" t nil) +(autoload 'mc/mark-all-words-like-this "mc-mark-more" nil t nil) -(autoload 'mc/mark-all-words-like-this "mc-mark-more" "\ - - -\(fn)" t nil) - -(autoload 'mc/mark-all-symbols-like-this "mc-mark-more" "\ - - -\(fn)" t nil) +(autoload 'mc/mark-all-symbols-like-this "mc-mark-more" nil t nil) (autoload 'mc/mark-all-in-region "mc-mark-more" "\ Find and mark all the parts in the region matching the given search @@ -189,7 +205,7 @@ Find and mark all the parts in the region matching the given regexp. \(fn BEG END)" t nil) (autoload 'mc/mark-more-like-this-extended "mc-mark-more" "\ -Like mark-more-like-this, but then lets you adjust with arrows key. +Like mark-more-like-this, but then lets you adjust with arrow keys. The adjustments work like this: Mark previous like this and set direction to 'up @@ -205,9 +221,8 @@ If direction is 'down: Remove the cursor furthest down Skip past the cursor furthest down -The bindings for these commands can be changed. See `mc/mark-more-like-this-extended-keymap'. - -\(fn)" t nil) +The bindings for these commands can be changed. +See `mc/mark-more-like-this-extended-keymap'." t nil) (autoload 'mc/mark-all-like-this-dwim "mc-mark-more" "\ Tries to guess what you want to mark all of. @@ -230,19 +245,13 @@ If the region is inactive or on a single line, it will behave like \(fn ARG)" t nil) (autoload 'mc/mark-all-like-this-in-defun "mc-mark-more" "\ -Mark all like this in defun. - -\(fn)" t nil) +Mark all like this in defun." t nil) (autoload 'mc/mark-all-words-like-this-in-defun "mc-mark-more" "\ -Mark all words like this in defun. - -\(fn)" t nil) +Mark all words like this in defun." t nil) (autoload 'mc/mark-all-symbols-like-this-in-defun "mc-mark-more" "\ -Mark all symbols like this in defun. - -\(fn)" t nil) +Mark all symbols like this in defun." t nil) (autoload 'mc/toggle-cursor-on-click "mc-mark-more" "\ Add a cursor where you click, or remove a fake cursor that is @@ -253,11 +262,9 @@ already there. (defalias 'mc/add-cursor-on-click 'mc/toggle-cursor-on-click) (autoload 'mc/mark-sgml-tag-pair "mc-mark-more" "\ -Mark the tag we're in and its pair for renaming. +Mark the tag we're in and its pair for renaming." t nil) -\(fn)" t nil) - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "mc-mark-more" '("mc/" "mc--"))) +(register-definition-prefixes "mc-mark-more" '("mc--" "mc/")) ;;;*** @@ -266,9 +273,7 @@ Mark the tag we're in and its pair for renaming. (autoload 'mc/mark-pop "mc-mark-pop" "\ Add a cursor at the current point, pop off mark ring and jump -to the popped mark. - -\(fn)" t nil) +to the popped mark." t nil) ;;;*** @@ -288,15 +293,9 @@ Insert increasing letters for each cursor, starting at 0 or ARG. \(fn ARG)" t nil) -(autoload 'mc/reverse-regions "mc-separate-operations" "\ - - -\(fn)" t nil) - -(autoload 'mc/sort-regions "mc-separate-operations" "\ +(autoload 'mc/reverse-regions "mc-separate-operations" nil t nil) - -\(fn)" t nil) +(autoload 'mc/sort-regions "mc-separate-operations" nil t nil) (autoload 'mc/vertical-align "mc-separate-operations" "\ Aligns all cursors vertically with a given CHARACTER to the one with the @@ -306,11 +305,9 @@ Might not behave as intended if more than one cursors are on the same line. \(fn CHARACTER)" t nil) (autoload 'mc/vertical-align-with-space "mc-separate-operations" "\ -Aligns all cursors with whitespace like `mc/vertical-align' does - -\(fn)" t nil) +Aligns all cursors with whitespace like `mc/vertical-align' does" t nil) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "mc-separate-operations" '("mc/insert-numbers-default" "mc--"))) +(register-definition-prefixes "mc-separate-operations" '("mc--" "mc/insert-numbers-default")) ;;;*** @@ -318,12 +315,33 @@ Aligns all cursors with whitespace like `mc/vertical-align' does ;;;;;; (0 0 0 0)) ;;; Generated autoloads from multiple-cursors-core.el +(autoload 'activate-cursor-for-undo "multiple-cursors-core" "\ +Called when undoing to temporarily activate the fake cursor +which action is being undone. + +\(fn ID)" nil nil) + (autoload 'multiple-cursors-mode "multiple-cursors-core" "\ Mode while multiple cursors are active. +This is a minor mode. If called interactively, toggle the +`Multiple-Cursors mode' mode. If the prefix argument is +positive, enable the mode, and if it is zero or negative, disable +the mode. + +If called from Lisp, toggle the mode if ARG is `toggle'. Enable +the mode if ARG is nil, omitted, or is a positive number. +Disable the mode if ARG is a negative number. + +To check whether the minor mode is enabled in the current buffer, +evaluate `multiple-cursors-mode'. + +The mode's hook is called both when the mode is enabled and when +it is disabled. + \(fn &optional ARG)" t nil) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "multiple-cursors-core" '("multiple-cursors-mode" "unsupported-cmd" "deactivate-cursor-after-undo" "activate-cursor-for-undo"))) +(register-definition-prefixes "multiple-cursors-core" '("deactivate-cursor-after-undo" "multiple-cursors-mode" "unsupported-cmd")) ;;;*** @@ -334,17 +352,31 @@ Mode while multiple cursors are active. (autoload 'set-rectangular-region-anchor "rectangular-region-mode" "\ 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. - -\(fn)" t nil) +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." t nil) (autoload 'rectangular-region-mode "rectangular-region-mode" "\ A mode for creating a rectangular region to edit +This is a minor mode. If called interactively, toggle the +`Rectangular-Region mode' mode. If the prefix argument is +positive, enable the mode, and if it is zero or negative, disable +the mode. + +If called from Lisp, toggle the mode if ARG is `toggle'. Enable +the mode if ARG is nil, omitted, or is a positive number. +Disable the mode if ARG is a negative number. + +To check whether the minor mode is enabled in the current buffer, +evaluate `rectangular-region-mode'. + +The mode's hook is called both when the mode is enabled and when +it is disabled. + \(fn &optional ARG)" t nil) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "rectangular-region-mode" '("rectangular-region-mode" "rrm/"))) +(register-definition-prefixes "rectangular-region-mode" '("rectangular-region-mode" "rrm/")) ;;;*** diff --git a/elpa/multiple-cursors-20191210.1759/multiple-cursors-core.el b/elpa/multiple-cursors-20230309.1204/multiple-cursors-core.el similarity index 89% rename from elpa/multiple-cursors-20191210.1759/multiple-cursors-core.el rename to elpa/multiple-cursors-20230309.1204/multiple-cursors-core.el index 5d8cb8a6..3d48684a 100644 --- a/elpa/multiple-cursors-20191210.1759/multiple-cursors-core.el +++ b/elpa/multiple-cursors-20230309.1204/multiple-cursors-core.el @@ -40,6 +40,23 @@ "The face used for fake cursors if the cursor-type is bar" :group 'multiple-cursors) +(defcustom mc/match-cursor-style t + "If non-nil, attempt to match the cursor style that the user +has selected. Namely, use vertical bars the user has configured +Emacs to use that cursor. + +If nil, just use standard rectangle cursors for all fake cursors. + +In some modes/themes, the bar fake cursors are either not +rendered or shift text." + :type '(boolean) + :group 'multiple-cursors) + +(defcustom mc--reset-read-variables '() + "A list of cache variable names to reset by multiple-cursors." + :type '(list symbol) + :group 'multiple-cursors) + (defface mc/region-face '((t :inherit region)) "The face used for fake regions" @@ -105,9 +122,13 @@ (defun mc/cursor-is-bar () "Return non-nil if the cursor is a bar." - (or (eq cursor-type 'bar) - (and (listp cursor-type) - (eq (car cursor-type) 'bar)))) + (let ((cursor-type + (if (eq cursor-type t) + (frame-parameter nil 'cursor-type) + cursor-type))) + (or (eq cursor-type 'bar) + (and (listp cursor-type) + (eq (car cursor-type) 'bar))))) (defun mc/line-number-at-pos (&optional pos absolute) "Faster implementation of `line-number-at-pos'." @@ -125,16 +146,16 @@ (defun mc/make-cursor-overlay-at-eol (pos) "Create overlay to look like cursor at end of line." (let ((overlay (make-overlay pos pos nil nil nil))) - (if (mc/cursor-is-bar) - (overlay-put overlay 'before-string (propertize "|" 'face 'mc/cursor-bar-face)) + (if (and mc/match-cursor-style (mc/cursor-is-bar)) + (overlay-put overlay 'before-string (propertize "|" 'face 'mc/cursor-bar-face)) (overlay-put overlay 'after-string (propertize " " 'face 'mc/cursor-face))) overlay)) (defun mc/make-cursor-overlay-inline (pos) "Create overlay to look like cursor inside text." (let ((overlay (make-overlay pos (1+ pos) nil nil nil))) - (if (mc/cursor-is-bar) - (overlay-put overlay 'before-string (propertize "|" 'face 'mc/cursor-bar-face)) + (if (and mc/match-cursor-style (mc/cursor-is-bar)) + (overlay-put overlay 'before-string (propertize "|" 'face 'mc/cursor-bar-face)) (overlay-put overlay 'face 'mc/cursor-face)) overlay)) @@ -180,8 +201,8 @@ highlights the entire width of the window." "Store relevant info about point and mark in the given overlay." (overlay-put o 'point (set-marker (make-marker) (point))) (overlay-put o 'mark (set-marker (make-marker) - (let ((mark-even-if-inactive t)) - (mark)))) + (let ((mark-even-if-inactive t)) + (mark)))) (dolist (var mc/cursor-specific-vars) (when (boundp var) (overlay-put o var (symbol-value var)))) o) @@ -238,8 +259,11 @@ If this value is nil, there is no ceiling." :group 'multiple-cursors) (defun mc/create-fake-cursor-at-point (&optional id) - "Add a fake cursor and possibly a fake active region overlay based on point and mark. -Saves the current state in the overlay to be restored later." + "Add a fake cursor and possibly a fake active region overlay +based on point and mark. + +Saves the current state in the overlay +to be restored later." (unless mc--max-cursors-original (setq mc--max-cursors-original mc/max-cursors)) (when mc/max-cursors @@ -259,7 +283,8 @@ Saves the current state in the overlay to be restored later." overlay)) (defun mc/execute-command (cmd) - "Run command, simulating the parts of the command loop that makes sense for fake cursors." + "Run command, simulating the parts of the command loop that +makes sense for fake cursors." (setq this-command cmd) (run-hooks 'pre-command-hook) (unless (eq this-command 'ignore) @@ -301,26 +326,32 @@ cursor with updated info." ;; Intercept some reading commands so you won't have to ;; answer them for every single cursor -(defvar mc--read-char nil) (defvar multiple-cursors-mode nil) -(defadvice read-char (around mc-support activate) - (if (not multiple-cursors-mode) - ad-do-it - (unless mc--read-char - (setq mc--read-char ad-do-it)) - (setq ad-return-value mc--read-char))) - -(defvar mc--read-quoted-char nil) -(defadvice read-quoted-char (around mc-support activate) - (if (not multiple-cursors-mode) - ad-do-it - (unless mc--read-quoted-char - (setq mc--read-quoted-char ad-do-it)) - (setq ad-return-value mc--read-quoted-char))) (defun mc--reset-read-prompts () - (setq mc--read-char nil) - (setq mc--read-quoted-char nil)) + (mapc (lambda (var) (set var nil)) + mc--reset-read-variables)) + +(defmacro mc--cache-input-function (fn-name) + "Advise FN-NAME to cache its value in a private variable. Cache +is to be used by mc/execute-command-for-all-fake-cursors and +caches will be reset by mc--reset-read-prompts." + (let ((mc-name (intern (concat "mc--" (symbol-name fn-name))))) + `(progn + (defvar ,mc-name nil) + (defun ,mc-name (orig-fun &rest args) + (if (not multiple-cursors-mode) + (apply orig-fun args) + (unless ,mc-name + (setq ,mc-name (apply orig-fun args))) + ,mc-name)) + (advice-add ',fn-name :around #',mc-name) + (add-to-list 'mc--reset-read-variables ',mc-name)))) + +(mc--cache-input-function read-char) +(mc--cache-input-function read-quoted-char) +(mc--cache-input-function register-read-with-preview) ; used by insert-register +(mc--cache-input-function read-char-from-minibuffer) ; used by zap-to-char (mc--reset-read-prompts) @@ -337,8 +368,10 @@ cursor with updated info." (defvar mc--stored-state-for-undo nil "Variable to keep the state of the real cursor while undoing a fake one") +;;;###autoload (defun activate-cursor-for-undo (id) - "Called when undoing to temporarily activate the fake cursor which action is being undone." + "Called when undoing to temporarily activate the fake cursor +which action is being undone." (let ((cursor (mc/cursor-with-id id))) (when cursor (setq mc--stored-state-for-undo (mc/store-current-state-in-overlay @@ -362,6 +395,185 @@ cursor with updated info." :type '(boolean) :group 'multiple-cursors) +(defvar mc/cmds-to-run-once nil + "Commands to run only once in multiple-cursors-mode.") + +(defvar mc--default-cmds-to-run-once nil + "Default set of commands to run only once in multiple-cursors-mode.") + +(setq mc--default-cmds-to-run-once '(mc/edit-lines + mc/edit-ends-of-lines + mc/edit-beginnings-of-lines + mc/mark-next-like-this + mc/mark-next-like-this-word + mc/mark-next-like-this-symbol + mc/mark-next-word-like-this + mc/mark-next-symbol-like-this + mc/mark-previous-like-this + mc/mark-previous-like-this-word + mc/mark-previous-like-this-symbol + mc/mark-previous-word-like-this + mc/mark-previous-symbol-like-this + mc/mark-all-like-this + mc/mark-all-words-like-this + mc/mark-all-symbols-like-this + mc/mark-more-like-this-extended + mc/mark-all-like-this-in-defun + mc/mark-all-words-like-this-in-defun + mc/mark-all-symbols-like-this-in-defun + mc/mark-all-like-this-dwim + mc/mark-all-dwim + mc/mark-sgml-tag-pair + mc/insert-numbers + mc/insert-letters + mc/sort-regions + mc/reverse-regions + mc/cycle-forward + mc/cycle-backward + mc/add-cursor-on-click + mc/mark-pop + mc/add-cursors-to-all-matches + mc/mmlte--left + mc/mmlte--right + mc/mmlte--up + mc/mmlte--down + mc/unmark-next-like-this + mc/unmark-previous-like-this + mc/skip-to-next-like-this + mc/skip-to-previous-like-this + rrm/switch-to-multiple-cursors + mc-hide-unmatched-lines-mode + mc/repeat-command + hum/keyboard-quit + hum/unhide-invisible-overlays + save-buffer + ido-exit-minibuffer + ivy-done + exit-minibuffer + minibuffer-complete-and-exit + execute-extended-command + eval-expression + undo + redo + undo-tree-undo + undo-tree-redo + undo-fu-only-undo + undo-fu-only-redo + universal-argument + universal-argument-more + universal-argument-other-key + negative-argument + digit-argument + top-level + recenter-top-bottom + describe-mode + describe-key-1 + describe-function + describe-bindings + describe-prefix-bindings + view-echo-area-messages + other-window + kill-buffer-and-window + split-window-right + split-window-below + delete-other-windows + toggle-window-split + mwheel-scroll + scroll-up-command + scroll-down-command + mouse-set-point + mouse-drag-region + quit-window + toggle-read-only + windmove-left + windmove-right + windmove-up + windmove-down + repeat-complex-command)) + +(defvar mc/cmds-to-run-for-all nil + "Commands to run for all cursors in multiple-cursors-mode") + +(defvar mc--default-cmds-to-run-for-all nil + "Default set of commands that should be mirrored by all cursors") + +(setq mc--default-cmds-to-run-for-all '(mc/keyboard-quit + self-insert-command + quoted-insert + previous-line + next-line + newline + newline-and-indent + open-line + delete-blank-lines + transpose-chars + transpose-lines + transpose-paragraphs + transpose-regions + join-line + right-char + right-word + forward-char + forward-word + left-char + left-word + backward-char + backward-word + forward-paragraph + backward-paragraph + upcase-word + downcase-word + capitalize-word + forward-list + backward-list + hippie-expand + hippie-expand-lines + yank + yank-pop + append-next-kill + kill-word + kill-line + kill-whole-line + backward-kill-word + backward-delete-char-untabify + delete-char delete-forward-char + delete-backward-char + py-electric-backspace + c-electric-backspace + org-delete-backward-char + cperl-electric-backspace + python-indent-dedent-line-backspace + paredit-backward-delete + autopair-backspace + just-one-space + zap-to-char + end-of-line + set-mark-command + exchange-point-and-mark + cua-set-mark + cua-replace-region + cua-delete-region + move-end-of-line + beginning-of-line + move-beginning-of-line + kill-ring-save + back-to-indentation + subword-forward + subword-backward + subword-mark + subword-kill + subword-backward-kill + subword-transpose + subword-capitalize + subword-upcase + subword-downcase + er/expand-region + er/contract-region + smart-forward + smart-backward + smart-up + smart-down)) + (defun mc/prompt-for-inclusion-in-whitelist (original-command) "Asks the user, then adds the command either to the once-list or the all-list." (let ((all-p (y-or-n-p (format "Do %S for all cursors?" original-command)))) @@ -421,7 +633,7 @@ the original cursor, to inform about the lack of support." (unless mc--executing-command-for-fake-cursor (if (eq 1 (mc/num-cursors)) ;; no fake cursors? disable mc-mode - (multiple-cursors-mode 0) + (mc/disable-multiple-cursors-mode) (when this-original-command (let ((original-command (or mc--this-command (command-remapping this-original-command) @@ -475,7 +687,7 @@ you should disable multiple-cursors-mode." "Deactivate mark if there are any active, otherwise exit multiple-cursors-mode." (interactive) (if (not (use-region-p)) - (multiple-cursors-mode 0) + (mc/disable-multiple-cursors-mode) (deactivate-mark))) (defun mc/repeat-command () @@ -555,13 +767,16 @@ They are temporarily disabled when multiple-cursors are active.") `(" mc:" (:eval (format ,(propertize "%d" 'face 'font-lock-warning-face) (mc/num-cursors)))) "What to display in the mode line while multiple-cursors-mode is active." + :type '(sexp) :group 'multiple-cursors) (put 'mc/mode-line 'risky-local-variable t) ;;;###autoload (define-minor-mode multiple-cursors-mode "Mode while multiple cursors are active." - nil mc/mode-line mc/keymap + :init-value nil + :lighter mc/mode-line + :keymap mc/keymap (if multiple-cursors-mode (progn (mc/temporarily-disable-unsupported-minor-modes) @@ -576,13 +791,18 @@ They are temporarily disabled when multiple-cursors are active.") (mc/enable-temporarily-disabled-minor-modes) (run-hooks 'multiple-cursors-mode-disabled-hook))) -(add-hook 'after-revert-hook #'(lambda () (multiple-cursors-mode 0))) +(defun mc/disable-multiple-cursors-mode () + "Disable multiple-cursors-mode and run the corresponding hook." + (multiple-cursors-mode 0) + (run-hooks 'multiple-cursors-mode-disabled-hook)) + +(add-hook 'after-revert-hook 'mc/disable-multiple-cursors-mode) (defun mc/maybe-multiple-cursors-mode () "Enable multiple-cursors-mode if there is more than one currently active cursor." (if (> (mc/num-cursors) 1) (multiple-cursors-mode 1) - (multiple-cursors-mode 0))) + (mc/disable-multiple-cursors-mode))) (defmacro unsupported-cmd (cmd msg) "Adds command to list of unsupported commands and prevents it @@ -600,7 +820,7 @@ from being executed if in multiple-cursors-mode." ;; Make sure pastes from other programs are added to all kill-rings when yanking (defadvice current-kill (before interprogram-paste-for-all-cursors - (n &optional do-not-move) activate) + (n &optional do-not-move) activate) (let ((interprogram-paste (and (= n 0) interprogram-paste-function (funcall interprogram-paste-function)))) @@ -624,6 +844,20 @@ from being executed if in multiple-cursors-mode." (overlay-put cursor 'kill-ring kill-ring) (overlay-put cursor 'kill-ring-yank-pointer kill-ring-yank-pointer))))))) +(defadvice execute-extended-command (after execute-extended-command-for-all-cursors () activate) + (when multiple-cursors-mode + (unless (or mc/always-run-for-all + (not (symbolp this-command)) + (memq this-command mc/cmds-to-run-for-all) + (memq this-command mc/cmds-to-run-once) + (memq this-command mc--default-cmds-to-run-for-all) + (memq this-command mc--default-cmds-to-run-once)) + (mc/prompt-for-inclusion-in-whitelist this-command)) + (when (or mc/always-run-for-all + (memq this-command mc/cmds-to-run-for-all) + (memq this-command mc--default-cmds-to-run-for-all)) + (mc/execute-command-for-all-fake-cursors this-command)))) + (defcustom mc/list-file (locate-user-emacs-file ".mc-lists.el") "The position of the file that keeps track of your preferences for running commands with multiple cursors." @@ -666,184 +900,9 @@ for running commands with multiple cursors." (newline) (mc/dump-list 'mc/cmds-to-run-once))) -(defvar mc/cmds-to-run-once nil - "Commands to run only once in multiple-cursors-mode.") - -(defvar mc--default-cmds-to-run-once nil - "Default set of commands to run only once in multiple-cursors-mode.") - -(setq mc--default-cmds-to-run-once '(mc/edit-lines - mc/edit-ends-of-lines - mc/edit-beginnings-of-lines - mc/mark-next-like-this - mc/mark-next-like-this-word - mc/mark-next-like-this-symbol - mc/mark-next-word-like-this - mc/mark-next-symbol-like-this - mc/mark-previous-like-this - mc/mark-previous-like-this-word - mc/mark-previous-like-this-symbol - mc/mark-previous-word-like-this - mc/mark-previous-symbol-like-this - mc/mark-all-like-this - mc/mark-all-words-like-this - mc/mark-all-symbols-like-this - mc/mark-more-like-this-extended - mc/mark-all-like-this-in-defun - mc/mark-all-words-like-this-in-defun - mc/mark-all-symbols-like-this-in-defun - mc/mark-all-like-this-dwim - mc/mark-all-dwim - mc/mark-sgml-tag-pair - mc/insert-numbers - mc/insert-letters - mc/sort-regions - mc/reverse-regions - mc/cycle-forward - mc/cycle-backward - mc/add-cursor-on-click - mc/mark-pop - mc/add-cursors-to-all-matches - mc/mmlte--left - mc/mmlte--right - mc/mmlte--up - mc/mmlte--down - mc/unmark-next-like-this - mc/unmark-previous-like-this - mc/skip-to-next-like-this - mc/skip-to-previous-like-this - rrm/switch-to-multiple-cursors - mc-hide-unmatched-lines-mode - mc/repeat-command - hum/keyboard-quit - hum/unhide-invisible-overlays - save-buffer - ido-exit-minibuffer - ivy-done - exit-minibuffer - minibuffer-complete-and-exit - execute-extended-command - eval-expression - undo - redo - undo-tree-undo - undo-tree-redo - universal-argument - universal-argument-more - universal-argument-other-key - negative-argument - digit-argument - top-level - recenter-top-bottom - describe-mode - describe-key-1 - describe-function - describe-bindings - describe-prefix-bindings - view-echo-area-messages - other-window - kill-buffer-and-window - split-window-right - split-window-below - delete-other-windows - toggle-window-split - mwheel-scroll - scroll-up-command - scroll-down-command - mouse-set-point - mouse-drag-region - quit-window - toggle-read-only - windmove-left - windmove-right - windmove-up - windmove-down - repeat-complex-command)) - -(defvar mc--default-cmds-to-run-for-all nil - "Default set of commands that should be mirrored by all cursors") - -(setq mc--default-cmds-to-run-for-all '(mc/keyboard-quit - self-insert-command - quoted-insert - previous-line - next-line - newline - newline-and-indent - open-line - delete-blank-lines - transpose-chars - transpose-lines - transpose-paragraphs - transpose-regions - join-line - right-char - right-word - forward-char - forward-word - left-char - left-word - backward-char - backward-word - forward-paragraph - backward-paragraph - upcase-word - downcase-word - capitalize-word - forward-list - backward-list - hippie-expand - hippie-expand-lines - yank - yank-pop - append-next-kill - kill-word - kill-line - kill-whole-line - backward-kill-word - backward-delete-char-untabify - delete-char delete-forward-char - delete-backward-char - py-electric-backspace - c-electric-backspace - org-delete-backward-char - cperl-electric-backspace - python-indent-dedent-line-backspace - paredit-backward-delete - autopair-backspace - just-one-space - zap-to-char - end-of-line - set-mark-command - exchange-point-and-mark - cua-set-mark - cua-replace-region - cua-delete-region - move-end-of-line - beginning-of-line - move-beginning-of-line - kill-ring-save - back-to-indentation - subword-forward - subword-backward - subword-mark - subword-kill - subword-backward-kill - subword-transpose - subword-capitalize - subword-upcase - subword-downcase - er/expand-region - er/contract-region - smart-forward - smart-backward - smart-up - smart-down)) - -(defvar mc/cmds-to-run-for-all nil - "Commands to run for all cursors in multiple-cursors-mode") - (provide 'multiple-cursors-core) +(require 'mc-cycle-cursors) +(require 'mc-hide-unmatched-lines-mode) ;; Local Variables: ;; coding: utf-8 diff --git a/elpa/multiple-cursors-20230309.1204/multiple-cursors-pkg.el b/elpa/multiple-cursors-20230309.1204/multiple-cursors-pkg.el new file mode 100644 index 00000000..4a378b39 --- /dev/null +++ b/elpa/multiple-cursors-20230309.1204/multiple-cursors-pkg.el @@ -0,0 +1,12 @@ +(define-package "multiple-cursors" "20230309.1204" "Multiple cursors for Emacs." + '((cl-lib "0.5")) + :commit "6956e8e12ee191d7c80d042ae8ff495286fcbe38" :authors + '(("Magnar Sveen" . "magnars@gmail.com")) + :maintainer + '("Magnar Sveen" . "magnars@gmail.com") + :keywords + '("editing" "cursors") + :url "https://github.com/magnars/multiple-cursors.el") +;; Local Variables: +;; no-byte-compile: t +;; End: diff --git a/elpa/multiple-cursors-20191210.1759/multiple-cursors.el b/elpa/multiple-cursors-20230309.1204/multiple-cursors.el similarity index 98% rename from elpa/multiple-cursors-20191210.1759/multiple-cursors.el rename to elpa/multiple-cursors-20230309.1204/multiple-cursors.el index e78bab37..8c3e1481 100644 --- a/elpa/multiple-cursors-20191210.1759/multiple-cursors.el +++ b/elpa/multiple-cursors-20230309.1204/multiple-cursors.el @@ -5,6 +5,7 @@ ;; Author: Magnar Sveen ;; Version: 1.4.0 ;; Keywords: editing cursors +;; Homepage: https://github.com/magnars/multiple-cursors.el ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -152,7 +153,6 @@ ;; * isearch-forward and isearch-backward aren't supported with multiple cursors. ;; You should feel free to add a simplified version that can work with it. -;; * Commands run with `M-x` won't be repeated for all cursors. ;; * All key bindings that refer to lambdas are always run for all cursors. If you ;; need to limit it, you will have to give it a name. ;; * Redo might screw with your cursors. Undo works very well. @@ -191,12 +191,10 @@ :group 'editing) (require 'mc-edit-lines) -(require 'mc-cycle-cursors) (require 'mc-mark-more) (require 'mc-mark-pop) (require 'rectangular-region-mode) (require 'mc-separate-operations) -(require 'mc-hide-unmatched-lines-mode) (provide 'multiple-cursors) diff --git a/elpa/multiple-cursors-20191210.1759/rectangular-region-mode.el b/elpa/multiple-cursors-20230309.1204/rectangular-region-mode.el similarity index 95% rename from elpa/multiple-cursors-20191210.1759/rectangular-region-mode.el rename to elpa/multiple-cursors-20230309.1204/rectangular-region-mode.el index d8051cca..e4683cfa 100644 --- a/elpa/multiple-cursors-20191210.1759/rectangular-region-mode.el +++ b/elpa/multiple-cursors-20230309.1204/rectangular-region-mode.el @@ -52,8 +52,9 @@ (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." +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)) @@ -111,7 +112,9 @@ an exceedingly quick way of adding multiple cursors to multiple lines." ;;;###autoload (define-minor-mode rectangular-region-mode "A mode for creating a rectangular region to edit" - nil " rr" rectangular-region-mode-map + :init-value nil + :lighter " rr" + :keymap rectangular-region-mode-map (if rectangular-region-mode (progn (add-hook 'after-change-functions 'rrm/switch-to-multiple-cursors t t) -- 2.47.3