aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2003-10-13 19:39:51 +0000
committerRichard M. Stallman2003-10-13 19:39:51 +0000
commit27704b780476eebdb8c922f284c1784569c1efc2 (patch)
treeeebedc6c6d9bd1ea097a46e19846b63452df6088
parent3ff91798a86e60b22ab6eaa04b771342b218969d (diff)
downloademacs-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.texi84
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
99how recently the window was selected 99how recently the window was selected
100
101@item
102fringe settings
103
104@item
105display margins
106
107@item
108scroll-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
149window @var{window} remains the selected window, but occupies only 158window @var{window} remains the selected window, but occupies only
150part of its former screen area. The rest is occupied by a newly created 159part of its former screen area. The rest is occupied by a newly created
151window which is returned as the value of this function. 160window which is returned as the value of this function.
161This function returns the newly created window.
152 162
153If @var{horizontal} is non-@code{nil}, then @var{window} splits into 163If @var{horizontal} is non-@code{nil}, then @var{window} splits into
154two side by side windows. The original window @var{window} keeps the 164two 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:
291This function returns non-@code{nil} if there is only one window. The 301This function returns non-@code{nil} if there is only one window. The
292argument @var{no-mini}, if non-@code{nil}, means don't count the 302argument @var{no-mini}, if non-@code{nil}, means don't count the
293minibuffer even if it is active; otherwise, the minibuffer window is 303minibuffer even if it is active; otherwise, the minibuffer window is
294included, if active, in the total number of windows, which is compared 304counted when it is active.
295against one.
296 305
297The argument @var{all-frames} specifies which frames to consider. Here 306The argument @var{all-frames} specifies which frames to consider. Here
298are the possible values and their meanings: 307are 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{}
425This macro records the selected window of eac frame, executes 434This 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
428This macro does not save or restore anything about the sizes, 437This 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
559Consider all windows in all visible or iconified frames. 568Consider all windows in all visible or iconified frames.
560 569
570@item a frame
571Consider all windows on that frame.
572
561@item anything else 573@item anything else
562Consider precisely the windows in @var{window}'s frame, and no others. 574Consider 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
659Normally, displaying @var{buffer} in @var{window} resets the window's 671Normally, displaying @var{buffer} in @var{window} resets the window's
660fringe widths and position based on the local variables of @var{buffer}. 672display margins, fringe widths, scroll bar settings, and position
661However, if @var{keep-margins} is non-@code{nil}, the fringe widths and 673based on the local variables of @var{buffer}. However, if
662position of @var{window} remain unchanged. @xref{Fringes}. 674@var{keep-margins} is non-@code{nil}, the display margins and fringe
675widths 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
805switches to it in some window, preferably not the window previously 818switches to it in some window, preferably not the window previously
806selected. The ``popped-to'' window becomes the selected window within 819selected. The ``popped-to'' window becomes the selected window within
807its frame. The return value is the buffer that was switched to. 820its frame. The return value is the buffer that was switched to.
821If @var{buffer-or-name} is @code{nil}, that means to choose some
822other buffer, but you don't specify which.
808 823
809If the variable @code{pop-up-frames} is non-@code{nil}, 824If 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
952This variable specifies how to make a new frame if @code{pop-up-frames} 967This variable specifies how to make a new frame if @code{pop-up-frames}
953is non-@code{nil}. 968is non-@code{nil}.
954 969
@@ -989,6 +1004,14 @@ For example:
989@noindent 1004@noindent
990specifies to display a buffer named @samp{myfile} in a dedicated frame 1005specifies to display a buffer named @samp{myfile} in a dedicated frame
991with specified @code{minibuffer} and @code{menu-bar-lines} parameters. 1006with specified @code{minibuffer} and @code{menu-bar-lines} parameters.
1007
1008The list of frame parameters can also use the phony frame parameters
1009@code{same-frame} and @code{same-window}. If the specified frame
1010parameters include @code{(same-window . @var{value})} and @var{value}
1011is non-@code{nil}, that means to display the buffer in the current
1012selected window. Otherwise, if they include @code{(same-frame .
1013@var{value})} and @var{value} is non-@code{nil}, that means to display
1014the 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
1072other buffer. 1095other buffer.
1073 1096
1074@defun window-dedicated-p window 1097@defun window-dedicated-p window
1075This function returns @code{t} if @var{window} is marked as dedicated; 1098This function returns non-@code{nil} if @var{window} is marked as
1076otherwise @code{nil}. 1099dedicated; 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
1327is @code{next-screen-context-lines} lines less than the usable height of 1350is @code{next-screen-context-lines} lines less than the usable height of
1328the window (not counting its mode line). 1351the 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
1354because 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
1339is @code{next-screen-context-lines} lines less than the usable height of 1363is @code{next-screen-context-lines} lines less than the usable height of
1340the window (not counting its mode line). 1364the 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
1367it 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
1573left edge. 1598left 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
1577of a window as necessary to ensure that point is always visible, if 1602the horizontal scrolling of a window as necessary to ensure that point
1578@code{auto-hscroll-mode} is set. However, you can still set the 1603is always visible. However, you can still set the horizontal
1579horizontal scrolling value explicitly. The value you specify serves as 1604scrolling value explicitly. The value you specify serves as a lower
1580a lower bound for automatic scrolling, i.e. automatic scrolling 1605bound for automatic scrolling, i.e. automatic scrolling will not
1581will not scroll a window to a column less than the specified one. 1606scroll 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
1584This function scrolls the selected window @var{count} columns to the 1609This 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
1634This function sets the number of columns from the left margin that 1659This 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. 1661from the left margin. The argument @var{columns} should be zero or
1637Fractional values of @var{columns} are not supported at present. 1662positive; if not, it is taken as zero. Fractional values of
1663@var{columns} are not supported at present.
1638 1664
1639Note that @code{set-window-hscroll} may appear not to work if you test 1665Note that @code{set-window-hscroll} may appear not to work if you test
1640it by evaluating a call with @kbd{M-:} in a simple way. What happens 1666it 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
1686This function returns the number of lines in @var{window}, including 1712This function returns the number of lines in @var{window}, including
1687its mode line and header line, if any. If @var{window} fills its 1713its mode line and header line, if any. If @var{window} fills its
1688entire frame except for the echo area, and there is no tool bar, this 1714entire frame except for the echo area, this is typically one less than
1689is typically one less than the value of @code{frame-height} on that 1715the value of @code{frame-height} on that frame.
1690frame.
1691 1716
1692If @var{window} is @code{nil}, the function uses the selected window. 1717If @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
2012have a scroll bar; positions in a scroll bar are considered outside the 2037have a scroll bar; positions in a scroll bar are considered outside the
2013window for these purposes. 2038window for these purposes.
2014 2039
2040@item left-fringe
2041@itemx right-fringe
2042The coordinates are in the left or right fringe of the window.
2043
2044@item left-margin
2045@itemx right-margin
2046The coordinates are in the left or right margin of the window.
2047
2015@item nil 2048@item nil
2016The coordinates are not in any part of @var{window}. 2049The 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
2029frame---all windows, their sizes, which buffers they contain, what 2062frame---all windows, their sizes, which buffers they contain, what
2030part of each buffer is displayed, and the values of point and the 2063part of each buffer is displayed, and the values of point and the
2031mark. It also includes the values of @code{window-min-height}, 2064mark; also their fringes, margins, and scroll bar settings. It also
2065includes 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
2033exception is made for point in the selected window for the current 2067exception is made for point in the selected window for the current
2034buffer; its value is not saved in the window configuration. 2068buffer; its value is not saved in the window configuration.