diff options
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/buffer.c b/src/buffer.c index a327a1650f1..a482493fac7 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -1526,7 +1526,13 @@ with SIGHUP. */) | |||
| 1526 | UNGCPRO; | 1526 | UNGCPRO; |
| 1527 | } | 1527 | } |
| 1528 | 1528 | ||
| 1529 | /* Make this buffer not be current. | 1529 | /* Run replace_buffer_in_windows before making another buffer current |
| 1530 | since set-window-buffer-start-and-point will refuse to make another | ||
| 1531 | buffer current if the selected window does not show the current | ||
| 1532 | buffer. (Bug#10114) */ | ||
| 1533 | replace_buffer_in_windows (buffer); | ||
| 1534 | |||
| 1535 | /* Make this buffer not be current. | ||
| 1530 | In the process, notice if this is the sole visible buffer | 1536 | In the process, notice if this is the sole visible buffer |
| 1531 | and give up if so. */ | 1537 | and give up if so. */ |
| 1532 | if (b == current_buffer) | 1538 | if (b == current_buffer) |
| @@ -1566,7 +1572,6 @@ with SIGHUP. */) | |||
| 1566 | 1572 | ||
| 1567 | /* These may run Lisp code and into infinite loops (if someone | 1573 | /* These may run Lisp code and into infinite loops (if someone |
| 1568 | insisted on circular lists) so allow quitting here. */ | 1574 | insisted on circular lists) so allow quitting here. */ |
| 1569 | replace_buffer_in_windows (buffer); | ||
| 1570 | frames_discard_buffer (buffer); | 1575 | frames_discard_buffer (buffer); |
| 1571 | 1576 | ||
| 1572 | clear_charpos_cache (b); | 1577 | clear_charpos_cache (b); |
| @@ -1626,7 +1631,7 @@ with SIGHUP. */) | |||
| 1626 | 1631 | ||
| 1627 | /* Reset the local variables, so that this buffer's local values | 1632 | /* Reset the local variables, so that this buffer's local values |
| 1628 | won't be protected from GC. They would be protected | 1633 | won't be protected from GC. They would be protected |
| 1629 | if they happened to remain encached in their symbols. | 1634 | if they happened to remain cached in their symbols. |
| 1630 | This gets rid of them for certain. */ | 1635 | This gets rid of them for certain. */ |
| 1631 | swap_out_buffer_local_variables (b); | 1636 | swap_out_buffer_local_variables (b); |
| 1632 | reset_buffer_local_variables (b, 1); | 1637 | reset_buffer_local_variables (b, 1); |
| @@ -2481,7 +2486,7 @@ swap_out_buffer_local_variables (struct buffer *b) | |||
| 2481 | Lisp_Object sym = XCAR (XCAR (alist)); | 2486 | Lisp_Object sym = XCAR (XCAR (alist)); |
| 2482 | eassert (XSYMBOL (sym)->redirect == SYMBOL_LOCALIZED); | 2487 | eassert (XSYMBOL (sym)->redirect == SYMBOL_LOCALIZED); |
| 2483 | /* Need not do anything if some other buffer's binding is | 2488 | /* Need not do anything if some other buffer's binding is |
| 2484 | now encached. */ | 2489 | now cached. */ |
| 2485 | if (EQ (SYMBOL_BLV (XSYMBOL (sym))->where, buffer)) | 2490 | if (EQ (SYMBOL_BLV (XSYMBOL (sym))->where, buffer)) |
| 2486 | { | 2491 | { |
| 2487 | /* Symbol is set up for this buffer's old local value: | 2492 | /* Symbol is set up for this buffer's old local value: |