aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2011-11-08 15:43:30 +0800
committerChong Yidong2011-11-08 15:43:30 +0800
commita79db6e01262fc0d55b7ee32cbfba4611d44e584 (patch)
treeb604b48db68a4ba88aa0c0669abd6e6d9882ad43
parent105216ed03e65f32a7477ba3d27ab05c94bd3449 (diff)
downloademacs-a79db6e01262fc0d55b7ee32cbfba4611d44e584.tar.gz
emacs-a79db6e01262fc0d55b7ee32cbfba4611d44e584.zip
Edits to Window Sizes node of Lisp manual.
* doc/lispref/windows.texi (Window Sizes): Copyedits. Document window-text-height. Remove window-min-height and window-min-width discussion, referring instead to Emacs manual. (Splitting Windows, Resizing Windows): Add xref to Emacs manual.
-rw-r--r--doc/lispref/ChangeLog7
-rw-r--r--doc/lispref/windows.texi401
2 files changed, 151 insertions, 257 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index ff629ce67ae..47214596c1a 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,10 @@
12011-11-08 Chong Yidong <cyd@gnu.org>
2
3 * windows.texi (Window Sizes): Copyedits. Document
4 window-text-height. Remove window-min-height and window-min-width
5 discussion, referring instead to Emacs manual.
6 (Splitting Windows, Resizing Windows): Add xref to Emacs manual.
7
12011-11-07 Glenn Morris <rgm@gnu.org> 82011-11-07 Glenn Morris <rgm@gnu.org>
2 9
3 * windows.texi (Choosing Window): Fix keybinding typo. 10 * windows.texi (Choosing Window): Fix keybinding typo.
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 02626adfd87..2bb30dd4cbc 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -340,13 +340,12 @@ internal window). The @var{edges} element is a list @code{(@var{left}
340@cindex window size 340@cindex window size
341@cindex size of window 341@cindex size of window
342 342
343Emacs windows are rectangular. The structure of a live window can be 343 The following schematic shows the structure of a live window:
344roughly sketched as follows:
345 344
346@smallexample 345@smallexample
347@group 346@group
348 _________________________________________ 347 _________________________________________
349 ^ |______________ Header Line_______________| 348 ^ |______________ Header Line_______________|
350 | |LS|LF|LM| |RM|RF|RS| ^ 349 | |LS|LF|LM| |RM|RF|RS| ^
351 | | | | | | | | | | 350 | | | | | | | | | |
352 Window | | | | Text Area | | | | Window 351 Window | | | | Text Area | | | | Window
@@ -362,295 +361,177 @@ roughly sketched as follows:
362@end smallexample 361@end smallexample
363 362
364@cindex window body 363@cindex window body
364@cindex text area of a window
365@cindex body of a window 365@cindex body of a window
366The text area constitutes the body of the window. In its most simple 366 At the center of the window is the @dfn{text area}, or @dfn{body},
367form, a window consists of its body alone. LS and RS stand for the left 367where the buffer text is displayed. On each side of the text area is
368and right scroll bar (@pxref{Scroll Bars}) respectively. Only one of 368a series of vertical areas; from innermost to outermost, these are the
369them can be present at any time. LF and RF denote the left and right 369left and right margins, denoted by LM and RM in the schematic
370fringe, see @ref{Fringes}. LM and RM, finally, stand for the left and 370(@pxref{Display Margins}); the left and right fringes, denoted by LF
371right display margin, see @ref{Display Margins}. The header line, if 371and RF (@pxref{Fringes}); and the left or right scroll bar, only one of
372present, is located above theses areas, the mode line below, see 372which is present at any time, denoted by LS and RS (@pxref{Scroll
373@ref{Mode Line Format}. 373Bars}). At the top of the window is an optional header line
374(@pxref{Header Lines}), and at the bottom of the window is the mode
375line (@pxref{Mode Line Format}).
376
377 Emacs provides several functions for finding the height and width of
378a window. Most of these functions report the values as integer
379multiples of the default character height and width. On a graphical
380display, the actual screen size of this default height and width are
381those specified by the frame's default font. Hence, if the buffer
382contains text that is displayed in a different size, the reported
383height and width of the window may differ from the actual number of
384text lines or columns displayed in it.
374 385
375@cindex window height 386@cindex window height
376@cindex total window height
377@cindex height of a window 387@cindex height of a window
378@cindex total height of a window 388@cindex total height of a window
379The @dfn{total height of a window} is specified as the total number of
380lines occupied by the window. Any mode or header line is included in a
381window's total height. For an internal window, the total height is
382calculated recursively from the total heights of its child windows.
383
384@cindex window width 389@cindex window width
385@cindex total window width
386@cindex width of a window 390@cindex width of a window
387@cindex total width of a window 391@cindex total width of a window
388The @dfn{total width of a window} denotes the total number of columns of 392 The @dfn{total height} of a window is the distance between the top
389the window. Any scroll bar and the column of @samp{|} characters that 393and bottom of the window, including the header line (if one exists)
390separate the window from its right sibling are included in a window's 394and the mode line. The @dfn{total width} of a window is the distance
391total width. On a window-system, fringes and display margins are 395between the left and right edges of the mode line. Note that the
392included in a window's total width too. For an internal window, the 396height of a frame is not the same as the height of its windows, since
393total width is calculated recursively from the total widths of its child 397a frame may also contain an echo area, menu bar, and tool bar
394windows. 398(@pxref{Size and Position}).
395
396@cindex total size of a window
397@cindex total window size
398The following function is the standard interface for getting the total
399size of any window:
400
401@defun window-total-size &optional window &optional horizontal
402This function returns the total number of lines of @var{window}. The
403argument @var{window} can denote any window and defaults to the selected
404one. If @var{window} is live, the return value includes any header or
405mode lines of @var{window}. If @var{window} is internal, the return
406value is the sum of the total heights of @var{window}'s child windows
407provided these are vertically combined and the height of @var{window}'s
408first child if they are horizontally combined.
409
410 If the optional argument @var{horizontal} is non-@code{nil}, this
411function returns the total number of columns of @var{window}. If
412@var{window} is live, the return value includes any vertical divider
413column or scroll bars of @var{window}. On a window-system, the return
414value includes the space occupied by any margins and fringes of
415@var{window} too. If @var{window} is internal, the return value is the
416sum of the total widths of @var{window}'s child windows provided these
417are horizontally combined and the width of @var{window}'s first child
418otherwise.
419@end defun
420
421Alternatively, the following two functions can be used to retrieve
422either the total height or the total width of a window:
423 399
424@defun window-total-height &optional window 400@defun window-total-height &optional window
425This function returns the total number of lines of @var{window}. 401This function returns the total height, in lines, of the window
426@var{window} can be any window and defaults to the selected one. The 402@var{window}. If @var{window} is omitted or @code{nil}, it defaults
427return value includes @var{window}'s mode line and header line, if any. 403to the selected window. If @var{window} is an internal window, the
428If @var{window} is internal the return value is the sum of heights of 404return value is the total height occupied by its descendant windows.
429@var{window}'s child windows for a vertical combination and the height
430of @var{window}'s first child otherwise.
431@end defun 405@end defun
432 406
433@defun window-total-width &optional window 407@defun window-total-width &optional window
434This function returns the total number of columns of @var{window}. 408This function returns the total width, in columns, of the window
435@var{window} can be any window and defaults to the selected one. The 409@var{window}. If @var{window} is omitted or @code{nil}, it defaults
436return value includes any vertical dividers or scrollbars of 410to the selected window. If @var{window} is internal, the return value
437@var{window}. On a window-system the return value also includes the 411is the total width occupied by its descendant windows.
438space occupied by any margins and fringes of @var{window}. If 412@end defun
439@var{window} is internal, the return value is the sum of the widths of
440@var{window}'s child windows for a horizontal combination and the width
441of @var{window}'s first child otherwise.
442@end defun
443
444The total height of any window is usually less than the height of the
445window's frame, because the latter may also include the minibuffer
446window. Depending on the toolkit in use, the frame height can also
447include the menu bar and the tool bar (@pxref{Size and Position}).
448Therefore, in general it is not straightforward to compare window and
449frame heights. The following function is useful to determine whether
450there are no other windows above or below a specified window.
451 413
452@cindex full-height window 414@defun window-total-size &optional window horizontal
453@defun window-full-height-p &optional window 415This function returns either the total height or width of the window
454This function returns non-@code{nil} if there is no other window above 416@var{window}. If @var{horizontal} is omitted or @code{nil}, this is
455or below @var{window} on the containing frame. More precisely, this 417equivalent to calling @code{window-total-height} for @var{window};
456function returns @code{t} if and only if the total height of 418otherwise it is equivalent to calling @code{window-total-width} for
457@var{window} equals the total height of the root window (@pxref{Windows 419@var{window}.
458and Frames}) of @var{window}'s frame. The @var{window} argument may
459denote any window and defaults to the selected one.
460@end defun 420@end defun
461 421
462@cindex full-width window 422@cindex full-width window
463The following function can be used to determine whether there are no 423@cindex full-height window
464other windows on the left or right of a specified window. 424 The following functions can be used to determine whether a given
425window has any adjacent windows.
426
427@defun window-full-height-p &optional window
428This function returns non-@code{nil} if @var{window} has no other
429window above or below it in its frame, i.e. its total height equals
430the total height of the root window on that frame. If @var{window} is
431omitted or @code{nil}, it defaults to the selected window.
432@end defun
465 433
466@defun window-full-width-p &optional window 434@defun window-full-width-p &optional window
467This function returns non-@code{nil} if there are no other windows on 435This function returns non-@code{nil} if @var{window} has no other
468the left or right of @var{window}; @code{nil} otherwise. More 436window to the left or right in its frame, i.e. its total width equals
469precisely, this function returns @code{t} if and only if the total width 437that of the root window on that frame. If @var{window} is omitted or
470of @var{window} equals the total width of the root window 438@code{nil}, it defaults to the selected window.
471(@pxref{Windows and Frames}) of @var{window}'s frame. The @var{window}
472argument may denote any window and defaults to the selected one.
473@end defun 439@end defun
474 440
475@cindex top line of window 441@cindex window position
476@cindex left column of window 442 The following functions can be used to determine the position of a
477 The windows of a frame are unambiguously characterized by the 443window relative to the window area of its frame:
478combination of their top line and left column within that frame.
479 444
480@defun window-top-line &optional window 445@defun window-top-line &optional window
481This function returns the top line of @var{window}. The argument 446This function returns the distance, in lines, between the top of
482@var{window} can denote any window and defaults to the selected one. 447@var{window} and the top of the frame's window area. For instance,
448the return value is 0 if there is no window above @var{window}. If
449@var{window} is omitted or @code{nil}, it defaults to the selected
450window.
483@end defun 451@end defun
484 452
485@defun window-left-column &optional window 453@defun window-left-column &optional window
486This function returns the left column of @var{window}. The argument 454This function returns the distance, in columns, between the left edge
487@var{window} can denote any window and defaults to the selected one. 455of @var{window} and the left edge of the frame's window area. For
456instance, the return value is 0 if there is no window to the left of
457@var{window}. If @var{window} is omitted or @code{nil}, it defaults
458to the selected window.
488@end defun 459@end defun
489 460
490For a frame displaying one window only, that window's top line and left
491column are both zero. When a frame displays a window @var{WB} below a
492window @var{WA}, the top line of @var{WB} can be calculated by adding
493the total height of @var{WA} to the top line of @var{WA}. When a frame
494displays a window @var{WR} on the right of a window @var{WL}, the left
495column of @var{WR} can be calculated by adding the total width of
496@var{WL} to the left column of @var{WL}.
497
498@cindex window body height 461@cindex window body height
499@cindex body height of a window 462@cindex body height of a window
500The @dfn{body height of a window} is specified as the total number of
501lines occupied by the window's text area. Mode or header lines are not
502included in a window's body height.
503
504@cindex window body width 463@cindex window body width
505@cindex body width of a window 464@cindex body width of a window
506The @dfn{body width of a window} denotes the total number of columns
507occupied by the window's text area. Scroll bars or columns of @samp{|}
508characters that separate side-by-side windows are not included in a
509window's body width.
510
511@cindex body size of a window 465@cindex body size of a window
512@cindex window body size 466@cindex window body size
513@cindex canonical units of window/frame size 467 The @dfn{body height} of a window is the height of its text area,
514The following functions retrieve height and width of the body of a 468which does not include the mode or header line. Similarly, the
515live window. Note that the values these functions return are measured 469@dfn{body width} is the width of the text area, which does not include
516in @dfn{canonical units}, i.e.@: for the default frame's face. If the 470the scroll bar, fringes, or margins.
517window shows some characters with non-default face, e.g., if the font
518of some characters is larger or smaller than the default font, the
519values returned by these functions will not match the actual number of
520lines or characters per line shown in the window. To get the actual
521number of columns and lines, move to the last character in the line
522(e.g., with @code{end-of-visual-line}) or to the last line of the
523window (e.g., with @code{window-end}), and use @code{posn-at-point} to
524find the line or column there.
525
526@defun window-body-size &optional window horizontal
527This function returns the number of lines of @var{window}'s text area.
528@var{window} must be a live window and defaults to the selected one.
529The return value does not count any mode or header line of @var{window}.
530
531Optional argument @var{horizontal} non-@code{nil} means to return the
532number of columns of @var{window}'s text area. In this case the return
533value does not include any vertical divider or scroll bar owned by
534@var{window}. On a window-system the return value does not include the
535number of columns used for @var{window}'s fringes or display margins
536either.
537@end defun
538 471
539@defun window-body-height &optional window 472@defun window-body-height &optional window
540This function returns the number of lines of @var{window}'s body. 473This function returns the body height, in lines, of the window
541@var{window} must be a live window and defaults to the selected one. 474@var{window}. If @var{window} is omitted or @code{nil}, it defaults
475to the selected window; otherwise it must be a live window.
542 476
543The return value does not include @var{window}'s mode line and header 477If there is a partially-visible line at the bottom of the text area,
544line, if any. If a line at the bottom of the window is only partially 478that counts as a whole line; to exclude such a partially-visible line,
545visible, that line is included in the return value. If you do not 479use @code{window-text-height}, below.
546want to include a partially visible bottom line in the return value,
547use @code{window-text-height} instead.
548@end defun 480@end defun
549 481
550@defun window-body-width &optional window 482@defun window-body-width &optional window
551This function returns the number of columns of @var{window}'s body. 483This function returns the body width, in columns, of the window
552@var{window} must be a live window and defaults to the selected one. 484@var{window}. If @var{window} is omitted or @code{nil}, it defaults
553 485to the selected window; otherwise it must be a live window.
554The return value does not include any vertical dividers or scroll bars
555owned by @var{window}. On a window-system the return value does not
556include the number of columns used for @var{window}'s fringes or
557display margins either.
558@end defun 486@end defun
559 487
560The following functions have been used in earlier versions of Emacs. 488@defun window-body-size &optional window horizontal
561They are still supported but due to the confusing nomenclature they 489This function returns the body height or body width of @var{window}.
562should not be used any more in future code. 490If @var{horizontal} is omitted or @code{nil}, it is equivalent to
563 491calling @code{window-body-height} for @var{window}; otherwise it is
564@defun window-height &optional window 492equivalent to calling @code{window-body-width}.
565This function is an alias for `window-total-height', see above.
566@end defun 493@end defun
567 494
568@defun window-width &optional window 495@defun window-text-height &optional window
569This function is an alias for `window-body-width', see above. 496This function is like @code{window-body-height}, except that any
497partially-visible line at the bottom of the text area is not counted.
570@end defun 498@end defun
571 499
572@cindex minimum window size 500 For compatibility with previous versions of Emacs,
573 The following two options constrain the sizes of windows to a minimum 501@code{window-height} is an alias for @code{window-body-height}, and
574height and width. Their values are honored when windows are split 502@code{window-width} is an alias for @code{window-body-width}. These
575(@pxref{Splitting Windows}) or resized (@pxref{Resizing Windows}). Any 503aliases are considered obsolete and will be removed in the future.
576request to make a window smaller than specified here will usually result
577in an error.
578
579@defopt window-min-height
580The value of this variable specifies how short a window may be. The
581value is measured in line units and has to account for any header or
582mode line. The default value for this option is @code{4}. Values less
583than @code{1} are ignored.
584@end defopt
585
586@defopt window-min-width
587The value of this variable specifies how narrow a window may be. The
588value is measured in characters and includes any margins, fringes,
589scroll bar and vertical divider column. The default value for this
590option is @code{10}. A value less than @code{2} is ignored.
591@end defopt
592
593Applications should not rebind these variables. To shrink a specific
594window to a height or width less than the one specified here, they
595should rather invoke @code{window-resize} (@pxref{Resizing Windows})
596with a non-@code{nil} @var{ignore} argument. The function
597@code{split-window} (@pxref{Splitting Windows}) can make a window
598smaller than specified here by calling it with a non-@code{nil}
599@var{size} argument. Interactively, the values specified here cannot be
600overridden.
601
602 Earlier versions of Emacs could delete a window when its size dropped
603below @code{window-min-height} or @code{window-min-width}. As a rule,
604the current version of Emacs does no more delete windows by side-effect.
605The only exception to this rule are requests to resize a frame which may
606implicitly delete windows when they do not fit on the frame any more,
607see @ref{Size and Position}.
608
609 The size of a window can be fixed which means that it cannot be split
610(@pxref{Splitting Windows}) or resized (@pxref{Resizing Windows}).
611 504
612@cindex fixed-size window 505@cindex fixed-size window
506 Commands that change the size of windows (@pxref{Resizing Windows}),
507or split them (@pxref{Splitting Windows}), obey the variables
508@code{window-min-height} and @code{window-min-width}, which specify
509the smallest allowable window height and width. @xref{Change
510Window,,Deleting and Rearranging Windows, emacs, The GNU Emacs
511Manual}. They also obey the variable @code{window-size-fixed}, with
512which a window can be @dfn{fixed} in size:
513
613@defvar window-size-fixed 514@defvar window-size-fixed
614If this variable is non-@code{nil}, in a given buffer, then the size of 515If this buffer-local variable is non-@code{nil}, the size of any
615any window displaying that buffer remains fixed unless you either 516window displaying the buffer cannot normally be changed. Deleting a
616explicitly change it or Emacs has no other choice. 517window or changing the frame's size may still change its size, if
518there is no choice.
617 519
618If the value is @code{height}, then only the window's height is fixed; 520If the value is @code{height}, then only the window's height is fixed;
619if the value is @code{width}, then only the window's width is fixed. 521if the value is @code{width}, then only the window's width is fixed.
620Any other non-@code{nil} value fixes both the width and the height. 522Any other non-@code{nil} value fixes both the width and the height.
621
622This variable automatically becomes buffer-local when set.
623@end defvar 523@end defvar
624 524
625Commands supposed to explicitly change the size of windows such as
626@code{enlarge-window} (@pxref{Resizing Windows}) get an error if they
627had to change a window size which is fixed. Other functions like
628@code{window-resize} (@pxref{Resizing Windows}) have an optional
629@var{ignore} argument which allows to change the size of fixed-size
630windows.
631
632 Deleting a window or changing a frame's size may change the size of a
633fixed-size window, if there is no other alternative.
634
635 The height of a vertical combination of windows cannot be changed
636when the height of all these windows is fixed. Its width cannot be
637changed if the width of at least one of these windows is fixed.
638Similarly, the width of a horizontal combination of windows cannot be
639changed when the width of all these windows is fixed. Its height cannot
640be changed if the height of at least one of these windows is fixed.
641
642 The next function allows to check whether the size of an arbitrary
643window is fixed.
644
645@defun window-size-fixed-p &optional window horizontal 525@defun window-size-fixed-p &optional window horizontal
646This function returns non-@code{nil} if @var{window}'s height is fixed. 526This function returns a non-@code{nil} value if @var{window}'s height
647The argument @var{window} can be an arbitrary window and defaults to the 527is fixed. If @var{window} is omitted or @code{nil}, it defaults to
648selected one. Optional argument @var{horizontal} non-@code{nil} means 528the selected window. If the optional argument @var{horizontal} is
649return non-@code{nil} if @var{window}'s width is fixed. 529non-@code{nil}, the return value is non-@code{nil} if @var{window}'s
530width is fixed.
650 531
651If this function returns @code{nil}, this does not necessarily mean that 532A @code{nil} return value does not necessarily mean that @var{window}
652@var{window} can be resized in the desired direction. The function 533can be resized in the desired direction. To determine that, use the
653@code{window-resizable} (@pxref{Resizing Windows}) can tell that. 534function @code{window-resizable}. @xref{Resizing Windows}.
654@end defun 535@end defun
655 536
656 537
@@ -703,13 +584,17 @@ shrunk by -@var{delta} lines or columns, this function returns the
703minimum value in the range from @var{delta} to 0 that can be used for 584minimum value in the range from @var{delta} to 0 that can be used for
704shrinking @var{window}. 585shrinking @var{window}.
705 586
706Optional argument @var{ignore} non-@code{nil} means ignore any 587Normally, the customizable variables @code{window-min-height} and
707restrictions imposed by the variables @code{window-min-height} or 588@code{window-min-width} specify the smallest allowable size of a
708@code{window-min-width} and @code{window-size-fixed}. In this case the 589window. @xref{Change Window,,Deleting and Rearranging Windows,
709minimum height of a window is specified as the minimum number of lines 590emacs, The GNU Emacs Manual}. If resizing would result in making any
710that allow viewing any header or mode line and at least one line of the 591window smaller than this, this function usually signals an error.
711text area of window. The minimum width of a window includes any 592However, if the optional argument @var{ignore} is non-@code{nil}, this
712fringes, margins and the scroll bar as well as two text columns. 593function ignores @code{window-min-height} and @code{window-min-width},
594as well as @code{window-size-fixed}. In that case, the minimum-height
595window consists of a header (if any), a mode line, plus a text area
596one line tall; the minimum-width window consists of any fringes,
597margins and scroll bar, plus a text area two columns wide.
713 598
714If @var{ignore} denotes a window, this means to ignore restrictions for 599If @var{ignore} denotes a window, this means to ignore restrictions for
715that window only. If @var{ignore} equals the constant @code{safe}, this 600that window only. If @var{ignore} equals the constant @code{safe}, this
@@ -801,7 +686,7 @@ If @var{delta} is greater zero, this moves the edge downwards or to the
801right. If @var{delta} is less than zero, this moves the edge upwards or 686right. If @var{delta} is less than zero, this moves the edge upwards or
802to the left. If the edge can't be moved by @var{delta} lines or columns, 687to the left. If the edge can't be moved by @var{delta} lines or columns,
803it is moved as far as possible in the desired direction but no error is 688it is moved as far as possible in the desired direction but no error is
804signalled. 689signaled.
805 690
806This function tries to resize windows adjacent to the edge that is 691This function tries to resize windows adjacent to the edge that is
807moved. Only if this is insufficient, it will also resize windows not 692moved. Only if this is insufficient, it will also resize windows not
@@ -820,7 +705,7 @@ contents exactly. The default for @var{window} is the selected window.
820The optional argument @var{max-height} specifies the maximum total 705The optional argument @var{max-height} specifies the maximum total
821height the window is allowed to be; @code{nil} means use the maximum 706height the window is allowed to be; @code{nil} means use the maximum
822permissible height of a window on @var{window}'s frame. The optional 707permissible height of a window on @var{window}'s frame. The optional
823argument @var{min-height} specifies the minimum toatl height for the 708argument @var{min-height} specifies the minimum total height for the
824window; @code{nil} means use @code{window-min-height}. All these height 709window; @code{nil} means use @code{window-min-height}. All these height
825values include the mode line and/or header line. 710values include the mode line and/or header line.
826 711
@@ -912,12 +797,14 @@ tall. If @var{size} is omitted or @code{nil}, then @var{window} is
912divided evenly into two parts. (If there is an odd line, it is 797divided evenly into two parts. (If there is an odd line, it is
913allocated to the new window.) 798allocated to the new window.)
914 799
915If splitting would result in making a window smaller than 800Normally, the customizable variables @code{window-min-height} and
916@code{window-min-height} or @code{window-min-width} (@pxref{Window 801@code{window-min-width} specify the smallest allowable size of a
917Sizes}), this function usually signals an error. However, if @var{size} 802window. @xref{Change Window,,Deleting and Rearranging Windows, emacs,
918is non-@code{nil} and valid, a new window of the requested size is 803The GNU Emacs Manual}. If splitting would result in making a window
919created. (A size value would be invalid if it assigned less than one 804smaller than this, this function usually signals an error. However,
920line or less than two columns to the new window.) 805if @var{size} is non-@code{nil} and valid, a new window of the
806requested size is created, provided it has enough space for a text
807area one line tall and/or two columns wide.
921 808
922Optional third argument @var{side} @code{nil} (or @code{below}) 809Optional third argument @var{side} @code{nil} (or @code{below})
923specifies that the new window shall be located below @var{window}. The 810specifies that the new window shall be located below @var{window}. The
@@ -1105,7 +992,7 @@ desired configuration as depicted below.
1105 992
1106The scenario sketched above is the standard way to obtain the desired 993The scenario sketched above is the standard way to obtain the desired
1107configuration. In Emacs 23 it was also the only way to do that since 994configuration. In Emacs 23 it was also the only way to do that since
1108Emacs 23 did't allow splitting internal windows. 995Emacs 23 didn't allow splitting internal windows.
1109 996
1110With Emacs 24 you can also proceed as follows: Split an initial window 997With Emacs 24 you can also proceed as follows: Split an initial window
1111@code{W6} by evaluating @code{(split-window W6 -3)} to produce the 998@code{W6} by evaluating @code{(split-window W6 -3)} to produce the
@@ -1833,7 +1720,7 @@ This function does not select a window that has a non-@code{nil}
1833@end deffn 1720@end deffn
1834 1721
1835The following function returns a copy of the list of windows in the 1722The following function returns a copy of the list of windows in the
1836cyclic odering. 1723cyclic ordering.
1837 1724
1838@defun window-list-1 &optional window &optional minibuf &optional all_frames 1725@defun window-list-1 &optional window &optional minibuf &optional all_frames
1839This function returns a list of live windows. The optional arguments 1726This function returns a list of live windows. The optional arguments
@@ -1843,7 +1730,7 @@ in the list. See the description of @code{next-window} for details.
1843The optional argument @var{window} specifies the first window to list 1730The optional argument @var{window} specifies the first window to list
1844and defaults to the selected window. If @var{window} is not on the list 1731and defaults to the selected window. If @var{window} is not on the list
1845of windows returned, some other window will be listed first but no error 1732of windows returned, some other window will be listed first but no error
1846is signalled. 1733is signaled.
1847@end defun 1734@end defun
1848 1735
1849The functions described below use @code{window-list-1} for generating a 1736The functions described below use @code{window-list-1} for generating a
@@ -1956,7 +1843,7 @@ This function makes @var{window} display @var{buffer-or-name} and
1956returns @code{nil}. The argument @var{window} has to denote a live 1843returns @code{nil}. The argument @var{window} has to denote a live
1957window and defaults to the selected one. The argument 1844window and defaults to the selected one. The argument
1958@var{buffer-or-name} must specify a buffer or the name of an existing 1845@var{buffer-or-name} must specify a buffer or the name of an existing
1959buffer. An error is signalled when @var{window} is @dfn{strongly} 1846buffer. An error is signaled when @var{window} is @dfn{strongly}
1960dedicated to its buffer (@pxref{Dedicated Windows}) and does not already 1847dedicated to its buffer (@pxref{Dedicated Windows}) and does not already
1961display @var{buffer-or-name}. 1848display @var{buffer-or-name}.
1962 1849
@@ -2043,7 +1930,7 @@ If a window displaying @var{buffer-or-name} is dedicated
2043(@pxref{Dedicated Windows}) and is not the only window on its frame, 1930(@pxref{Dedicated Windows}) and is not the only window on its frame,
2044that window is deleted. If that window is the only window on its frame 1931that window is deleted. If that window is the only window on its frame
2045and there are other frames on the frame's terminal, that frame is dealt 1932and there are other frames on the frame's terminal, that frame is dealt
2046with by the function spcecified by @code{frame-auto-hide-function} 1933with by the function specified by @code{frame-auto-hide-function}
2047(@pxref{Quitting Windows}). Otherwise, the buffer provided by the 1934(@pxref{Quitting Windows}). Otherwise, the buffer provided by the
2048function @code{switch-to-prev-buffer} (@pxref{Window History}) is 1935function @code{switch-to-prev-buffer} (@pxref{Window History}) is
2049displayed in the window instead. 1936displayed in the window instead.
@@ -3281,7 +3168,7 @@ This function scrolls the text in the selected window so that point is
3281displayed at a specified vertical position within the window. It does 3168displayed at a specified vertical position within the window. It does
3282not ``move point'' with respect to the text. 3169not ``move point'' with respect to the text.
3283 3170
3284If @var{count} is a nonnegative number, that puts the line containing 3171If @var{count} is a non-negative number, that puts the line containing
3285point @var{count} lines down from the top of the window. If 3172point @var{count} lines down from the top of the window. If
3286@var{count} is a negative number, then it counts upward from the 3173@var{count} is a negative number, then it counts upward from the
3287bottom of the window, so that @minus{}1 stands for the last usable 3174bottom of the window, so that @minus{}1 stands for the last usable