Improve responsiveness while in 'replace-buffer-contents'
commitecc29fbd5a73b55d4624c240b8a2d0a01d699e47
authorEli Zaretskii <eliz@gnu.org>
Sat, 23 Jun 2018 11:03:10 +0000 (23 14:03 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 23 Jun 2018 11:03:10 +0000 (23 14:03 +0300)
tree258ea4edb175fcff9bd9213c85fa34351537b47c
parent8182d648cb18fb048495c761db7c21fbf3c2a624
Improve responsiveness while in 'replace-buffer-contents'

* src/editfns.c (buffer_chars_equal): Avoid calling
buf_charpos_to_bytepos when the buffer is plain-ASCII.
Suggested by Milan Stanojević <mstanojevic@janestreet.com>.
Call maybe_quit to improve responsiveness.
(Freplace_buffer_contents): Call maybe_quit.  Warn in the doc
string that the function could be slow.  (Bug#31888)
src/editfns.c