[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/iedit f566ade5e4 264/301: Workaround for slow `c-before-ch
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/iedit f566ade5e4 264/301: Workaround for slow `c-before-change' |
Date: |
Mon, 10 Jan 2022 22:59:09 -0500 (EST) |
branch: elpa/iedit
commit f566ade5e44fcc3ec50ef93c679ba698b43d16ba
Author: Victor Ren <yren@sonicwall.com>
Commit: Victor <victorhge@gmail.com>
Workaround for slow `c-before-change'
---
iedit-lib.el | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/iedit-lib.el b/iedit-lib.el
index f5a6100846..2f88fc71ff 100644
--- a/iedit-lib.el
+++ b/iedit-lib.el
@@ -552,7 +552,10 @@ part to apply it to all the other occurrences."
Apply the change to all the other occurrences. "
(let ((iedit-updating t)
(offset (- beg (overlay-start occurrence)))
- (value (buffer-substring-no-properties beg end)))
+ (value (buffer-substring-no-properties beg end))
+ ;; c-before-change is really slow. It is safe to skip change
functions
+ ;; for all the other occurrences
+ (inhibit-modification-hooks (memq #'c-before-change
before-change-functions)))
(save-excursion
(dolist (another-occurrence iedit-occurrences-overlays)
(let* ((beginning (+ (overlay-start another-occurrence) offset))
@@ -562,7 +565,10 @@ Apply the change to all the other occurrences. "
(when (/= beg end) ;; insert
(goto-char beginning)
(insert-and-inherit value)))
- (iedit-move-conjoined-overlays another-occurrence))))))
+ (iedit-move-conjoined-overlays another-occurrence))))
+ (when inhibit-modification-hooks
+ ;; run the after change functions only once. It seems OK for c-mode
+ (run-hook-with-args 'after-change-functions beg end change))))
(defun iedit-next-occurrence ()
"Move forward to the next occurrence in the `iedit'.
- [nongnu] elpa/iedit 7a6a0d65ab 252/301: Replace deprecated cl with cl-lib, (continued)
- [nongnu] elpa/iedit 7a6a0d65ab 252/301: Replace deprecated cl with cl-lib, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit c1b672cfc9 270/301: Fix bug #115. Now properly disable iedit-mode during desktop restore., ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 76ff4aa6b9 218/301: Merge pull request #64 from justbur/sgml-error, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 2221a517a8 227/301: Fix comments, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 0ef1410ec5 259/301: Add iedit-show/hide-occurrence-lines, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 326b6f7787 263/301: Merge `iedit-number-occurrences' and `iedit-increment-occurrences', ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 02bad3e3b9 240/301: Fix compile warnings, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit abb577e447 236/301: Merge pull request #77 from EdwardBetts/spelling, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 39919478f9 230/301: fix C-R-RET key binding problem in term, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 77e1661134 246/301: Readme.org: add melpa/stable version badges, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit f566ade5e4 264/301: Workaround for slow `c-before-change',
ELPA Syncer <=
- [nongnu] elpa/iedit 64c3505d04 235/301: correct spelling mistake, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 2f0c484817 283/301: Move iedit-buffering related to `iedit-lib', ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 7e277119fc 221/301: Fix doc string for markup tag, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 50b7da10ac 251/301: Add option `iedit-auto-buffering`, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 3211c2ee6c 228/301: Merge branch 'master' of github.com:victorhge/iedit, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 93b642f0a8 286/301: A few small fixes, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 02b4a6553e 243/301: Add the index of the current occurrence on mode-line, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 06e600aae2 222/301: Fix: use return value of iedit-default-occurrence-mode-local, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit abcc27a9f0 231/301: Add Installation instruction, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 8b620efacb 262/301: Replace `inhibit-modification-hooks' with `iedit-updating', ELPA Syncer, 2022/01/10