[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#35316: 26.2; Emacs lags in c++-mode buffer when editing with iedit-m
From: |
Zhang Haijun |
Subject: |
bug#35316: 26.2; Emacs lags in c++-mode buffer when editing with iedit-mode on |
Date: |
Fri, 17 May 2019 00:48:18 +0000 |
>> I’m not the developer of iedit.
>
> Would you please consider forwarding this email to the maintainer of
> iedit. Thanks!
>
Done.
>
> I saw this comment too. I had a look at the repository on github, and
> this handling of after-change-functions has been there since at least
> 2012. :-(
>
> When I comment out the offending bits of code from
> iedit-update-occurrences-2, like this:
>
>
>
> --- iedit-lib.el~ 2019-04-19 08:03:29.000000000 +0000
> +++ iedit-lib.el 2019-05-16 15:58:27.158575662 +0000
> @@ -490,7 +490,7 @@
>
> (defun iedit-update-occurrences-2 (occurrence after beg end &optional change)
> ""
> - (let ((inhibit-modification-hooks t)
> + (let (;; (inhibit-modification-hooks t)
> (offset (- beg (overlay-start occurrence)))
> (value (buffer-substring-no-properties beg end)))
> (save-excursion
> @@ -509,10 +509,11 @@
> ;; non-nil, after-change-functions hooks are not going
> ;; to be called for the changes of other occurrences.
> ;; So run the hook here.
> - (run-hook-with-args 'after-change-functions
> - beginning
> - ending
> - change))
> + ;; (run-hook-with-args 'after-change-functions
> + ;; beginning
> + ;; ending
> + ;; change)
> + )
> (iedit-move-conjoined-overlays another-occurrence)))
> ;; deletion
> (dolist (another-occurrence (remove occurrence
> iedit-occurrences-overlays))
> @@ -521,10 +522,11 @@
> (unless (eq beg end) ;; replacement
> (goto-char beginning)
> (insert-and-inherit value))
> - (run-hook-with-args 'after-change-functions
> - beginning
> - (+ beginning (- beg end))
> - change)))))))
> + ;; (run-hook-with-args 'after-change-functions
> + ;; beginning
> + ;; (+ beginning (- beg end))
> + ;; change)
> + ))))))
>
> (defun iedit-next-occurrence ()
> "Move forward to the next occurrence in the `iedit'.
>
>
>
> , then iedit-mode and C++ Mode work well together. In a C++ Mode test
> buffer, just over 16k long, on a variable with 75 copies in it, I press
> C-;. On editing the copies of these variables, the response is now
> instantaneous.
>
I tried your patch. And it works as you saied. No lags.
- bug#35316: 26.2; Emacs lags in c++-mode buffer when editing with iedit-mode on, Zhang Haijun, 2019/05/09
- bug#35316: 26.2; Emacs lags in c++-mode buffer when editing with iedit-mode on, Alan Mackenzie, 2019/05/16
- bug#35316: 26.2; Emacs lags in c++-mode buffer when editing with iedit-mode on, Zhang Haijun, 2019/05/16
- bug#35316: 26.2; Emacs lags in c++-mode buffer when editing with iedit-mode on, Alan Mackenzie, 2019/05/16
- bug#35316: 26.2; Emacs lags in c++-mode buffer when editing with iedit-mode on,
Zhang Haijun <=
- bug#35316: 26.2; Emacs lags in c++-mode buffer when editing with iedit-mode on, Amos Bird, 2019/05/16
- bug#35316: 26.2; Emacs lags in c++-mode buffer when editing with iedit-mode on, Alan Mackenzie, 2019/05/17
- bug#35316: 26.2; Emacs lags in c++-mode buffer when editing with iedit-mode on, Amos Bird, 2019/05/17
- bug#35316: 26.2; Emacs lags in c++-mode buffer when editing with iedit-mode on, Alan Mackenzie, 2019/05/19
- bug#35316: 26.2; Emacs lags in c++-mode buffer when editing with iedit-mode on, Noam Postavsky, 2019/05/19
- bug#35316: 26.2; Emacs lags in c++-mode buffer when editing with iedit-mode on, Alan Mackenzie, 2019/05/19
- bug#35316: 26.2; Emacs lags in c++-mode buffer when editing with iedit-mode on, Noam Postavsky, 2019/05/19
- bug#35316: 26.2; Emacs lags in c++-mode buffer when editing with iedit-mode on, Zhang Haijun, 2019/05/19