diff options
| author | Richard M. Stallman | 2003-10-13 19:39:51 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-10-13 19:39:51 +0000 |
| commit | 27704b780476eebdb8c922f284c1784569c1efc2 (patch) | |
| tree | eebedc6c6d9bd1ea097a46e19846b63452df6088 | |
| parent | 3ff91798a86e60b22ab6eaa04b771342b218969d (diff) | |
| download | emacs-27704b780476eebdb8c922f284c1784569c1efc2.tar.gz emacs-27704b780476eebdb8c922f284c1784569c1efc2.zip | |
(Basic Windows): A window has fringe settings,
display margins and scroll-bar settings.
(Splitting Windows): Doc split-window return value.
Clean up one-window-p.
(Selecting Windows): Fix typo.
(Cyclic Window Ordering): Explain frame as ALL-FRAMES in next-window.
(Buffers and Windows): In set-window-buffer, explain effect
on fringe settings and scroll bar settings.
(Displaying Buffers): In pop-to-buffer, explain nil as buffer arg.
(Choosing Window): Use defopt for pop-up-frame-function.
For special-display-buffer-names, explain same-window and same-frame.
Clarify window-dedicated-p return value.
(Textual Scrolling): scroll-up and scroll-down can get an error.
(Horizontal Scrolling): Clarify auto-hscroll-mode.
Clarify set-window-hscroll.
(Size of Window): Don't mention tool bar in window-height.
(Coordinates and Windows): Explain what coordinates-in-window-p
returns for fringes and display margins.
(Window Configurations): Explain saving fringes, etc.
| -rw-r--r-- | lispref/windows.texi | 84 |
1 files changed, 59 insertions, 25 deletions
diff --git a/lispref/windows.texi b/lispref/windows.texi index 8589f3cdbfa..a8e39f3c5c5 100644 --- a/lispref/windows.texi +++ b/lispref/windows.texi | |||
| @@ -97,6 +97,15 @@ the mark | |||
| 97 | 97 | ||
| 98 | @item | 98 | @item |
| 99 | how recently the window was selected | 99 | how recently the window was selected |
| 100 | |||
| 101 | @item | ||
| 102 | fringe settings | ||
| 103 | |||
| 104 | @item | ||
| 105 | display margins | ||
| 106 | |||
| 107 | @item | ||
| 108 | scroll-bar settings | ||
| 100 | @end itemize | 109 | @end itemize |
| 101 | 110 | ||
| 102 | @cindex multiple windows | 111 | @cindex multiple windows |
| @@ -149,6 +158,7 @@ This function splits @var{window} into two windows. The original | |||
| 149 | window @var{window} remains the selected window, but occupies only | 158 | window @var{window} remains the selected window, but occupies only |
| 150 | part of its former screen area. The rest is occupied by a newly created | 159 | part of its former screen area. The rest is occupied by a newly created |
| 151 | window which is returned as the value of this function. | 160 | window which is returned as the value of this function. |
| 161 | This function returns the newly created window. | ||
| 152 | 162 | ||
| 153 | If @var{horizontal} is non-@code{nil}, then @var{window} splits into | 163 | If @var{horizontal} is non-@code{nil}, then @var{window} splits into |
| 154 | two side by side windows. The original window @var{window} keeps the | 164 | two side by side windows. The original window @var{window} keeps the |
| @@ -291,8 +301,7 @@ You could define a simplified version of the function like this: | |||
| 291 | This function returns non-@code{nil} if there is only one window. The | 301 | This function returns non-@code{nil} if there is only one window. The |
| 292 | argument @var{no-mini}, if non-@code{nil}, means don't count the | 302 | argument @var{no-mini}, if non-@code{nil}, means don't count the |
| 293 | minibuffer even if it is active; otherwise, the minibuffer window is | 303 | minibuffer even if it is active; otherwise, the minibuffer window is |
| 294 | included, if active, in the total number of windows, which is compared | 304 | counted when it is active. |
| 295 | against one. | ||
| 296 | 305 | ||
| 297 | The argument @var{all-frames} specifies which frames to consider. Here | 306 | The argument @var{all-frames} specifies which frames to consider. Here |
| 298 | are the possible values and their meanings: | 307 | are the possible values and their meanings: |
| @@ -422,7 +431,7 @@ The return value is @var{window}. | |||
| 422 | @end defun | 431 | @end defun |
| 423 | 432 | ||
| 424 | @defmac save-selected-window forms@dots{} | 433 | @defmac save-selected-window forms@dots{} |
| 425 | This macro records the selected window of eac frame, executes | 434 | This macro records the selected window of each frame, executes |
| 426 | @var{forms} in sequence, then restores the earlier selected windows. | 435 | @var{forms} in sequence, then restores the earlier selected windows. |
| 427 | 436 | ||
| 428 | This macro does not save or restore anything about the sizes, | 437 | This macro does not save or restore anything about the sizes, |
| @@ -558,6 +567,9 @@ must ensure @var{window} is in a visible frame.) | |||
| 558 | @item 0 | 567 | @item 0 |
| 559 | Consider all windows in all visible or iconified frames. | 568 | Consider all windows in all visible or iconified frames. |
| 560 | 569 | ||
| 570 | @item a frame | ||
| 571 | Consider all windows on that frame. | ||
| 572 | |||
| 561 | @item anything else | 573 | @item anything else |
| 562 | Consider precisely the windows in @var{window}'s frame, and no others. | 574 | Consider precisely the windows in @var{window}'s frame, and no others. |
| 563 | @end table | 575 | @end table |
| @@ -657,9 +669,10 @@ of doing that call this function. | |||
| 657 | @end example | 669 | @end example |
| 658 | 670 | ||
| 659 | Normally, displaying @var{buffer} in @var{window} resets the window's | 671 | Normally, displaying @var{buffer} in @var{window} resets the window's |
| 660 | fringe widths and position based on the local variables of @var{buffer}. | 672 | display margins, fringe widths, scroll bar settings, and position |
| 661 | However, if @var{keep-margins} is non-@code{nil}, the fringe widths and | 673 | based on the local variables of @var{buffer}. However, if |
| 662 | position of @var{window} remain unchanged. @xref{Fringes}. | 674 | @var{keep-margins} is non-@code{nil}, the display margins and fringe |
| 675 | widths of @var{window} remain unchanged. @xref{Fringes}. | ||
| 663 | @end defun | 676 | @end defun |
| 664 | 677 | ||
| 665 | @defun window-buffer &optional window | 678 | @defun window-buffer &optional window |
| @@ -805,6 +818,8 @@ This function makes @var{buffer-or-name} the current buffer and | |||
| 805 | switches to it in some window, preferably not the window previously | 818 | switches to it in some window, preferably not the window previously |
| 806 | selected. The ``popped-to'' window becomes the selected window within | 819 | selected. The ``popped-to'' window becomes the selected window within |
| 807 | its frame. The return value is the buffer that was switched to. | 820 | its frame. The return value is the buffer that was switched to. |
| 821 | If @var{buffer-or-name} is @code{nil}, that means to choose some | ||
| 822 | other buffer, but you don't specify which. | ||
| 808 | 823 | ||
| 809 | If the variable @code{pop-up-frames} is non-@code{nil}, | 824 | If the variable @code{pop-up-frames} is non-@code{nil}, |
| 810 | @code{pop-to-buffer} looks for a window in any visible frame already | 825 | @code{pop-to-buffer} looks for a window in any visible frame already |
| @@ -948,7 +963,7 @@ splits a window or reuses one. | |||
| 948 | @end defopt | 963 | @end defopt |
| 949 | 964 | ||
| 950 | @c Emacs 19 feature | 965 | @c Emacs 19 feature |
| 951 | @defvar pop-up-frame-function | 966 | @defopt pop-up-frame-function |
| 952 | This variable specifies how to make a new frame if @code{pop-up-frames} | 967 | This variable specifies how to make a new frame if @code{pop-up-frames} |
| 953 | is non-@code{nil}. | 968 | is non-@code{nil}. |
| 954 | 969 | ||
| @@ -989,6 +1004,14 @@ For example: | |||
| 989 | @noindent | 1004 | @noindent |
| 990 | specifies to display a buffer named @samp{myfile} in a dedicated frame | 1005 | specifies to display a buffer named @samp{myfile} in a dedicated frame |
| 991 | with specified @code{minibuffer} and @code{menu-bar-lines} parameters. | 1006 | with specified @code{minibuffer} and @code{menu-bar-lines} parameters. |
| 1007 | |||
| 1008 | The list of frame parameters can also use the phony frame parameters | ||
| 1009 | @code{same-frame} and @code{same-window}. If the specified frame | ||
| 1010 | parameters include @code{(same-window . @var{value})} and @var{value} | ||
| 1011 | is non-@code{nil}, that means to display the buffer in the current | ||
| 1012 | selected window. Otherwise, if they include @code{(same-frame . | ||
| 1013 | @var{value})} and @var{value} is non-@code{nil}, that means to display | ||
| 1014 | the buffer in a new window in the currently selected frame. | ||
| 992 | @end defopt | 1015 | @end defopt |
| 993 | 1016 | ||
| 994 | @defopt special-display-regexps | 1017 | @defopt special-display-regexps |
| @@ -1072,8 +1095,8 @@ A window can be marked as ``dedicated'' to its buffer. Then | |||
| 1072 | other buffer. | 1095 | other buffer. |
| 1073 | 1096 | ||
| 1074 | @defun window-dedicated-p window | 1097 | @defun window-dedicated-p window |
| 1075 | This function returns @code{t} if @var{window} is marked as dedicated; | 1098 | This function returns non-@code{nil} if @var{window} is marked as |
| 1076 | otherwise @code{nil}. | 1099 | dedicated; otherwise @code{nil}. |
| 1077 | @end defun | 1100 | @end defun |
| 1078 | 1101 | ||
| 1079 | @defun set-window-dedicated-p window flag | 1102 | @defun set-window-dedicated-p window flag |
| @@ -1327,7 +1350,8 @@ If @var{count} is @code{nil} (or omitted), then the length of scroll | |||
| 1327 | is @code{next-screen-context-lines} lines less than the usable height of | 1350 | is @code{next-screen-context-lines} lines less than the usable height of |
| 1328 | the window (not counting its mode line). | 1351 | the window (not counting its mode line). |
| 1329 | 1352 | ||
| 1330 | @code{scroll-up} returns @code{nil}. | 1353 | @code{scroll-up} returns @code{nil}, unless it gets an error |
| 1354 | because it can't scroll any further. | ||
| 1331 | @end deffn | 1355 | @end deffn |
| 1332 | 1356 | ||
| 1333 | @deffn Command scroll-down &optional count | 1357 | @deffn Command scroll-down &optional count |
| @@ -1339,7 +1363,8 @@ If @var{count} is omitted or @code{nil}, then the length of the scroll | |||
| 1339 | is @code{next-screen-context-lines} lines less than the usable height of | 1363 | is @code{next-screen-context-lines} lines less than the usable height of |
| 1340 | the window (not counting its mode line). | 1364 | the window (not counting its mode line). |
| 1341 | 1365 | ||
| 1342 | @code{scroll-down} returns @code{nil}. | 1366 | @code{scroll-down} returns @code{nil}, unless it gets an error because |
| 1367 | it can't scroll any further. | ||
| 1343 | @end deffn | 1368 | @end deffn |
| 1344 | 1369 | ||
| 1345 | @deffn Command scroll-other-window &optional count | 1370 | @deffn Command scroll-other-window &optional count |
| @@ -1573,12 +1598,12 @@ left you can scroll, but eventually all the text will disappear off the | |||
| 1573 | left edge. | 1598 | left edge. |
| 1574 | 1599 | ||
| 1575 | @vindex auto-hscroll-mode | 1600 | @vindex auto-hscroll-mode |
| 1576 | In Emacs 21, redisplay automatically alters the horizontal scrolling | 1601 | If @code{auto-hscroll-mode} is set, redisplay automatically alters |
| 1577 | of a window as necessary to ensure that point is always visible, if | 1602 | the horizontal scrolling of a window as necessary to ensure that point |
| 1578 | @code{auto-hscroll-mode} is set. However, you can still set the | 1603 | is always visible. However, you can still set the horizontal |
| 1579 | horizontal scrolling value explicitly. The value you specify serves as | 1604 | scrolling value explicitly. The value you specify serves as a lower |
| 1580 | a lower bound for automatic scrolling, i.e. automatic scrolling | 1605 | bound for automatic scrolling, i.e. automatic scrolling will not |
| 1581 | will not scroll a window to a column less than the specified one. | 1606 | scroll a window to a column less than the specified one. |
| 1582 | 1607 | ||
| 1583 | @deffn Command scroll-left &optional count | 1608 | @deffn Command scroll-left &optional count |
| 1584 | This function scrolls the selected window @var{count} columns to the | 1609 | This function scrolls the selected window @var{count} columns to the |
| @@ -1631,10 +1656,11 @@ If @var{window} is @code{nil}, the selected window is used. | |||
| 1631 | @end defun | 1656 | @end defun |
| 1632 | 1657 | ||
| 1633 | @defun set-window-hscroll window columns | 1658 | @defun set-window-hscroll window columns |
| 1634 | This function sets the number of columns from the left margin that | 1659 | This function sets horizontal scrolling of @var{window}. The value of |
| 1635 | @var{window} is scrolled from the value of @var{columns}. The argument | 1660 | @var{columns} specifies the amount of scrolling, in terms of columns |
| 1636 | @var{columns} should be zero or positive; if not, it is taken as zero. | 1661 | from the left margin. The argument @var{columns} should be zero or |
| 1637 | Fractional values of @var{columns} are not supported at present. | 1662 | positive; if not, it is taken as zero. Fractional values of |
| 1663 | @var{columns} are not supported at present. | ||
| 1638 | 1664 | ||
| 1639 | Note that @code{set-window-hscroll} may appear not to work if you test | 1665 | Note that @code{set-window-hscroll} may appear not to work if you test |
| 1640 | it by evaluating a call with @kbd{M-:} in a simple way. What happens | 1666 | it by evaluating a call with @kbd{M-:} in a simple way. What happens |
| @@ -1685,9 +1711,8 @@ characters that separates side-by-side windows. | |||
| 1685 | @defun window-height &optional window | 1711 | @defun window-height &optional window |
| 1686 | This function returns the number of lines in @var{window}, including | 1712 | This function returns the number of lines in @var{window}, including |
| 1687 | its mode line and header line, if any. If @var{window} fills its | 1713 | its mode line and header line, if any. If @var{window} fills its |
| 1688 | entire frame except for the echo area, and there is no tool bar, this | 1714 | entire frame except for the echo area, this is typically one less than |
| 1689 | is typically one less than the value of @code{frame-height} on that | 1715 | the value of @code{frame-height} on that frame. |
| 1690 | frame. | ||
| 1691 | 1716 | ||
| 1692 | If @var{window} is @code{nil}, the function uses the selected window. | 1717 | If @var{window} is @code{nil}, the function uses the selected window. |
| 1693 | 1718 | ||
| @@ -2012,6 +2037,14 @@ neighbor to the right. This value occurs only if the window doesn't | |||
| 2012 | have a scroll bar; positions in a scroll bar are considered outside the | 2037 | have a scroll bar; positions in a scroll bar are considered outside the |
| 2013 | window for these purposes. | 2038 | window for these purposes. |
| 2014 | 2039 | ||
| 2040 | @item left-fringe | ||
| 2041 | @itemx right-fringe | ||
| 2042 | The coordinates are in the left or right fringe of the window. | ||
| 2043 | |||
| 2044 | @item left-margin | ||
| 2045 | @itemx right-margin | ||
| 2046 | The coordinates are in the left or right margin of the window. | ||
| 2047 | |||
| 2015 | @item nil | 2048 | @item nil |
| 2016 | The coordinates are not in any part of @var{window}. | 2049 | The coordinates are not in any part of @var{window}. |
| 2017 | @end table | 2050 | @end table |
| @@ -2028,7 +2061,8 @@ argument because it always uses the frame that @var{window} is on. | |||
| 2028 | A @dfn{window configuration} records the entire layout of one | 2061 | A @dfn{window configuration} records the entire layout of one |
| 2029 | frame---all windows, their sizes, which buffers they contain, what | 2062 | frame---all windows, their sizes, which buffers they contain, what |
| 2030 | part of each buffer is displayed, and the values of point and the | 2063 | part of each buffer is displayed, and the values of point and the |
| 2031 | mark. It also includes the values of @code{window-min-height}, | 2064 | mark; also their fringes, margins, and scroll bar settings. It also |
| 2065 | includes the values of @code{window-min-height}, | ||
| 2032 | @code{window-min-width} and @code{minibuffer-scroll-window}. An | 2066 | @code{window-min-width} and @code{minibuffer-scroll-window}. An |
| 2033 | exception is made for point in the selected window for the current | 2067 | exception is made for point in the selected window for the current |
| 2034 | buffer; its value is not saved in the window configuration. | 2068 | buffer; its value is not saved in the window configuration. |