[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/multiple-cursors 2588cce 338/434: Revert "Support unmarkin
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/multiple-cursors 2588cce 338/434: Revert "Support unmarking with no region. Change mc/mark-lines to preserve point." |
Date: |
Sat, 7 Aug 2021 09:20:55 -0400 (EDT) |
branch: elpa/multiple-cursors
commit 2588ccef6939b77896105f23642483c30c4a4e06
Author: Magnar Sveen <magnars@gmail.com>
Commit: Magnar Sveen <magnars@gmail.com>
Revert "Support unmarking with no region. Change mc/mark-lines to preserve
point."
This reverts commit 2d6ffce4c94cdbec1ea8ec086ea346423bafcdf1.
Fixes #201
---
mc-mark-more.el | 48 ++++++++++++++++++++++--------------------------
1 file changed, 22 insertions(+), 26 deletions(-)
diff --git a/mc-mark-more.el b/mc-mark-more.el
index 5f73d8e..445f6d3 100644
--- a/mc-mark-more.el
+++ b/mc-mark-more.el
@@ -127,14 +127,14 @@ Use like case-fold-search, don't recommend setting it
globally.")
With negative ARG, delete the last one instead.
With zero ARG, skip the last one and mark next."
(interactive "p")
- (if (< arg 0)
- (let ((cursor (mc/furthest-cursor-after-point)))
- (if cursor
- (mc/remove-fake-cursor cursor)
- (error "No cursors to be unmarked")))
- (if (region-active-p)
- (mc/mark-more-like-this (= arg 0) 'forwards)
- (mc/mark-lines arg 'forwards)))
+ (if (region-active-p)
+ (if (< arg 0)
+ (let ((cursor (mc/furthest-cursor-after-point)))
+ (if cursor
+ (mc/remove-fake-cursor cursor)
+ (error "No cursors to be unmarked")))
+ (mc/mark-more-like-this (= arg 0) 'forwards))
+ (mc/mark-lines arg 'forwards))
(mc/maybe-multiple-cursors-mode))
;;;###autoload
@@ -155,14 +155,14 @@ With zero ARG, skip the last one and mark next."
With negative ARG, delete the last one instead.
With zero ARG, skip the last one and mark next."
(interactive "p")
- (if (< arg 0)
- (let ((cursor (mc/furthest-cursor-before-point)))
- (if cursor
- (mc/remove-fake-cursor cursor)
- (error "No cursors to be unmarked")))
- (if (region-active-p)
- (mc/mark-more-like-this (= arg 0) 'backwards)
- (mc/mark-lines arg 'backwards)))
+ (if (region-active-p)
+ (if (< arg 0)
+ (let ((cursor (mc/furthest-cursor-before-point)))
+ (if cursor
+ (mc/remove-fake-cursor cursor)
+ (error "No cursors to be unmarked")))
+ (mc/mark-more-like-this (= arg 0) 'backwards))
+ (mc/mark-lines arg 'backwards))
(mc/maybe-multiple-cursors-mode))
;;;###autoload
@@ -179,16 +179,12 @@ With zero ARG, skip the last one and mark next."
(defun mc/mark-lines (num-lines direction)
(dotimes (i num-lines)
- (mc/save-excursion
- (let ((furthest-cursor (ecase direction
- (forwards (mc/furthest-cursor-after-point))
- (backwards (mc/furthest-cursor-before-point)))))
- (if (overlayp furthest-cursor)
- (goto-char (overlay-get furthest-cursor 'point))))
- (ecase direction
- (forwards (next-logical-line 1 nil))
- (backwards (previous-logical-line 1 nil)))
- (mc/create-fake-cursor-at-point))))
+ (mc/create-fake-cursor-at-point)
+ (ecase direction
+ (forwards (loop do (next-logical-line 1 nil)
+ while (mc/all-fake-cursors (point) (1+ (point)))))
+ (backwards (loop do (previous-logical-line 1 nil)
+ while (mc/all-fake-cursors (point) (1+ (point))))))))
;;;###autoload
(defun mc/mark-next-lines (arg)
- [nongnu] elpa/multiple-cursors d17c89e 276/434: Release 1.3.0, (continued)
- [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
- [nongnu] elpa/multiple-cursors 142fdd6 337/434: Use locate-user-emacs-file to find directory for .mc-lists.el, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 2588cce 338/434: Revert "Support unmarking with no region. Change mc/mark-lines to preserve point.",
ELPA Syncer <=
- [nongnu] elpa/multiple-cursors 2e904a0 342/434: Add safety ceiling to cursor count at creation, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 9a5c9cd 005/434: Refactored setup of unsupported commands., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 6cac5f4 018/434: Even more white-listing., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors f2da52a 085/434: Update readme with new testing info., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 8bc7916 094/434: Updated README., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 3e31cc6 101/434: Merge pull request #5 from milkypostman/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors f2add1d 107/434: Suggest C-c C-< instead of the often used M-<, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 810636b 120/434: Avoid smooth-scroll issues with multiple cursors, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 2d639b0 284/434: Added tests for new mc/edit-lines, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 38e590c 292/434: Fix cycle-cursor behavior., ELPA Syncer, 2021/08/07