[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/iedit 30971294b2 071/301: Remove a limitation of empty occ
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/iedit 30971294b2 071/301: Remove a limitation of empty occurrence string |
Date: |
Mon, 10 Jan 2022 22:58:51 -0500 (EST) |
branch: elpa/iedit
commit 30971294b2db0920e295f5860b6b13e28f322d7c
Author: Victor Ren <victorhge@gmail.com>
Commit: Victor Ren <victorhge@gmail.com>
Remove a limitation of empty occurrence string
---
iedit.el | 35 +++++++++++++++++------------------
1 file changed, 17 insertions(+), 18 deletions(-)
diff --git a/iedit.el b/iedit.el
index f7b5882905..058ba98e33 100644
--- a/iedit.el
+++ b/iedit.el
@@ -2,7 +2,7 @@
;; Copyright (C) 2010, 2011, 2012 Victor Ren
-;; Time-stamp: <2012-02-26 00:27:58 Victor Ren>
+;; Time-stamp: <2012-02-28 12:28:33 Victor Ren>
;; Author: Victor Ren <victorhge@gmail.com>
;; Keywords: occurrence region replace simultaneous
;; Version: 0.94
@@ -194,15 +194,16 @@ forward or backward successful")
;; is zero-width (beg==end)
;; -- for front and back insertion.
(defvar iedit-skipped-modification-once nil
- "Variable used to skip first modification hook run when insertion against a
zero-width occurrence.")
+ "Variable used to skip first modification hook run when
+ insertion against a zero-width occurrence.")
(defvar iedit-aborting nil
"This is buffer local variable which indicates iedit-mode is aborting.")
(defvar iedit-buffering nil
"This is buffer local variable which indicates iedit-mode is
-buffering, which means the modification to the current
-occurrence is not applied to other occurrences when it is true.")
+buffering, which means the modification to the current occurrence
+is not applied to other occurrences when it is true.")
(defvar iedit-rectangle nil
"This buffer local variable which is the rectangle geometry if
@@ -352,7 +353,8 @@ This is like `describe-bindings', but displays only Iedit
keys."
(substitute-command-keys "\\[iedit-last-occurrence]")
":first/last "
(substitute-command-keys "\\[iedit-restrict-defun]")
":restrict "
(if iedit-rectangle
- (concat (substitute-command-keys
"\\[iedit-kill-rectangle]") ":kill")))))
+ (concat
+ (substitute-command-keys "\\[iedit-kill-rectangle]")
":kill")))))
(or (assq 'iedit-mode minor-mode-map-alist)
(setq minor-mode-map-alist
@@ -361,6 +363,9 @@ This is like `describe-bindings', but displays only Iedit
keys."
;;;###autoload
(defun iedit-mode (&optional arg)
"Toggle iedit mode.
+This command behaves differently, depending on the mark, point
+and prefix argument.
+
If iedit mode is off, turn iedit mode on.
In Transient Mark mode, when iedit mode is turned on, all the
@@ -611,6 +616,9 @@ removed overlay."
(remove-hook 'post-command-hook 'iedit-reset-aborting t)
(setq iedit-aborting nil))
+;; There are two ways to update all occurrence. One is to redefine all key
+;; stroke map for overlay, the other is to figure out three basic modification
+;; in the modification hook. This function chooses the latter.
(defun iedit-occurrence-update (occurrence after beg end &optional change)
"Update all occurrences.
This modification hook is triggered when a user edits any
@@ -661,14 +669,6 @@ occurrence, it will exit iedit mode."
(unless (eq beg end) ;; replacement
(goto-char beginning)
(insert-and-inherit value)))))))))))))
-;; (elp-instrument-list '(insert-and-inherit
-;; delete-region
-;; goto-char
-;; iedit-occurrence-update
-;; buffer-substring-no-properties
-;; string=
-;; re-search-forward
-;; replace-match))
(defun iedit-next-occurrence ()
"Move forward to the next occurrence in the `iedit'.
@@ -807,11 +807,10 @@ value of `iedit-occurrence-context-lines' is used for
this time."
(let* ((ov (car iedit-occurrences-overlays))
(beg (overlay-start ov))
(end (overlay-end ov)))
- (when (/= beg end)
- (let ((inhibit-modification-hooks t))
- (save-excursion
- (dolist (occurrence iedit-occurrences-overlays)
- (apply function (overlay-start occurrence) (overlay-end
occurrence) args)))))))
+ (let ((inhibit-modification-hooks t))
+ (save-excursion
+ (dolist (occurrence iedit-occurrences-overlays)
+ (apply function (overlay-start occurrence) (overlay-end occurrence)
args))))))
(defun iedit-upcase-occurrences ()
"Covert occurrences to upper case."
- [nongnu] elpa/iedit b81b9d6025 034/301: Clean code., (continued)
- [nongnu] elpa/iedit b81b9d6025 034/301: Clean code., ELPA Syncer, 2022/01/10
- [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 <=
- [nongnu] elpa/iedit df9e958703 082/301: Add more short-cut to iedit on function, ELPA Syncer, 2022/01/10
- [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