diff options
| author | Richard M. Stallman | 1996-01-02 08:55:11 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-01-02 08:55:11 +0000 |
| commit | ff58478bbbf193fb27603e7639cdcfb8ec241af3 (patch) | |
| tree | 59c90d0ff6a1e520ef95a57c36f42a42a6cde350 | |
| parent | 00550f94af01078a1e5aec7c8f79a26199b201da (diff) | |
| download | emacs-ff58478bbbf193fb27603e7639cdcfb8ec241af3.tar.gz emacs-ff58478bbbf193fb27603e7639cdcfb8ec241af3.zip | |
(replace_buffer_in_all_windows): New function.
Like Freplace_buffer_in_windows but really does all frames.
| -rw-r--r-- | src/window.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c index be1722ae3e4..fd39556b847 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -1624,6 +1624,36 @@ DEFUN ("replace-buffer-in-windows", Freplace_buffer_in_windows, | |||
| 1624 | } | 1624 | } |
| 1625 | return Qnil; | 1625 | return Qnil; |
| 1626 | } | 1626 | } |
| 1627 | |||
| 1628 | /* Replace BUFFER with some other buffer in all windows | ||
| 1629 | of all frames, even those on other keyboards. */ | ||
| 1630 | |||
| 1631 | void | ||
| 1632 | replace_buffer_in_all_windows (buffer) | ||
| 1633 | Lisp_Object buffer; | ||
| 1634 | { | ||
| 1635 | Lisp_Object tail, frame; | ||
| 1636 | |||
| 1637 | #ifdef MULTI_FRAME | ||
| 1638 | Lisp_Object old_selected; | ||
| 1639 | |||
| 1640 | old_selected = selected_window; | ||
| 1641 | |||
| 1642 | /* A single call to window_loop won't do the job | ||
| 1643 | because it only considers frames on the current keyboard. | ||
| 1644 | So loop manually over frames, and handle each one. */ | ||
| 1645 | FOR_EACH_FRAME (tail, frame) | ||
| 1646 | { | ||
| 1647 | Fselect_window (FRAME_SELECTED_WINDOW (XFRAME (frame))); | ||
| 1648 | |||
| 1649 | window_loop (UNSHOW_BUFFER, buffer, 0, frame); | ||
| 1650 | } | ||
| 1651 | |||
| 1652 | Fselect_window (old_selected); | ||
| 1653 | #else | ||
| 1654 | window_loop (UNSHOW_BUFFER, buffer, 0, Qt); | ||
| 1655 | #endif | ||
| 1656 | } | ||
| 1627 | 1657 | ||
| 1628 | /* Set the height of WINDOW and all its inferiors. */ | 1658 | /* Set the height of WINDOW and all its inferiors. */ |
| 1629 | 1659 | ||