[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/iedit 668ea99c51 195/301: Allow prefix for expand function
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/iedit 668ea99c51 195/301: Allow prefix for expand functions |
Date: |
Mon, 10 Jan 2022 22:59:02 -0500 (EST) |
branch: elpa/iedit
commit 668ea99c5124074ac1abb4aefe0a204d50042379
Author: Victor Ren <victorhge@gmail.com>
Commit: Victor Ren <victorhge@gmail.com>
Allow prefix for expand functions
iedit-expand-down-to-occurrence
iedit-expand-up-to-occurrence
---
iedit.el | 36 ++++++++++++++++++++++++------------
1 file changed, 24 insertions(+), 12 deletions(-)
diff --git a/iedit.el b/iedit.el
index f990d223e1..58ed5d9613 100644
--- a/iedit.el
+++ b/iedit.el
@@ -2,7 +2,7 @@
;; Copyright (C) 2010, 2011, 2012 Victor Ren
-;; Time-stamp: <2016-05-29 14:57:51 Victor Ren>
+;; Time-stamp: <2016-05-29 23:52:05 Victor Ren>
;; Author: Victor Ren <victorhge@gmail.com>
;; Keywords: occurrence region simultaneous refactoring
;; Version: 0.97
@@ -572,7 +572,7 @@ region by `amount' lines."
(defun iedit-expand-up-a-line (&optional arg)
"After restricting iedit to the current line with
`iedit-restrict-current-line', this function expands the search
-region upwards by one line. With a prefix, bring the top of the
+region upwards by one line. With a prefix, bring the top of the
region back down one line."
(interactive "P")
(iedit-expand-by-a-line 'top
@@ -581,23 +581,35 @@ region back down one line."
(defun iedit-expand-down-a-line (&optional arg)
"After restricting iedit to the current line with
`iedit-restrict-current-line', this function expands the search
-region downwards by one line. With a prefix, bring the bottom of
+region downwards by one line. With a prefix, bring the bottom of
the region back up one line."
(interactive "P")
(iedit-expand-by-a-line 'bottom
(if arg -1 1)))
-(defun iedit-expand-down-to-occurrence ()
+(defun iedit-expand-down-to-occurrence (&optional arg)
"Expand the search region downwards until reaching a new occurrence.
-If no such occurrence can be found, throw an error."
- (interactive)
- (iedit-expand-to-occurrence t))
-
-(defun iedit-expand-up-to-occurrence ()
+If no such occurrence can be found, throw an error. With a
+prefix, bring the bottom of the region back up one occurrence."
+ (interactive "P")
+ (if arg
+ (progn (iedit-restrict-region
+ (iedit-first-occurrence)
+ (1- (iedit-last-occurrence)))
+ (goto-char (iedit-last-occurrence)))
+ (iedit-expand-to-occurrence t)))
+
+(defun iedit-expand-up-to-occurrence (&optional arg)
"Expand the search region upwards until reaching a new occurrence.
-If no such occurrence can be found, throw an error."
- (interactive)
- (iedit-expand-to-occurrence nil))
+If no such occurrence can be found, throw an error. With a
+prefix, bring the top of the region back down one occurrence."
+ (interactive "P")
+ (if arg
+ (progn (iedit-restrict-region
+ (1+ (iedit-first-occurrence))
+ (+ (iedit-occurrence-string-length) (iedit-last-occurrence)))
+ (goto-char (iedit-first-occurrence)))
+ (iedit-expand-to-occurrence nil)))
(defun iedit-expand-to-occurrence (forward)
"Expand to next or previous occurrence."
- [nongnu] elpa/iedit 4cf803d9cb 092/301: Skip the first occurrence for occur-edit-mode, (continued)
- [nongnu] elpa/iedit 4cf803d9cb 092/301: Skip the first occurrence for occur-edit-mode, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit c5ab2c593d 094/301: Avoid to restore Iedit mode when restoring desktop, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 95eb44ee30 117/301: Add new function iedit-add-next-occurrence-overlay, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit b94c75e8c6 107/301: Move iedit-help-keymap to iedit.el, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 84896f8be0 104/301: *** empty log message ***, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 962fcdb6cd 124/301: Fix failed test cases, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 6d16d92a5a 112/301: replace iedit-occurrence-face with real face, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 57beb10db5 141/301: Remove all the dependency to the order of iedit-occurrences-overlays, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 4efe511684 128/301: allow iedit-rectangle-mode to take beg end programatically, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit e48b52e353 185/301: Merge branch 'incremental-select' of git://github.com/bmag/iedit into bmag-incremental-select, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 668ea99c51 195/301: Allow prefix for expand functions,
ELPA Syncer <=
- [nongnu] elpa/iedit 007a6f9c28 206/301: check if mc present, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 7885f4beda 178/301: iedit-restrict-current-line resets expand state, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 79d0f4f3dc 155/301: Merge pull request #32 from mbneedham/master, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit df2de42fa1 149/301: Remove test-util.el, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 83c037d678 156/301: Fix infinite loop problem in iedit-rect-mode, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit b95c35107a 176/301: Merge branch 'master' of github.com:victorhge/iedit, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 0d6193362d 144/301: Follow error convention, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit c2763baaf6 168/301: Do not enable iedit from a failing isearch, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 4e8b9453ac 261/301: Update occurrences in `post-command-hook', ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 3c305620ae 250/301: Optimize iedit-mode-from-isearch, ELPA Syncer, 2022/01/10