[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/iedit df9e958703 082/301: Add more short-cut to iedit on f
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/iedit df9e958703 082/301: Add more short-cut to iedit on function |
Date: |
Mon, 10 Jan 2022 22:58:52 -0500 (EST) |
branch: elpa/iedit
commit df9e95870348f510d63b91bcfc119e65a1b88a1e
Author: Victor Ren <victorhge@gmail.com>
Commit: Victor Ren <victorhge@gmail.com>
Add more short-cut to iedit on function
C-0 prefix argument always try to restrict Iedit mode in current function
---
iedit.el | 37 +++++++++++++++++--------------------
1 file changed, 17 insertions(+), 20 deletions(-)
diff --git a/iedit.el b/iedit.el
index 72f4bd5999..07a5b7045d 100644
--- a/iedit.el
+++ b/iedit.el
@@ -2,7 +2,7 @@
;; Copyright (C) 2010, 2011, 2012 Victor Ren
-;; Time-stamp: <2012-03-05 17:13:42 Victor Ren>
+;; Time-stamp: <2012-03-06 23:10:57 Victor Ren>
;; Author: Victor Ren <victorhge@gmail.com>
;; Keywords: occurrence region simultaneous rectangle refactoring
;; Version: 0.95
@@ -381,11 +381,13 @@ change are propagated to all other occurrences
simultaneously.
If region is not active, the current symbol (returns from
`current-word') is used as the occurrence by default. The
occurrences of the current symbol, but not include occurrences
-that are part of other symbols, are highlighted. With digit
-prefix argument 0, only symbols in current function are matched.
-This is good for renaming refactoring in programming. If you
-still want to match all the occurrences, even though they are
-parts of other symbols, you may have to mark the symbol first.
+that are part of other symbols, are highlighted. If you still
+want to match all the occurrences, even though they are parts of
+other symbols, you may have to mark the symbol first.
+
+In the above two situations, with digit prefix argument 0, only
+occurrences in current function are matched. This is good for
+renaming refactoring in programming.
You can also switch to Iedit mode from isearch mode directly. The
current search string is used as occurrence. All occurrences of
@@ -421,9 +423,6 @@ Commands:
complete-symbol
(beg (point-min))
(end (point-max)))
- (when (and arg (iedit-region-active))
- (setq beg (region-beginning))
- (setq end (region-end)))
(cond ((and arg
(= 4 (prefix-numeric-value arg))
iedit-last-occurrence-local)
@@ -434,17 +433,6 @@ Commands:
iedit-last-initial-string-global)
(setq occurrence iedit-last-initial-string-global)
(setq complete-symbol iedit-only-complete-symbol-global))
- ((and arg
- (= 0 (prefix-numeric-value arg))
- iedit-current-symbol-default
- (current-word t))
- (setq occurrence (current-word))
- (when iedit-only-at-symbol-boundaries
- (setq complete-symbol t))
- (save-excursion
- (mark-defun)
- (setq beg (region-beginning))
- (setq end (region-end))))
((iedit-region-active)
(setq occurrence (buffer-substring-no-properties
(mark) (point))))
@@ -457,6 +445,15 @@ Commands:
(when iedit-only-at-symbol-boundaries
(setq complete-symbol t)))
(t (error "No candidate of the occurrence, cannot enable Iedit
mode")))
+ (when arg
+ (if (= 0 (prefix-numeric-value arg))
+ (save-excursion
+ (mark-defun)
+ (setq beg (region-beginning))
+ (setq end (region-end)))
+ (when (iedit-region-active)
+ (setq beg (region-beginning))
+ (setq end (region-end)))))
(setq iedit-only-complete-symbol-local complete-symbol)
(set-mark nil)
(setq iedit-case-sensitive-local iedit-case-sensitive-default)
- [nongnu] elpa/iedit 17ce97381b 035/301: Clean up code, (continued)
- [nongnu] elpa/iedit 17ce97381b 035/301: Clean up code, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 9b3aaa8f21 037/301: Fix occurrence from history does not exist problem, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit b9ebb768b7 190/301: Merge pull request #60 from danrharms/issue-59-hotfix, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit f7b2d60989 167/301: Make occurrence string the latest kill in the kill ring, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit c25992ef7f 199/301: Fix doc strings, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 19f35aa1a0 172/301: Change the default key binding for `iedit-rectangle-mode' to c-x-r-ret, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 4864e17126 010/301: Merge remote-tracking branch 'tsdh/master', ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit fc71952cf9 014/301: Boolean `t', ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit df6c2ad919 017/301: fix search to use regexp-quote when needed, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 30971294b2 071/301: Remove a limitation of empty occurrence string, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit df9e958703 082/301: Add more short-cut to iedit on function,
ELPA Syncer <=
- [nongnu] elpa/iedit 06fac017b4 087/301: explain what "quite different" means in rectangle context in README, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 1d32922c04 089/301: Run after-change-functions hook for every occurrence, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit c935255053 083/301: minor change, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit d29bf65e5e 096/301: Do not update mode line when buffering modification, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 1c410fc2b8 101/301: Fix iedit-number-occurrences with conjointed occurrences problem, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 73a5884b4c 126/301: Merge branch 'master' of github.com:victorhge/iedit, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit b4c736225f 114/301: Merge pull request #18 from lewang/lewang-use-real-face, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 8ff86b768d 115/301: Replace "(set-mark nil)" with (setq mark-active nil)", ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 9a1b776f22 103/301: Remove todo for conjointed overlays, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 21a60f2ea3 113/301: Add toogle key option, ELPA Syncer, 2022/01/10