unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Is it safe to use the combine-after-change-calls like this?
@ 2019-04-18  5:34 Zhang Haijun
  2019-04-18 12:21 ` Stefan Monnier
  2019-04-26 10:31 ` Alan Mackenzie
  0 siblings, 2 replies; 7+ messages in thread
From: Zhang Haijun @ 2019-04-18  5:34 UTC (permalink / raw)
  To: emacs-devel@gnu.org


> combine-after-change-calls is ignored when before-change-functions is non-nil.

I just recognize this. It is not nil in c++-mode buffers.

> Also, regarding interaction with non-CC-mode buffers: you might be able
> to improve the efficiency of the code by executing the command of the
> various cursors starting with the one closest to point-max and finishing
> with the one closest to point-min.

I don’t understand this well. I see that when iedit-mode is on, it calls after-change-functions on change around every active cursors for every char inputing.



^ permalink raw reply	[flat|nested] 7+ messages in thread
* Is it safe to use the combine-after-change-calls like this?
@ 2019-04-17  0:21 Zhang Haijun
  2019-04-17  1:14 ` Stefan Monnier
  2019-04-17 18:28 ` Stefan Monnier
  0 siblings, 2 replies; 7+ messages in thread
From: Zhang Haijun @ 2019-04-17  0:21 UTC (permalink / raw)
  To: emacs-devel@gnu.org

I want to use it with multiple-cursors.el(https://github.com/magnars/multiple-cursors.el) like this:
1. When multiple-cursors activates, set combine-after-change-calls to t
2. Edit the buffer with multiple active cursors
3. Before multiple-cursors deactivates, call combine-after-change-execute and set combine-after-change-calls back to nil.

I’m using the package iedit.el(https://github.com/victorhge/iedit). It works like multiple-cursors.el, which has multiple active cursors.  

The problem is that: when editing with multiple active cursors, emacs lags too much. It seems that most of cpu is used by functions in after-change-functions.

The issue: https://github.com/victorhge/iedit/issues/83


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-04-26 12:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-18  5:34 Is it safe to use the combine-after-change-calls like this? Zhang Haijun
2019-04-18 12:21 ` Stefan Monnier
2019-04-26 10:31 ` Alan Mackenzie
2019-04-26 12:09   ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2019-04-17  0:21 Zhang Haijun
2019-04-17  1:14 ` Stefan Monnier
2019-04-17 18:28 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).