From 9ae47943dc6cdf2853cc94a08ee49dc5cae7cd22 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Sun, 22 Dec 2024 13:10:06 +0100 Subject: [PATCH] update multiple-cursors Signed-off-by: Andreas Gerler --- .../multiple-cursors-pkg.el | 12 - .../mc-cycle-cursors.el | 0 .../mc-edit-lines.el | 0 .../mc-hide-unmatched-lines-mode.el | 0 .../mc-mark-more.el | 27 +- .../mc-mark-pop.el | 0 .../mc-separate-operations.el | 0 .../multiple-cursors-autoloads.el | 231 +++++++----------- .../multiple-cursors-core.el | 48 ++-- .../multiple-cursors-pkg.el | 10 + .../multiple-cursors.el | 3 +- .../rectangular-region-mode.el | 0 elpa/multiple-cursors-readme.txt | 162 ------------ 13 files changed, 132 insertions(+), 361 deletions(-) delete mode 100644 elpa/multiple-cursors-20230309.1204/multiple-cursors-pkg.el rename elpa/{multiple-cursors-20230309.1204 => multiple-cursors-20241201.1841}/mc-cycle-cursors.el (100%) rename elpa/{multiple-cursors-20230309.1204 => multiple-cursors-20241201.1841}/mc-edit-lines.el (100%) rename elpa/{multiple-cursors-20230309.1204 => multiple-cursors-20241201.1841}/mc-hide-unmatched-lines-mode.el (100%) rename elpa/{multiple-cursors-20230309.1204 => multiple-cursors-20241201.1841}/mc-mark-more.el (98%) rename elpa/{multiple-cursors-20230309.1204 => multiple-cursors-20241201.1841}/mc-mark-pop.el (100%) rename elpa/{multiple-cursors-20230309.1204 => multiple-cursors-20241201.1841}/mc-separate-operations.el (100%) rename elpa/{multiple-cursors-20230309.1204 => multiple-cursors-20241201.1841}/multiple-cursors-autoloads.el (74%) rename elpa/{multiple-cursors-20230309.1204 => multiple-cursors-20241201.1841}/multiple-cursors-core.el (97%) create mode 100644 elpa/multiple-cursors-20241201.1841/multiple-cursors-pkg.el rename elpa/{multiple-cursors-20230309.1204 => multiple-cursors-20241201.1841}/multiple-cursors.el (99%) rename elpa/{multiple-cursors-20230309.1204 => multiple-cursors-20241201.1841}/rectangular-region-mode.el (100%) delete mode 100644 elpa/multiple-cursors-readme.txt diff --git a/elpa/multiple-cursors-20230309.1204/multiple-cursors-pkg.el b/elpa/multiple-cursors-20230309.1204/multiple-cursors-pkg.el deleted file mode 100644 index 4a378b39..00000000 --- a/elpa/multiple-cursors-20230309.1204/multiple-cursors-pkg.el +++ /dev/null @@ -1,12 +0,0 @@ -(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-20230309.1204/mc-cycle-cursors.el b/elpa/multiple-cursors-20241201.1841/mc-cycle-cursors.el similarity index 100% rename from elpa/multiple-cursors-20230309.1204/mc-cycle-cursors.el rename to elpa/multiple-cursors-20241201.1841/mc-cycle-cursors.el diff --git a/elpa/multiple-cursors-20230309.1204/mc-edit-lines.el b/elpa/multiple-cursors-20241201.1841/mc-edit-lines.el similarity index 100% rename from elpa/multiple-cursors-20230309.1204/mc-edit-lines.el rename to elpa/multiple-cursors-20241201.1841/mc-edit-lines.el diff --git a/elpa/multiple-cursors-20230309.1204/mc-hide-unmatched-lines-mode.el b/elpa/multiple-cursors-20241201.1841/mc-hide-unmatched-lines-mode.el similarity index 100% rename from elpa/multiple-cursors-20230309.1204/mc-hide-unmatched-lines-mode.el rename to elpa/multiple-cursors-20241201.1841/mc-hide-unmatched-lines-mode.el diff --git a/elpa/multiple-cursors-20230309.1204/mc-mark-more.el b/elpa/multiple-cursors-20241201.1841/mc-mark-more.el similarity index 98% rename from elpa/multiple-cursors-20230309.1204/mc-mark-more.el rename to elpa/multiple-cursors-20241201.1841/mc-mark-more.el index e4a141e3..51f867e9 100644 --- a/elpa/multiple-cursors-20230309.1204/mc-mark-more.el +++ b/elpa/multiple-cursors-20241201.1841/mc-mark-more.el @@ -29,6 +29,7 @@ (require 'multiple-cursors-core) (require 'thingatpt) +(require 'sgml-mode) (defun mc/cursor-end (cursor) (if (overlay-get cursor 'mark-active) @@ -96,8 +97,8 @@ to (point)), or nil." "How should mc/mark-more-* search for more matches? Match everything: nil -Match only whole words: 'words -Match only whole symbols: 'symbols +Match only whole words: \\='words +Match only whole symbols: \\='symbols Use like case-fold-search, don't recommend setting it globally.") @@ -497,20 +498,27 @@ remove the keymap depends on user input and KEEP-PRED: (push alist emulation-mode-map-alists)))) +(defvar mc/mark-more-like-this-extended-keymap (make-sparse-keymap)) + +(define-key mc/mark-more-like-this-extended-keymap (kbd "") 'mc/mmlte--up) +(define-key mc/mark-more-like-this-extended-keymap (kbd "") 'mc/mmlte--down) +(define-key mc/mark-more-like-this-extended-keymap (kbd "") 'mc/mmlte--left) +(define-key mc/mark-more-like-this-extended-keymap (kbd "") 'mc/mmlte--right) + ;;;###autoload (defun mc/mark-more-like-this-extended () "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 - Mark next like this and set direction to 'down + Mark previous like this and set direction to \\='up + Mark next like this and set direction to \\='down -If direction is 'up: +If direction is \\='up: Skip past the cursor furthest up Remove the cursor furthest up -If direction is 'down: +If direction is \\='down: Remove the cursor furthest down Skip past the cursor furthest down @@ -558,13 +566,6 @@ are we working on the next or previous cursors?") (mc/skip-to-next-like-this)) (mc/mmlte--message)) -(defvar mc/mark-more-like-this-extended-keymap (make-sparse-keymap)) - -(define-key mc/mark-more-like-this-extended-keymap (kbd "") 'mc/mmlte--up) -(define-key mc/mark-more-like-this-extended-keymap (kbd "") 'mc/mmlte--down) -(define-key mc/mark-more-like-this-extended-keymap (kbd "") 'mc/mmlte--left) -(define-key mc/mark-more-like-this-extended-keymap (kbd "") 'mc/mmlte--right) - (defvar mc--restrict-mark-all-to-symbols nil) ;;;###autoload diff --git a/elpa/multiple-cursors-20230309.1204/mc-mark-pop.el b/elpa/multiple-cursors-20241201.1841/mc-mark-pop.el similarity index 100% rename from elpa/multiple-cursors-20230309.1204/mc-mark-pop.el rename to elpa/multiple-cursors-20241201.1841/mc-mark-pop.el diff --git a/elpa/multiple-cursors-20230309.1204/mc-separate-operations.el b/elpa/multiple-cursors-20241201.1841/mc-separate-operations.el similarity index 100% rename from elpa/multiple-cursors-20230309.1204/mc-separate-operations.el rename to elpa/multiple-cursors-20241201.1841/mc-separate-operations.el diff --git a/elpa/multiple-cursors-20230309.1204/multiple-cursors-autoloads.el b/elpa/multiple-cursors-20241201.1841/multiple-cursors-autoloads.el similarity index 74% rename from elpa/multiple-cursors-20230309.1204/multiple-cursors-autoloads.el rename to elpa/multiple-cursors-20241201.1841/multiple-cursors-autoloads.el index 35f90fba..41e78974 100644 --- a/elpa/multiple-cursors-20230309.1204/multiple-cursors-autoloads.el +++ b/elpa/multiple-cursors-20241201.1841/multiple-cursors-autoloads.el @@ -1,20 +1,19 @@ -;;; multiple-cursors-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*- -;; +;;; multiple-cursors-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*- +;; Generated by the `loaddefs-generate' function. + +;; This file is part of GNU Emacs. + ;;; Code: -(add-to-list 'load-path (directory-file-name - (or (file-name-directory #$) (car load-path)))) +(add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path))) + -;;;### (autoloads nil "mc-cycle-cursors" "mc-cycle-cursors.el" (0 -;;;;;; 0 0 0)) ;;; Generated autoloads from mc-cycle-cursors.el (register-definition-prefixes "mc-cycle-cursors" '("mc/")) -;;;*** -;;;### (autoloads nil "mc-edit-lines" "mc-edit-lines.el" (0 0 0 0)) ;;; Generated autoloads from mc-edit-lines.el (autoload 'mc/edit-lines "mc-edit-lines" "\ @@ -29,24 +28,19 @@ 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. -\(fn &optional ARG)" t nil) - +(fn &optional ARG)" t) (autoload 'mc/edit-ends-of-lines "mc-edit-lines" "\ -Add one cursor to the end of each line in the active region." t nil) - +Add one cursor to the end of each line in the active region." t) (autoload 'mc/edit-beginnings-of-lines "mc-edit-lines" "\ -Add one cursor to the beginning of each line in the active region." t nil) - +Add one cursor to the beginning of each line in the active region." t) (register-definition-prefixes "mc-edit-lines" '("mc/edit-lines-empty-lines")) -;;;*** -;;;### (autoloads nil "mc-hide-unmatched-lines-mode" "mc-hide-unmatched-lines-mode.el" -;;;;;; (0 0 0 0)) ;;; Generated autoloads from mc-hide-unmatched-lines-mode.el (autoload 'mc-hide-unmatched-lines-mode "mc-hide-unmatched-lines-mode" "\ Minor mode when enabled hides all lines where no cursors (and + 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 @@ -54,26 +48,23 @@ 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. +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. +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'. +evaluate the variable `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) +The mode's hook is called both when the mode is enabled and when it is +disabled. +(fn &optional ARG)" t) (register-definition-prefixes "mc-hide-unmatched-lines-mode" '("hum/")) -;;;*** -;;;### (autoloads nil "mc-mark-more" "mc-mark-more.el" (0 0 0 0)) ;;; Generated autoloads from mc-mark-more.el (autoload 'mc/mark-next-like-this "mc-mark-more" "\ @@ -82,16 +73,14 @@ 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) - +(fn ARG)" t) (autoload 'mc/mark-next-like-this-word "mc-mark-more" "\ Find and mark the next part of the buffer matching the currently active region If no region is active, mark the word at the point and find the next match With negative ARG, delete the last one instead. With zero ARG, skip the last one and mark next. -\(fn ARG)" t nil) - +(fn ARG)" t) (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 @@ -99,8 +88,7 @@ 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) - +(fn ARG)" t) (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 @@ -108,8 +96,7 @@ 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) - +(fn ARG)" t) (autoload 'mc/mark-previous-like-this "mc-mark-more" "\ Find and mark the previous part of the buffer matching the currently active region. @@ -120,8 +107,7 @@ With negative ARG, delete the last one instead. With zero ARG, skip the last one and mark next. -\(fn ARG)" t nil) - +(fn ARG)" t) (autoload 'mc/mark-previous-like-this-word "mc-mark-more" "\ Find and mark the previous part of the buffer matching the currently active region. @@ -133,8 +119,7 @@ With negative ARG, delete the last one instead. With zero ARG, skip the last one and mark previous. -\(fn ARG)" t nil) - +(fn ARG)" t) (autoload 'mc/mark-previous-word-like-this "mc-mark-more" "\ Find and mark the previous part of the buffer matching the currently active region. @@ -147,8 +132,7 @@ With negative ARG, delete the last one instead. With zero ARG, skip the last one and mark next. -\(fn ARG)" t nil) - +(fn ARG)" t) (autoload 'mc/mark-previous-symbol-like-this "mc-mark-more" "\ Find and mark the previous part of the buffer matching the currently active region. @@ -161,77 +145,63 @@ With negative ARG, delete the last one instead. With zero ARG, skip the last one and mark next. -\(fn ARG)" t nil) - +(fn ARG)" t) (autoload 'mc/mark-next-lines "mc-mark-more" "\ -\(fn ARG)" t nil) - +(fn ARG)" t) (autoload 'mc/mark-previous-lines "mc-mark-more" "\ -\(fn ARG)" t nil) - +(fn ARG)" t) (autoload 'mc/unmark-next-like-this "mc-mark-more" "\ -Deselect next part of the buffer matching the currently active region." t nil) - +Deselect next part of the buffer matching the currently active region." t) (autoload 'mc/unmark-previous-like-this "mc-mark-more" "\ -Deselect prev part of the buffer matching the currently active region." t nil) - +Deselect prev part of the buffer matching the currently active region." t) (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." t nil) - +matching the currently active region." t) (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." t nil) - +matching the currently active region." t) (autoload 'mc/mark-all-like-this "mc-mark-more" "\ -Find and mark all the parts of the buffer matching the currently active region" t nil) - -(autoload 'mc/mark-all-words-like-this "mc-mark-more" nil t nil) - -(autoload 'mc/mark-all-symbols-like-this "mc-mark-more" nil t nil) - +Find and mark all the parts of the buffer matching the currently active region" t) +(autoload 'mc/mark-all-words-like-this "mc-mark-more" nil t) +(autoload 'mc/mark-all-symbols-like-this "mc-mark-more" nil t) (autoload 'mc/mark-all-in-region "mc-mark-more" "\ Find and mark all the parts in the region matching the given search -\(fn BEG END &optional SEARCH)" t nil) - +(fn BEG END &optional SEARCH)" t) (autoload 'mc/mark-all-in-region-regexp "mc-mark-more" "\ Find and mark all the parts in the region matching the given regexp. -\(fn BEG END)" t nil) - +(fn BEG END)" t) (autoload 'mc/mark-more-like-this-extended "mc-mark-more" "\ 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 - Mark next like this and set direction to 'down + Mark previous like this and set direction to \\='up + Mark next like this and set direction to \\='down -If direction is 'up: +If direction is \\='up: Skip past the cursor furthest up Remove the cursor furthest up -If direction is 'down: +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'." t nil) - +See `mc/mark-more-like-this-extended-keymap'." t) (autoload 'mc/mark-all-like-this-dwim "mc-mark-more" "\ Tries to guess what you want to mark all of. Can be pressed multiple times to increase selection. With prefix, it behaves the same as original `mc/mark-all-like-this' -\(fn ARG)" t nil) - +(fn ARG)" t) (autoload 'mc/mark-all-dwim "mc-mark-more" "\ Tries even harder to guess what you want to mark all of. @@ -242,111 +212,84 @@ as if `mc/mark-all-in-region'. With the prefix ARG, it will call If the region is inactive or on a single line, it will behave like `mc/mark-all-like-this-dwim'. -\(fn ARG)" t nil) - +(fn ARG)" t) (autoload 'mc/mark-all-like-this-in-defun "mc-mark-more" "\ -Mark all like this in defun." t nil) - +Mark all like this in defun." t) (autoload 'mc/mark-all-words-like-this-in-defun "mc-mark-more" "\ -Mark all words like this in defun." t nil) - +Mark all words like this in defun." t) (autoload 'mc/mark-all-symbols-like-this-in-defun "mc-mark-more" "\ -Mark all symbols like this in defun." t nil) - +Mark all symbols like this in defun." t) (autoload 'mc/toggle-cursor-on-click "mc-mark-more" "\ Add a cursor where you click, or remove a fake cursor that is already there. -\(fn EVENT)" t nil) - +(fn EVENT)" t) (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." t nil) - +Mark the tag we're in and its pair for renaming." t) (register-definition-prefixes "mc-mark-more" '("mc--" "mc/")) -;;;*** -;;;### (autoloads nil "mc-mark-pop" "mc-mark-pop.el" (0 0 0 0)) ;;; Generated autoloads from mc-mark-pop.el (autoload 'mc/mark-pop "mc-mark-pop" "\ Add a cursor at the current point, pop off mark ring and jump -to the popped mark." t nil) +to the popped mark." t) -;;;*** -;;;### (autoloads nil "mc-separate-operations" "mc-separate-operations.el" -;;;;;; (0 0 0 0)) ;;; Generated autoloads from mc-separate-operations.el (autoload 'mc/insert-numbers "mc-separate-operations" "\ Insert increasing numbers for each cursor, starting at `mc/insert-numbers-default' or ARG. -\(fn ARG)" t nil) - +(fn ARG)" t) (autoload 'mc/insert-letters "mc-separate-operations" "\ Insert increasing letters for each cursor, starting at 0 or ARG. Where letter[0]=a letter[2]=c letter[26]=aa -\(fn ARG)" t nil) - -(autoload 'mc/reverse-regions "mc-separate-operations" nil t nil) - -(autoload 'mc/sort-regions "mc-separate-operations" nil t nil) - +(fn ARG)" t) +(autoload 'mc/reverse-regions "mc-separate-operations" nil t) +(autoload 'mc/sort-regions "mc-separate-operations" nil t) (autoload 'mc/vertical-align "mc-separate-operations" "\ Aligns all cursors vertically with a given CHARACTER to the one with the highest column number (the rightest). Might not behave as intended if more than one cursors are on the same line. -\(fn CHARACTER)" t nil) - +(fn CHARACTER)" t) (autoload 'mc/vertical-align-with-space "mc-separate-operations" "\ -Aligns all cursors with whitespace like `mc/vertical-align' does" t nil) - +Aligns all cursors with whitespace like `mc/vertical-align' does" t) (register-definition-prefixes "mc-separate-operations" '("mc--" "mc/insert-numbers-default")) -;;;*** -;;;### (autoloads nil "multiple-cursors-core" "multiple-cursors-core.el" -;;;;;; (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) - +(fn ID)") (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. +`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. +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. +evaluate the variable `multiple-cursors-mode'. -\(fn &optional ARG)" t nil) +The mode's hook is called both when the mode is enabled and when it is +disabled. -(register-definition-prefixes "multiple-cursors-core" '("deactivate-cursor-after-undo" "multiple-cursors-mode" "unsupported-cmd")) +(fn &optional ARG)" t) +(register-definition-prefixes "multiple-cursors-core" '("deactivate-cursor-after-undo" "mc--" "mc/" "unsupported-cmd")) -;;;*** -;;;### (autoloads nil "rectangular-region-mode" "rectangular-region-mode.el" -;;;;;; (0 0 0 0)) ;;; Generated autoloads from rectangular-region-mode.el (autoload 'set-rectangular-region-anchor "rectangular-region-mode" "\ @@ -354,41 +297,37 @@ 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." t nil) - +multiple cursors to multiple lines." t) (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. +`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. +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. +evaluate the variable `rectangular-region-mode'. -\(fn &optional ARG)" t nil) +The mode's hook is called both when the mode is enabled and when it is +disabled. +(fn &optional ARG)" t) (register-definition-prefixes "rectangular-region-mode" '("rectangular-region-mode" "rrm/")) - -;;;*** -;;;### (autoloads nil nil ("multiple-cursors-pkg.el" "multiple-cursors.el") -;;;;;; (0 0 0 0)) +;;; End of scraped data + +(provide 'multiple-cursors-autoloads) -;;;*** - ;; Local Variables: ;; version-control: never ;; no-byte-compile: t ;; no-update-autoloads: t -;; coding: utf-8 +;; no-native-compile: t +;; coding: utf-8-emacs-unix ;; End: + ;;; multiple-cursors-autoloads.el ends here diff --git a/elpa/multiple-cursors-20230309.1204/multiple-cursors-core.el b/elpa/multiple-cursors-20241201.1841/multiple-cursors-core.el similarity index 97% rename from elpa/multiple-cursors-20230309.1204/multiple-cursors-core.el rename to elpa/multiple-cursors-20241201.1841/multiple-cursors-core.el index 3d48684a..2ce92ac1 100644 --- a/elpa/multiple-cursors-20230309.1204/multiple-cursors-core.el +++ b/elpa/multiple-cursors-20241201.1841/multiple-cursors-core.el @@ -28,8 +28,6 @@ (require 'cl-lib) (require 'rect) -(defvar mc--read-char) - (defface mc/cursor-face '((t (:inverse-video t))) "The face used for fake cursors" @@ -52,11 +50,6 @@ 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" @@ -326,34 +319,35 @@ cursor with updated info." ;; Intercept some reading commands so you won't have to ;; answer them for every single cursor -(defvar multiple-cursors-mode nil) +(defvar mc--input-function-cache nil) (defun mc--reset-read-prompts () - (mapc (lambda (var) (set var nil)) - mc--reset-read-variables)) + (setq mc--input-function-cache nil)) -(defmacro mc--cache-input-function (fn-name) +(defmacro mc--cache-input-function (fn-name args-cache-key-fn) "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." +caches will be reset by mc--reset-read-prompts. ARGS-CACHE-KEY-FN +should transform FN-NAME's args to a unique cache-key so that +different calls to FN-NAME during a command can return multiple +values." (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) + (if (not (bound-and-true-p 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) + (let* ((cache-key (cons ,(symbol-name fn-name) (,args-cache-key-fn args))) + (cached-value (assoc cache-key mc--input-function-cache)) + (return-value (if cached-value (cdr cached-value) (apply orig-fun args)))) + (unless cached-value + (push (cons cache-key return-value) mc--input-function-cache)) + return-value))) + (advice-add ',fn-name :around #',mc-name)))) + +(mc--cache-input-function read-char car) +(mc--cache-input-function read-quoted-char car) +(mc--cache-input-function register-read-with-preview car) ; used by insert-register +(mc--cache-input-function read-char-from-minibuffer car) ; used by zap-to-char (defun mc/fake-cursor-p (o) "Predicate to check if an overlay is a fake cursor" @@ -749,7 +743,7 @@ They are temporarily disabled when multiple-cursors are active.") (defun mc/temporarily-disable-minor-mode (mode) "If MODE is available and turned on, remember that and turn it off." - (when (and (boundp mode) (eval mode)) + (when (and (boundp mode) (symbol-value mode)) (add-to-list 'mc/temporarily-disabled-minor-modes mode) (funcall mode -1))) diff --git a/elpa/multiple-cursors-20241201.1841/multiple-cursors-pkg.el b/elpa/multiple-cursors-20241201.1841/multiple-cursors-pkg.el new file mode 100644 index 00000000..8a40604a --- /dev/null +++ b/elpa/multiple-cursors-20241201.1841/multiple-cursors-pkg.el @@ -0,0 +1,10 @@ +;; -*- no-byte-compile: t; lexical-binding: nil -*- +(define-package "multiple-cursors" "20241201.1841" + "Multiple cursors for Emacs." + '((cl-lib "0.5")) + :url "https://github.com/magnars/multiple-cursors.el" + :commit "46635e7f693560213b56ca8eca1adb13559672e5" + :revdesc "46635e7f6935" + :keywords '("editing" "cursors") + :authors '(("Magnar Sveen" . "magnars@gmail.com")) + :maintainers '(("Magnar Sveen" . "magnars@gmail.com"))) diff --git a/elpa/multiple-cursors-20230309.1204/multiple-cursors.el b/elpa/multiple-cursors-20241201.1841/multiple-cursors.el similarity index 99% rename from elpa/multiple-cursors-20230309.1204/multiple-cursors.el rename to elpa/multiple-cursors-20241201.1841/multiple-cursors.el index 8c3e1481..f9160a95 100644 --- a/elpa/multiple-cursors-20230309.1204/multiple-cursors.el +++ b/elpa/multiple-cursors-20241201.1841/multiple-cursors.el @@ -3,7 +3,8 @@ ;; Copyright (C) 2012-2016 Magnar Sveen ;; Author: Magnar Sveen -;; Version: 1.4.0 +;; Package-Version: 20241201.1841 +;; Package-Revision: 46635e7f6935 ;; Keywords: editing cursors ;; Homepage: https://github.com/magnars/multiple-cursors.el diff --git a/elpa/multiple-cursors-20230309.1204/rectangular-region-mode.el b/elpa/multiple-cursors-20241201.1841/rectangular-region-mode.el similarity index 100% rename from elpa/multiple-cursors-20230309.1204/rectangular-region-mode.el rename to elpa/multiple-cursors-20241201.1841/rectangular-region-mode.el diff --git a/elpa/multiple-cursors-readme.txt b/elpa/multiple-cursors-readme.txt deleted file mode 100644 index a537db1a..00000000 --- a/elpa/multiple-cursors-readme.txt +++ /dev/null @@ -1,162 +0,0 @@ -Multiple cursors for Emacs. This is some pretty crazy functionality, so yes, -there are kinks. Don't be afraid though, I've been using it since 2011 with -great success and much merriment. - -## Basic usage - -Start out with: - - (require 'multiple-cursors) - -Then you have to set up your keybindings - multiple-cursors doesn't presume to -know how you'd like them laid out. Here are some examples: - -When you have an active region that spans multiple lines, the following will -add a cursor to each line: - - (global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines) - -When you want to add multiple cursors not based on continuous lines, but based on -keywords in the buffer, use: - - (global-set-key (kbd "C->") 'mc/mark-next-like-this) - (global-set-key (kbd "C-<") 'mc/mark-previous-like-this) - (global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this) - -First mark the word, then add more cursors. - -To get out of multiple-cursors-mode, press `` or `C-g`. The latter will -first disable multiple regions before disabling multiple cursors. If you want to -insert a newline in multiple-cursors-mode, use `C-j`. - -## Video - -You can [watch an intro to multiple-cursors at Emacs Rocks](http://emacsrocks.com/e13.html). - -## Command overview - -### Mark one more occurrence - - - `mc/mark-next-like-this`: Adds a cursor and region at the next part of the buffer forwards that matches the current region. - - `mc/mark-next-like-this-word`: Adds a cursor and region at the next part of the buffer forwards that matches the current region, if no region is selected it selects the word at the point. - - `mc/mark-next-like-this-symbol`: Adds a cursor and region at the next part of the buffer forwards that matches the current region, if no region is selected it selects the symbol at the point. - - `mc/mark-next-word-like-this`: Like `mc/mark-next-like-this` but only for whole words. - - `mc/mark-next-symbol-like-this`: Like `mc/mark-next-like-this` but only for whole symbols. - - `mc/mark-previous-like-this`: Adds a cursor and region at the next part of the buffer backwards that matches the current region. - - `mc/mark-previous-word-like-this`: Like `mc/mark-previous-like-this` but only for whole words. - - `mc/mark-previous-symbol-like-this`: Like `mc/mark-previous-like-this` but only for whole symbols. - - `mc/mark-more-like-this-extended`: Use arrow keys to quickly mark/skip next/previous occurrences. - - `mc/add-cursor-on-click`: Bind to a mouse event to add cursors by clicking. See tips-section. - -### Mark many occurrences - - - `mc/mark-all-like-this`: Marks all parts of the buffer that matches the current region. - - `mc/mark-all-words-like-this`: Like `mc/mark-all-like-this` but only for whole words. - - `mc/mark-all-symbols-like-this`: Like `mc/mark-all-like-this` but only for whole symbols. - - `mc/mark-all-in-region`: Prompts for a string to match in the region, adding cursors to all of them. - - `mc/mark-all-like-this-in-defun`: Marks all parts of the current defun that matches the current region. - - `mc/mark-all-words-like-this-in-defun`: Like `mc/mark-all-like-this-in-defun` but only for whole words. - - `mc/mark-all-symbols-like-this-in-defun`: Like `mc/mark-all-like-this-in-defun` but only for whole symbols. - - `mc/mark-all-like-this-dwim`: Tries to be smart about marking everything you want. Can be pressed multiple times. - -### Special - - - `set-rectangular-region-anchor`: Think of this one as `set-mark` except you're marking a rectangular region. - - `mc/mark-sgml-tag-pair`: Mark the current opening and closing tag. - - `mc/insert-numbers`: Insert increasing numbers for each cursor, top to bottom. - - `mc/insert-letters`: Insert increasing letters for each cursor, top to bottom. - - `mc/sort-regions`: Sort the marked regions alphabetically. - - `mc/reverse-regions`: Reverse the order of the marked regions. - -## Tips and tricks - -- To get out of multiple-cursors-mode, press `` or `C-g`. The latter will - first disable multiple regions before disabling multiple cursors. If you want to - insert a newline in multiple-cursors-mode, use `C-j`. - -- Sometimes you end up with cursors outside of your view. You can - scroll the screen to center on each cursor with `C-v` and `M-v`. - -- Try pressing `mc/mark-next-like-this` with no region selected. It will just add a cursor - on the next line. - -- Try pressing `mc/mark-next-like-this-word` or - `mc/mark-next-like-this-symbol` with no region selected. It will - mark the symbol and add a cursor at the next occurrence - -- Try pressing `mc/mark-all-like-this-dwim` on a tagname in html-mode. - -- Notice that the number of cursors active can be seen in the modeline. - -- If you get out of multiple-cursors-mode and yank - it will yank only - from the kill-ring of main cursor. To yank from the kill-rings of - every cursor use yank-rectangle, normally found at C-x r y. - -- You can use `mc/reverse-regions` with nothing selected and just one cursor. - It will then flip the sexp at point and the one below it. - -- If you would like to keep the global bindings clean, and get custom keybindings - when the region is active, you can try [region-bindings-mode](https://github.com/fgallina/region-bindings-mode). - -BTW, I highly recommend adding `mc/mark-next-like-this` to a key binding that's -right next to the key for `er/expand-region`. - -### Binding mouse events - -To override a mouse event, you will likely have to also unbind the -`down-mouse` part of the event. Like this: - - (global-unset-key (kbd "M-")) - (global-set-key (kbd "M-") 'mc/add-cursor-on-click) - -Or you can do like me and find an unused, but less convenient, binding: - - (global-set-key (kbd "C-S-") 'mc/add-cursor-on-click) - -## Unknown commands - -Multiple-cursors uses two lists of commands to know what to do: the run-once list -and the run-for-all list. It comes with a set of defaults, but it would be beyond silly -to try and include all the known Emacs commands. - -So that's why multiple-cursors occasionally asks what to do about a command. It will -then remember your choice by saving it in `~/.emacs.d/.mc-lists.el`. You can change -the location with: - - (setq mc/list-file "/my/preferred/file") - -## Known limitations - -* 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. - -## Contribute - -Yes, please do. There's a suite of tests, so remember to add tests for your -specific feature, or I might break it later. - -You'll find the repo at: - - https://github.com/magnars/multiple-cursors.el - -To fetch the test dependencies: - - $ cd /path/to/multiple-cursors - $ git submodule update --init - -Run the tests with: - - $ ./util/ecukes/ecukes --graphical - -## Contributors - -* [Takafumi Arakaki](https://github.com/tkf) made .mc-lists.el diff friendly -* [Marco Baringer](https://github.com/segv) contributed looping to mc/cycle and adding cursors without region for mark-more. -* [Ivan Andrus](https://github.com/gvol) added showing number of cursors in mode-line -* [Fuco](https://github.com/Fuco1) added the first version of `mc/mark-all-like-this-dwim` - -Thanks! -- 2.47.3