[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/iedit c2763baaf6 168/301: Do not enable iedit from a faili
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/iedit c2763baaf6 168/301: Do not enable iedit from a failing isearch |
Date: |
Mon, 10 Jan 2022 22:59:00 -0500 (EST) |
branch: elpa/iedit
commit c2763baaf6c6ac3c3d8574a537c3572ef84bae8f
Author: Victor Ren <victorhge@gmail.com>
Commit: Victor Ren <victorhge@gmail.com>
Do not enable iedit from a failing isearch
---
iedit-lib.el | 4 ++--
iedit-tests.el | 33 +++++++++++++++++----------------
iedit.el | 7 +++++--
3 files changed, 24 insertions(+), 20 deletions(-)
diff --git a/iedit-lib.el b/iedit-lib.el
index abd3ba624e..c8dbdc00a2 100644
--- a/iedit-lib.el
+++ b/iedit-lib.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2010, 2011, 2012 Victor Ren
-;; Time-stamp: <2013-03-02 22:41:36 Victor Ren>
+;; Time-stamp: <2013-06-05 14:22:21 Victor Ren>
;; Author: Victor Ren <victorhge@gmail.com>
;; Keywords: occurrence region simultaneous rectangle refactoring
;; Version: 0.97
@@ -244,7 +244,7 @@ Return the number of occurrences."
(if (not (if forward
(re-search-forward occurrence-exp nil t)
(re-search-backward occurrence-exp nil t)))
- (message "No matches.")
+ (message "No match")
(if (or (iedit-find-overlay-at-point (match-beginning 0)
'iedit-occurrence-overlay-name)
(iedit-find-overlay-at-point (match-end 0)
'iedit-occurrence-overlay-name))
(error "Conflict region"))
diff --git a/iedit-tests.el b/iedit-tests.el
index f20cd8dac3..3ac559734f 100644
--- a/iedit-tests.el
+++ b/iedit-tests.el
@@ -2,7 +2,7 @@
;; Copyright (C) 2010, 2011, 2012 Victor Ren
-;; Time-stamp: <2013-02-09 00:54:03 Victor Ren>
+;; Time-stamp: <2013-02-26 13:36:47 Victor Ren>
;; Author: Victor Ren <victorhge@gmail.com>
;; Version: 0.97
;; X-URL: http://www.emacswiki.org/emacs/Iedit
@@ -635,21 +635,22 @@ foo"
(iedit-show-all)
(should (equal (iedit-hide-unmatched-lines 3) nil)))))
-;; (elp-instrument-list '(;; insert-and-inherit
-;; ;; delete-region
-;; ;; goto-char
-;; ;; iedit-occurrence-update
-;; ;; buffer-substring-no-properties
-;; ;; string=
-;; re-search-forward
-;; ;; replace-match
-;; text-property-not-all
-;; iedit-make-occurrence-overlay
-;; iedit-make-occurrences-overlays
-;; match-beginning
-;; match-end
-;; push
-;; ))
+;; todo add a auto performance test
+(setq elp-function-list '(;; insert-and-inherit
+ ;; delete-region
+ ;; goto-char
+ ;; iedit-occurrence-update
+ ;; buffer-substring-no-properties
+ ;; string=
+ re-search-forward
+ ;; replace-match
+ text-property-not-all
+ iedit-make-occurrence-overlay
+ iedit-make-occurrences-overlays
+ match-beginning
+ match-end
+ push
+ ))
;;; iedit-tests.el ends here
diff --git a/iedit.el b/iedit.el
index bb0a4e320d..2a360abbbc 100644
--- a/iedit.el
+++ b/iedit.el
@@ -2,7 +2,7 @@
;; Copyright (C) 2010, 2011, 2012 Victor Ren
-;; Time-stamp: <2013-06-04 14:25:26 Victor Ren>
+;; Time-stamp: <2013-06-05 14:18:33 Victor Ren>
;; Author: Victor Ren <victorhge@gmail.com>
;; Keywords: occurrence region simultaneous refactoring
;; Version: 0.97
@@ -357,6 +357,8 @@ Keymap used within overlays:
(defun iedit-mode-from-isearch (regexp)
"Start Iedit mode using last search string as the regexp."
+ (or isearch-success
+ (error "No match" ))
(interactive
(let ((regexp (cond
((functionp isearch-word)
@@ -424,7 +426,8 @@ the initial string globally."
(setq iedit-last-occurrence-local (iedit-current-occurrence-string))
(setq iedit-last-occurrence-global iedit-last-occurrence-local)
(setq iedit-last-initial-string-global iedit-initial-string-local)
- (kill-new iedit-last-occurrence-local) ; Make occurrence the latest kill in
the kill ring.
+ (if iedit-last-occurrence-local
+ (kill-new iedit-last-occurrence-local)) ; Make occurrence the latest
kill in the kill ring.
(setq iedit-num-lines-to-expand-up 0)
(setq iedit-num-lines-to-expand-down 0)
- [nongnu] elpa/iedit 4efe511684 128/301: allow iedit-rectangle-mode to take beg end programatically, (continued)
- [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, 2022/01/10
- [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 <=
- [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
- [nongnu] elpa/iedit 85fad4a3b7 233/301: Merge pull request #73 from lionel-/feature-mode-line, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit a7f5ed7cf9 257/301: Turn off iedit-mode at running `iedit-mode-toggle-on-function` twice, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 5050b7e88e 260/301: Fix a failed test case when Emacs is compiled without GUI, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit afca4e6bbf 213/301: Rename hook functions, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 7ab2509231 225/301: Expand iedit-regexp-quote with passthrough, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit efe98b2015 248/301: fix `iedit-mode-on-fuction problem, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 01fa1e5925 217/301: Fix error if sgml-electric-tag-pair-mode not bound, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit d7db0e5d19 279/301: Replace `iedit-lib-aborting-hook' with a callback function, ELPA Syncer, 2022/01/10