summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2012-12-11 13:51:12 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2012-12-11 13:51:12 +0400
commitc6afe371b0218154957bbef17c3f8bda5377b7c8 (patch)
tree2356c637109538cac1d24a7e1ae0ba38ccfec53d /src/buffer.c
parent1b47babdb7fd503ad79a696a1b9d9b2e2b46e10c (diff)
downloademacs-c6afe371b0218154957bbef17c3f8bda5377b7c8.tar.gz
* buffer.c (Fset_buffer_multibyte): Do not force redisplay
if changed buffer is not shown in a window. * insdel.c (prepare_to_modify_buffer): Likewise. * window.c (replace_buffer_in_windows_safely): Do nothing if buffer is not shown in a window. (Fforce_window_update): Likewise if string or buffer argument is passed.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 1194431841a..748422df73a 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -2691,10 +2691,11 @@ current buffer is cleared. */)
UNGCPRO;
- /* Changing the multibyteness of a buffer means that all windows
- showing that buffer must be updated thoroughly. */
current_buffer->prevent_redisplay_optimizations_p = 1;
- ++windows_or_buffers_changed;
+
+ /* If buffer is shown in a window, let redisplay consider other windows. */
+ if (buffer_window_count (current_buffer))
+ ++windows_or_buffers_changed;
/* Copy this buffer's new multibyte status
into all of its indirect buffers. */