diff options
author | Martin Rudalics <rudalics@gmx.at> | 2011-11-23 10:57:27 +0100 |
---|---|---|
committer | Martin Rudalics <rudalics@gmx.at> | 2011-11-23 10:57:27 +0100 |
commit | 56e2e794b0b830b2ccb8d43f5651d13f8be176a5 (patch) | |
tree | d09ca82f4787e9043ba41882f159d90c9e47557a | |
parent | da94eca12f45cc4d22f3a7f6febfd94b87359bbe (diff) | |
download | emacs-56e2e794b0b830b2ccb8d43f5651d13f8be176a5.tar.gz |
In Fkill_buffer do replace_buffer_in_windows before Fset_buffer. (Bug#10114)
* buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
making another buffer current. (Bug#10114)
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/buffer.c | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ade7eaec1e0..694478e2d39 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-11-23 Martin Rudalics <rudalics@gmx.at> + + * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before + making another buffer current. (Bug#10114) + 2011-11-23 Glenn Morris <rgm@gnu.org> * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526) diff --git a/src/buffer.c b/src/buffer.c index a327a1650f1..f8482c351c5 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1526,7 +1526,13 @@ with SIGHUP. */) UNGCPRO; } - /* Make this buffer not be current. + /* Run replace_buffer_in_windows before making another buffer current + since set-window-buffer-start-and-point will refuse to make another + buffer current if the selected window does not show the current + buffer. (Bug#10114) */ + replace_buffer_in_windows (buffer); + + /* Make this buffer not be current. In the process, notice if this is the sole visible buffer and give up if so. */ if (b == current_buffer) @@ -1566,7 +1572,6 @@ with SIGHUP. */) /* These may run Lisp code and into infinite loops (if someone insisted on circular lists) so allow quitting here. */ - replace_buffer_in_windows (buffer); frames_discard_buffer (buffer); clear_charpos_cache (b); |