[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/multiple-cursors 68dfa46 271/434: Merge pull request #109
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/multiple-cursors 68dfa46 271/434: Merge pull request #109 from mathrick/fix-mark-all-in-region-hang |
Date: |
Sat, 7 Aug 2021 09:20:40 -0400 (EDT) |
branch: elpa/multiple-cursors
commit 68dfa461f1fe2ad45728f8631d8492139a6c203b
Merge: d8c5227 a86daa7
Author: Magnar Sveen <magnars@gmail.com>
Commit: Magnar Sveen <magnars@gmail.com>
Merge pull request #109 from mathrick/fix-mark-all-in-region-hang
Guard against empty search pattern in 'mc/mark-all-in-region', otherwise...
---
mc-mark-more.el | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/mc-mark-more.el b/mc-mark-more.el
index 7e240a1..627b401 100644
--- a/mc-mark-more.el
+++ b/mc-mark-more.el
@@ -268,18 +268,21 @@ With zero ARG, skip the last one and mark next."
(interactive "r")
(let ((search (read-from-minibuffer "Mark all in region: "))
(case-fold-search nil))
- (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)))
+ (if (string= search "")
+ (message "Mark aborted")
+ (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))))))
(when (not (fboundp 'set-temporary-overlay-map))
;; Backport this function from newer emacs versions
- [nongnu] elpa/multiple-cursors f721308 179/434: Tweak mc/mark-all-like-this-dwim and add tests, (continued)
- [nongnu] elpa/multiple-cursors f721308 179/434: Tweak mc/mark-all-like-this-dwim and add tests, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 5190e0c 206/434: Add test case for shift-select-mode, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 07b8808 195/434: Merge pull request #43 from purcell/travis-script, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 373dcbe 218/434: Add a scenario for mc/mark-all-symbols-like-this, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 8b91e47 231/434: Add py-electric-backspace to run-for-all list, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 39f1725 248/434: Add support for god-mode, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors a374031 257/434: Add gnu repo to Cask, which is needed for cl-lib on Emacs <24.3, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 5e879f9 261/434: Guard against empty search pattern in 'mc/mark-all-in-region', otherwise it will enter an infinite loop, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors af66635 264/434: Make 'mc/mark-all-dwim' into 'mc/edit-lines' if prefix arg is passed, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 45ed43e 265/434: Test edit-lines functionality in 'mc/mark-all-dwim', ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 68dfa46 271/434: Merge pull request #109 from mathrick/fix-mark-all-in-region-hang,
ELPA Syncer <=
- [nongnu] elpa/multiple-cursors 65c0c0c 275/434: Merge pull request #104 from mathrick/mark-all-dwim, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors d17c89e 276/434: Release 1.3.0, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors ad79ad8 273/434: Mention only 'mc/mark-all-dwim' in README to prevent confusing redundancy, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 54e408f 279/434: Update README.md, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors aed5d59 287/434: fix compilation warnings (#66), ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 00aea4c 289/434: Show appropriate error messages on trying skipping/unmarking commands with no fake cursors, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors b3fd49c 306/434: Revert "Change file load timing", ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 38d6013 307/434: Merge pull request #156 from magnars/revert-152-master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 49fe803 316/434: Merge pull request #163 from Silex/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 7cf6374 326/434: Typo fixo., ELPA Syncer, 2021/08/07