diff options
| author | Karl Heuer | 1996-01-17 19:03:02 +0000 |
|---|---|---|
| committer | Karl Heuer | 1996-01-17 19:03:02 +0000 |
| commit | 27abb84f2a81b49a95b6d0a437f9be0669b571e8 (patch) | |
| tree | 9b2dc776bde22f887072de43447b04ce59f06055 /src | |
| parent | e67aa67d52867b2dd3445df548373a0b8e00dda6 (diff) | |
| download | emacs-27abb84f2a81b49a95b6d0a437f9be0669b571e8.tar.gz emacs-27abb84f2a81b49a95b6d0a437f9be0669b571e8.zip | |
(replace_buffer_in_all_windows): Don't change selected
window, even temporarily; that has undesirable side effects.
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/window.c b/src/window.c index 41b89673afd..4939a195fe6 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -1635,25 +1635,14 @@ void | |||
| 1635 | replace_buffer_in_all_windows (buffer) | 1635 | replace_buffer_in_all_windows (buffer) |
| 1636 | Lisp_Object buffer; | 1636 | Lisp_Object buffer; |
| 1637 | { | 1637 | { |
| 1638 | #ifdef MULTI_KBOARD | ||
| 1638 | Lisp_Object tail, frame; | 1639 | Lisp_Object tail, frame; |
| 1639 | 1640 | ||
| 1640 | #ifdef MULTI_FRAME | ||
| 1641 | Lisp_Object old_selected; | ||
| 1642 | |||
| 1643 | old_selected = selected_window; | ||
| 1644 | |||
| 1645 | /* A single call to window_loop won't do the job | 1641 | /* A single call to window_loop won't do the job |
| 1646 | because it only considers frames on the current keyboard. | 1642 | because it only considers frames on the current keyboard. |
| 1647 | So loop manually over frames, and handle each one. */ | 1643 | So loop manually over frames, and handle each one. */ |
| 1648 | FOR_EACH_FRAME (tail, frame) | 1644 | FOR_EACH_FRAME (tail, frame) |
| 1649 | { | 1645 | window_loop (UNSHOW_BUFFER, buffer, 0, frame); |
| 1650 | Fselect_window (FRAME_SELECTED_WINDOW (XFRAME (frame))); | ||
| 1651 | |||
| 1652 | window_loop (UNSHOW_BUFFER, buffer, 0, frame); | ||
| 1653 | } | ||
| 1654 | |||
| 1655 | if (!NILP (Fwindow_live_p (old_selected))) | ||
| 1656 | Fselect_window (old_selected); | ||
| 1657 | #else | 1646 | #else |
| 1658 | window_loop (UNSHOW_BUFFER, buffer, 0, Qt); | 1647 | window_loop (UNSHOW_BUFFER, buffer, 0, Qt); |
| 1659 | #endif | 1648 | #endif |