From 56e2e794b0b830b2ccb8d43f5651d13f8be176a5 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Wed, 23 Nov 2011 10:57:27 +0100 Subject: 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) --- src/buffer.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/buffer.c') 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); -- cgit v1.2.1 From e47695319fc758da7ff07d7084386258b6c8b677 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 26 Nov 2011 20:43:11 -0800 Subject: Spelling fixes. --- src/buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index f8482c351c5..a482493fac7 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1631,7 +1631,7 @@ with SIGHUP. */) /* Reset the local variables, so that this buffer's local values won't be protected from GC. They would be protected - if they happened to remain encached in their symbols. + if they happened to remain cached in their symbols. This gets rid of them for certain. */ swap_out_buffer_local_variables (b); reset_buffer_local_variables (b, 1); @@ -2486,7 +2486,7 @@ swap_out_buffer_local_variables (struct buffer *b) Lisp_Object sym = XCAR (XCAR (alist)); eassert (XSYMBOL (sym)->redirect == SYMBOL_LOCALIZED); /* Need not do anything if some other buffer's binding is - now encached. */ + now cached. */ if (EQ (SYMBOL_BLV (XSYMBOL (sym))->where, buffer)) { /* Symbol is set up for this buffer's old local value: -- cgit v1.2.1