diff options
| author | Eli Zaretskii | 2013-12-07 19:21:57 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2013-12-07 19:21:57 +0200 |
| commit | ce1d7b61f12dcc1b67535b68d9b0655b45fcadb6 (patch) | |
| tree | 881d03f4f486933482cd2e3851184cd3b172ef1b /src/buffer.c | |
| parent | 6630df25238c5a1efa2bc6a0fa7889782e8c91b5 (diff) | |
| parent | fa6fa1a1773f255b5efbe52a743b017f4908a6cb (diff) | |
| download | emacs-ce1d7b61f12dcc1b67535b68d9b0655b45fcadb6.tar.gz emacs-ce1d7b61f12dcc1b67535b68d9b0655b45fcadb6.zip | |
Merge from trunk.
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/src/buffer.c b/src/buffer.c index 61b685ea5c5..e4a550fed95 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -1336,10 +1336,16 @@ header lines. This function also forces recomputation of the | |||
| 1336 | menu bar menus and the frame title. */) | 1336 | menu bar menus and the frame title. */) |
| 1337 | (Lisp_Object all) | 1337 | (Lisp_Object all) |
| 1338 | { | 1338 | { |
| 1339 | if (!NILP (all) || buffer_window_count (current_buffer)) | 1339 | if (!NILP (all)) |
| 1340 | { | 1340 | { |
| 1341 | update_mode_lines = 10; | 1341 | update_mode_lines = 10; |
| 1342 | current_buffer->prevent_redisplay_optimizations_p = 1; | 1342 | /* FIXME: This can't be right. */ |
| 1343 | current_buffer->prevent_redisplay_optimizations_p = true; | ||
| 1344 | } | ||
| 1345 | else if (buffer_window_count (current_buffer)) | ||
| 1346 | { | ||
| 1347 | bset_update_mode_line (current_buffer); | ||
| 1348 | current_buffer->prevent_redisplay_optimizations_p = true; | ||
| 1343 | } | 1349 | } |
| 1344 | return all; | 1350 | return all; |
| 1345 | } | 1351 | } |
| @@ -2476,6 +2482,8 @@ current buffer is cleared. */) | |||
| 2476 | if (narrowed) | 2482 | if (narrowed) |
| 2477 | error ("Changing multibyteness in a narrowed buffer"); | 2483 | error ("Changing multibyteness in a narrowed buffer"); |
| 2478 | 2484 | ||
| 2485 | invalidate_buffer_caches (current_buffer, BEGV, ZV); | ||
| 2486 | |||
| 2479 | if (NILP (flag)) | 2487 | if (NILP (flag)) |
| 2480 | { | 2488 | { |
| 2481 | ptrdiff_t pos, stop; | 2489 | ptrdiff_t pos, stop; |
| @@ -3895,17 +3903,7 @@ modify_overlay (struct buffer *buf, ptrdiff_t start, ptrdiff_t end) | |||
| 3895 | 3903 | ||
| 3896 | BUF_COMPUTE_UNCHANGED (buf, start, end); | 3904 | BUF_COMPUTE_UNCHANGED (buf, start, end); |
| 3897 | 3905 | ||
| 3898 | /* If BUF is visible, consider updating the display if ... */ | 3906 | bset_redisplay (buf); |
| 3899 | if (buffer_window_count (buf) > 0) | ||
| 3900 | { | ||
| 3901 | /* ... it's visible in other window than selected, */ | ||
| 3902 | if (buf != XBUFFER (XWINDOW (selected_window)->contents)) | ||
| 3903 | windows_or_buffers_changed = 11; | ||
| 3904 | /* ... or if we modify an overlay at the end of the buffer | ||
| 3905 | and so we cannot be sure that window end is still valid. */ | ||
| 3906 | else if (end >= ZV && start <= ZV) | ||
| 3907 | windows_or_buffers_changed = 12; | ||
| 3908 | } | ||
| 3909 | 3907 | ||
| 3910 | ++BUF_OVERLAY_MODIFF (buf); | 3908 | ++BUF_OVERLAY_MODIFF (buf); |
| 3911 | } | 3909 | } |