[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/multiple-cursors 8dfe725 269/434: Abort immediately when e
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/multiple-cursors 8dfe725 269/434: Abort immediately when empty search pattern is passed to 'mc/mark-all-in-region' |
Date: |
Sat, 7 Aug 2021 09:20:40 -0400 (EDT) |
branch: elpa/multiple-cursors
commit 8dfe725c4f9684e295b96f2820372766317d53fe
Author: Maciej Katafiasz <mathrick@gmail.com>
Commit: Maciej Katafiasz <mathrick@gmail.com>
Abort immediately when empty search pattern is passed to
'mc/mark-all-in-region'
---
mc-mark-more.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/mc-mark-more.el b/mc-mark-more.el
index 22110c6..e84d614 100644
--- a/mc-mark-more.el
+++ b/mc-mark-more.el
@@ -263,15 +263,16 @@ With zero ARG, skip the last one and mark next."
(mc/mark-all-like-this)))
;;;###autoload
-(defun mc/mark-all-in-region (beg end)
+(defun* mc/mark-all-in-region (beg end)
"Find and mark all the parts in the region matching the given search"
(interactive "r")
(let ((search (read-from-minibuffer "Mark all in region: "))
(case-fold-search nil))
+ (when (string= search "")
+ (return-from mc/mark-all-in-region nil))
(mc/remove-fake-cursors)
(goto-char beg)
- (while (and (not (string= search ""))
- (search-forward search end t))
+ (while (search-forward search end t)
(push-mark (match-beginning 0))
(mc/create-fake-cursor-at-point))
(let ((first (mc/furthest-cursor-before-point)))
- [nongnu] elpa/multiple-cursors 6b09b9c 172/434: Add some more basic commands to the run-all and run-once lists., (continued)
- [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
- [nongnu] elpa/multiple-cursors 5f7c92b 173/434: Add more backward-delete commands to run-for-all, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 3f3cdc6 207/434: Merge pull request #56 from paradoxxxzero/transient-mark-mode, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 7d79b98 182/434: Autoload new functions., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 0b9aae1 188/434: Merge pull request #40 from tkf/fix-dump-list, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 56839df 208/434: Update docs with mc/edit-*-lines, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors dc0aa99 193/434: Simplify travis run script, and make it work when ECUKES_EMACS has a space in the path, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 754de4e 243/434: Backport set-temporary-overlay-map to emacs <24.3, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 4c293c4 244/434: Disable snapshot CI, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 8dfe725 269/434: Abort immediately when empty search pattern is passed to 'mc/mark-all-in-region',
ELPA Syncer <=
- [nongnu] elpa/multiple-cursors ec47813 274/434: Derp, multiple cursors means > 1, not > 0., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 17c48f9 278/434: Merge pull request #111 from mathrick/mark-all-dwim, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors cfe4bd9 280/434: Add python-indent-dedent-line-backspace to run-for-all, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 3cfae1d 290/434: Merge pull request #122 from kyanagi/appropriate-error-messages-when-no-fake-cursors-exist, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors f5866d6 294/434: Fix typo in readme, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 0847147 300/434: Merge pull request #143 from mjdarby/jedi-mode, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors d184f35 301/434: Add company-mode to the list of unsupported minor modes., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 4b0e912 310/434: Added description of mc-hide-unmached-mode to Readme, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors f3daf86 311/434: Merge pull request #157 from lexa/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors b46f795 314/434: Fix style issues, ELPA Syncer, 2021/08/07