[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/iedit 4d50a08dd6 134/301: Add parameter back to iedit-mode
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/iedit 4d50a08dd6 134/301: Add parameter back to iedit-mode-from-isearch |
Date: |
Mon, 10 Jan 2022 22:58:57 -0500 (EST) |
branch: elpa/iedit
commit 4d50a08dd6dd1343d584963029b979f182a2a892
Author: Victor Ren <victorhge@gmail.com>
Commit: Victor Ren <victorhge@gmail.com>
Add parameter back to iedit-mode-from-isearch
---
iedit-tests.el | 4 ++--
iedit.el | 27 +++++++++++++++------------
2 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/iedit-tests.el b/iedit-tests.el
index ab7a54cd12..916457d156 100644
--- a/iedit-tests.el
+++ b/iedit-tests.el
@@ -2,7 +2,7 @@
;; Copyright (C) 2010, 2011, 2012 Victor Ren
-;; Time-stamp: <2012-10-15 16:12:02 Victor Ren>
+;; Time-stamp: <2012-10-22 14:01:57 Victor Ren>
;; Author: Victor Ren <victorhge@gmail.com>
;; Version: 0.97
;; X-URL: http://www.emacswiki.org/emacs/Iedit
@@ -163,7 +163,7 @@ fob")))))
(isearch-process-search-char ?f)
(isearch-process-search-char ?o)
(isearch-process-search-char ?o)
- (iedit-mode-from-isearch)
+ (call-interactively 'iedit-mode-from-isearch)
(should (string= iedit-initial-string-local "foo"))
(should (= 4 (length iedit-occurrences-overlays)))
(iedit-mode)
diff --git a/iedit.el b/iedit.el
index f97afd057e..b7c7bc006b 100644
--- a/iedit.el
+++ b/iedit.el
@@ -2,7 +2,7 @@
;; Copyright (C) 2010, 2011, 2012 Victor Ren
-;; Time-stamp: <2012-10-15 15:09:14 Victor Ren>
+;; Time-stamp: <2012-10-22 13:59:18 Victor Ren>
;; Author: Victor Ren <victorhge@gmail.com>
;; Keywords: occurrence region simultaneous refactoring
;; Version: 0.97
@@ -343,22 +343,25 @@ Keymap used within overlays:
(setq iedit-initial-string-local occurrence)
(iedit-start (iedit-regexp-quote occurrence) beg end))))
-(defun iedit-mode-from-isearch ()
+(defun iedit-mode-from-isearch (regexp)
"Start Iedit mode using last search string as the regexp."
- (interactive)
- (let ((regexp (cond
+ (interactive
+ (let ((regexp (cond
+ ((functionp isearch-word)
+ (funcall isearch-word isearch-string))
(isearch-word (word-search-regexp isearch-string))
(isearch-regexp isearch-string)
(t (regexp-quote isearch-string)))))
- (if (or isearch-regexp isearch-word)
- nil
- (setq iedit-initial-string-local isearch-string))
- (isearch-exit)
- (setq mark-active nil)
- (run-hooks 'deactivate-mark-hook)
- (iedit-start regexp (point-min) (point-max))
+ (list regexp)))
+ (if (or isearch-regexp isearch-word)
+ nil
+ (setq iedit-initial-string-local isearch-string))
+ (isearch-exit)
+ (setq mark-active nil)
+ (run-hooks 'deactivate-mark-hook)
+ (iedit-start regexp (point-min) (point-max))
;; TODO: reconsider how to avoid the loop in iedit-same-length
- (if (iedit-same-length)
+ (if (iedit-same-length)
nil
(iedit-done)
(message "Matches are not the same length."))))
- [nongnu] elpa/iedit f88df1072b 116/301: Merge branch 'master' of github.com:victorhge/iedit, (continued)
- [nongnu] elpa/iedit f88df1072b 116/301: Merge branch 'master' of github.com:victorhge/iedit, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 1bced99a26 109/301: Fix bugs when undo is in progress, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit a5d117a75a 122/301: add test-case for deleting char at end of overlay with mirror at EOB, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 78ac0ea958 105/301: Fix typo, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 6f80f88134 106/301: Differentiate lib keymap and occurrence keymap, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 9cfd76f7c2 121/301: Toggle case-sensitive with intial region, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 106185cd95 187/301: Merge branch 'bmag-incremental-select', ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 9d03d5d44e 186/301: Merge branch 'incremental-select', ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit acb9fa54f3 152/301: Fix the testcase for iedit-hide-unmatched-lines, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 6c6522c7e9 177/301: Minor bugfix: `help-char' need not be acceptable to `char-to-string'., ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 4d50a08dd6 134/301: Add parameter back to iedit-mode-from-isearch,
ELPA Syncer <=
- [nongnu] elpa/iedit d7d5931566 127/301: Fix the arguments for after-change-functions, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 64a7905949 138/301: Rewrite iedit-hide-unmatched-lines, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit bceb12e17b 139/301: Do not jump to the first occurrence after iedit-restrict-region, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 8eb9caaa94 132/301: use real buffer for testing to ease debugging, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 8149b66ce6 140/301: Read-only text handling, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 52a7ead70c 135/301: Fix comiler error for extra ")", ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 50748a5694 160/301: ensure iedit-skip-modification-once is t in case of errors, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 060b359afc 142/301: Merge branch 'master' of github.com:victorhge/iedit, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 70e6d370fb 194/301: Merge branch 'master' of github.com:victorhge/iedit, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 30db1d2ba1 191/301: Remove the key binding to M-[, ELPA Syncer, 2022/01/10