Mercurial > emacs
comparison lispref/windows.texi @ 52151:eddd7191f683
(Buffers and Windows): set-window-buffer has new arg.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 06 Aug 2003 01:43:43 +0000 |
parents | 7f2fcfb45bf7 |
children | 695cf19ef79e |
comparison
equal
deleted
inserted
replaced
52150:d35ce1568ac0 | 52151:eddd7191f683 |
---|---|
641 related functions that find a window to use and specify a buffer for it. | 641 related functions that find a window to use and specify a buffer for it. |
642 The functions described there are easier to use than these, but they | 642 The functions described there are easier to use than these, but they |
643 employ heuristics in choosing or creating a window; use these functions | 643 employ heuristics in choosing or creating a window; use these functions |
644 when you need complete control. | 644 when you need complete control. |
645 | 645 |
646 @defun set-window-buffer window buffer-or-name | 646 @defun set-window-buffer window buffer-or-name &optional keep-margins |
647 This function makes @var{window} display @var{buffer-or-name} as its | 647 This function makes @var{window} display @var{buffer-or-name} as its |
648 contents. It returns @code{nil}. This is the fundamental primitive | 648 contents. It returns @code{nil}. This is the fundamental primitive |
649 for changing which buffer is displayed in a window, and all ways | 649 for changing which buffer is displayed in a window, and all ways |
650 of doing that call this function. | 650 of doing that call this function. |
651 | 651 |
653 @group | 653 @group |
654 (set-window-buffer (selected-window) "foo") | 654 (set-window-buffer (selected-window) "foo") |
655 @result{} nil | 655 @result{} nil |
656 @end group | 656 @end group |
657 @end example | 657 @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}. | |
658 @end defun | 663 @end defun |
659 | 664 |
660 @defun window-buffer &optional window | 665 @defun window-buffer &optional window |
661 This function returns the buffer that @var{window} is displaying. If | 666 This function returns the buffer that @var{window} is displaying. If |
662 @var{window} is omitted, this function returns the buffer for the | 667 @var{window} is omitted, this function returns the buffer for the |