643 |
employ heuristics in choosing or creating a window; use these functions |
employ heuristics in choosing or creating a window; use these functions |
644 |
when you need complete control. |
when you need complete control. |
645 |
|
|
646 |
@defun set-window-buffer window buffer-or-name |
@defun set-window-buffer window buffer-or-name &optional keep-margins |
647 |
This function makes @var{window} display @var{buffer-or-name} as its |
This function makes @var{window} display @var{buffer-or-name} as its |
648 |
contents. It returns @code{nil}. This is the fundamental primitive |
contents. It returns @code{nil}. This is the fundamental primitive |
649 |
for changing which buffer is displayed in a window, and all ways |
for changing which buffer is displayed in a window, and all ways |
655 |
@result{} nil |
@result{} nil |
656 |
@end group |
@end group |
657 |
@end example |
@end example |
658 |
|
|
659 |
|
Normally, displaying @var{buffer} in @var{window} resets the window's |
660 |
|
fringe widths and position based on the local variables of @var{buffer}. |
661 |
|
However, if @var{keep-margins} is non-@code{nil}, the fringe widths and |
662 |
|
position of @var{window} remain unchanged. @xref{Fringes}. |
663 |
@end defun |
@end defun |
664 |
|
|
665 |
@defun window-buffer &optional window |
@defun window-buffer &optional window |