aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJoakim Verona2011-11-09 14:05:54 +0100
committerJoakim Verona2011-11-09 14:05:54 +0100
commitc8d4b74cfa26762d34fd1703a07463008b32be16 (patch)
tree6610ac356d47e328bb1094d9f5a0dcc15ed5fb6a /doc
parent32db4845d5c433fd15c6665cbed169e5d8b94f05 (diff)
parent2cffd68198c4d574f073ab238dc12b1221005eab (diff)
downloademacs-c8d4b74cfa26762d34fd1703a07463008b32be16.tar.gz
emacs-c8d4b74cfa26762d34fd1703a07463008b32be16.zip
upstream
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/ChangeLog24
-rw-r--r--doc/lispref/windows.texi944
-rw-r--r--doc/misc/auth.texi18
-rw-r--r--doc/misc/gnus.texi30
4 files changed, 326 insertions, 690 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index d714d1b26e5..cbe016ac96d 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,27 @@
12011-11-09 Martin Rudalics <rudalics@gmx.at>
2
3 * windows.texi (Resizing Windows): Rewrite documentation of
4 window-resizable.
5
62011-11-09 Chong Yidong <cyd@gnu.org>
7
8 * windows.texi (Splitting Windows): Simplify example.
9
102011-11-08 Chong Yidong <cyd@gnu.org>
11
12 * windows.texi (Window Sizes): Copyedits. Document
13 window-text-height. Remove window-min-height and window-min-width
14 discussion, referring instead to Emacs manual.
15 (Splitting Windows, Resizing Windows): Add xref to Emacs manual.
16 (Resizing Windows): Simplify introduction. Don't document
17 enlarge-window, shrink-window, enlarge-window-horizontally, and
18 shrink-window-horizontally; they are no longer preferred for
19 calling from Lisp, and are already documented in the Emacs manual.
20
212011-11-07 Glenn Morris <rgm@gnu.org>
22
23 * windows.texi (Choosing Window): Fix keybinding typo.
24
12011-11-07 Martin Rudalics <rudalics@gmx.at> 252011-11-07 Martin Rudalics <rudalics@gmx.at>
2 26
3 * windows.texi (Resizing Windows, Splitting Windows) 27 * windows.texi (Resizing Windows, Splitting Windows)
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index eb3c1849523..52ac5a53900 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -274,7 +274,7 @@ the leftmost child window for a horizontal combination. If
274@defun window-combined-p &optional window horizontal 274@defun window-combined-p &optional window horizontal
275This function returns a non-@code{nil} value if and only if 275This function returns a non-@code{nil} value if and only if
276@var{window} is part of a vertical combination. If @var{window} is 276@var{window} is part of a vertical combination. If @var{window} is
277omitted or nil, it defaults to the selected one. 277omitted or @code{nil}, it defaults to the selected one.
278 278
279If the optional argument @var{horizontal} is non-@code{nil}, this 279If the optional argument @var{horizontal} is non-@code{nil}, this
280means to return non-@code{nil} if and only if @var{window} is part of 280means to return non-@code{nil} if and only if @var{window} is part of
@@ -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
@@ -661,134 +542,69 @@ If this function returns @code{nil}, this does not necessarily mean that
661@cindex changing window size 542@cindex changing window size
662@cindex window size, changing 543@cindex window size, changing
663 544
664Emacs does not permit overlapping windows or gaps between windows, so 545 This section describes functions for resizing a window without
665changing the size of a window always affects at least one other window. 546changing the size of its frame. Because live windows do not overlap,
666When a frame contains just one window, that window can be resized only 547these functions are meaningful only on frames that contain two or more
667by resizing the window's frame. The functions described below are 548windows: resizing a window also changes the size of a neighboring
668therefore meaningful only in the context of a frame containing at least 549window. If there is just one window on a frame, its size cannot be
669two windows. The size of the corresponding frame never changes when 550changed except by resizing the frame (@pxref{Size and Position}).
670invoking a function described in this section. 551
671 552 Except where noted, these functions also accept internal windows as
672 The routines changing window sizes always operate in one dimension at 553arguments. Resizing an internal window causes its child windows to be
673a time. This means that windows can be resized only either vertically 554resized to fit the same space.
674or horizontally. If a window shall be resized in both dimensions, it 555
675must be resized in one dimension first and in the other dimension 556@defun window-resizable window delta &optional horizontal ignore
676afterwards. If the second resize operation fails, the frame might end
677up in an unsatisfactory state. To avoid such states, it might be useful
678to save the current window configuration (@pxref{Window Configurations})
679before attempting the first resize operation and restore the saved
680configuration in case the second resize operation fails.
681
682 Functions that resize windows are supposed to obey restrictions
683imposed by window minimum sizes and fixed-size windows, see @ref{Window
684Sizes}. In order to determine whether resizing a specific window is
685possible in the first place, the following function can be used:
686
687@defun window-resizable window delta &optional horizontal ignore side noup nodown
688This function returns @var{delta} if the size of @var{window} can be 557This function returns @var{delta} if the size of @var{window} can be
689changed vertically by @var{delta} lines. Optional argument 558changed vertically by @var{delta} lines. If the optional argument
690@var{horizontal} non-@code{nil} means to return @var{delta} if 559@var{horizontal} is non-@code{nil}, it instead returns @var{delta} if
691@var{window} can be resized horizontally by @var{delta} columns. A 560@var{window} can be resized horizontally by @var{delta} columns. It
692return value of zero means that @var{window} is not resizable. 561does not actually change the window size.
693 562
694If @var{delta} is a positive number, this means that @var{window} shall 563If @var{window} is @code{nil}, it defaults to the selected window.
695be enlarged by @var{delta} lines or columns. If @var{window} cannot be 564
696enlarged by @var{delta} lines or columns, this function returns the 565A positive value of @var{delta} means to check whether the window can be
697maximum value in the range from 0 to @var{delta} by which @var{window} 566enlarged by that number of lines or columns; a negative value of
698can be enlarged. 567@var{delta} means to check whether the window can be shrunk by that many
699 568lines or columns. If @var{delta} is non-zero, a return value of 0 means
700If @var{delta} is a negative number, this means that @var{window} shall 569that the window cannot be resized.
701be shrunk by -@var{delta} lines or columns. If @var{window} cannot be 570
702shrunk by -@var{delta} lines or columns, this function returns the 571Normally, the variables @code{window-min-height} and
703minimum value in the range from @var{delta} to 0 that can be used for 572@code{window-min-width} specify the smallest allowable window size.
704shrinking @var{window}. 573@xref{Change Window,, Deleting and Rearranging Windows, emacs, The GNU
705 574Emacs Manual}. However, if the optional argument @var{ignore} is
706Optional argument @var{ignore} non-@code{nil} means ignore any 575non-@code{nil}, this function ignores @code{window-min-height} and
707restrictions imposed by the variables @code{window-min-height} or 576@code{window-min-width}, as well as @code{window-size-fixed}.
708@code{window-min-width} and @code{window-size-fixed}. In this case the 577Instead, it considers the minimum-height window to be one consisting
709minimum height of a window is specified as the minimum number of lines 578of a header (if any), a mode line, plus a text area one line tall; and
710that allow viewing any header or mode line and at least one line of the 579a minimum-width window as one consisting of fringes, margins, and
711text area of window. The minimum width of a window includes any 580scroll bar (if any), plus a text area two columns wide.
712fringes, margins and the scroll bar as well as two text columns. 581@end defun
713
714If @var{ignore} denotes a window, this means to ignore restrictions for
715that window only. If @var{ignore} equals the constant @code{safe}, this
716means a live window may get as small as one line or two columns.
717
718Optional argument @var{noup} non-@code{nil} means don't go up in the
719window tree but try to steal or distribute the space needed for the
720resize operation among the other windows within @var{window}'s
721combination. Optional argument @var{nodown} non-@code{nil} means don't
722check whether @var{window} itself and its child windows can be resized.
723@end defun
724
725The function @code{window-resizable} does not change any window sizes.
726The following function does:
727 582
728@defun window-resize window delta &optional horizontal ignore 583@defun window-resize window delta &optional horizontal ignore
729This function resizes @var{window} vertically by @var{delta} lines. The 584This function resizes @var{window} by @var{delta} increments. If
730argument @var{window} can denote an arbitrary window and defaults to the 585@var{horizontal} is @code{nil}, it changes the height by @var{delta}
731selected one. An attempt to resize the root window of a frame will 586lines; otherwise, it changes the width by @var{delta} columns. A
732raise an error. 587positive @var{delta} means to enlarge the window, and a negative
733 588@var{delta} means to shrink it.
734Second argument @var{delta} a positive number means @var{window} shall
735be enlarged by @var{delta} lines. If @var{delta} is negative, that
736means @var{window} shall be shrunk by -@var{delta} lines.
737
738Optional argument @var{horizontal} non-@code{nil} means to resize
739@var{window} horizontally by @var{delta} columns. In this case a
740positive @var{delta} means enlarge @var{window} by @var{delta} columns.
741A negative @var{delta} means @var{window} shall be shrunk by
742-@var{delta} columns.
743
744Optional argument @var{ignore} has the same meaning as for the function
745@code{window-resizable} above.
746
747This function can simultaneously move two edges of WINDOW. Exactly
748which edges of @var{window} are moved and which other windows are
749resized along with @var{window} is determined by the splits and nest
750status of the involved windows (@pxref{Splitting Windows}). If only the
751low (right) edge of @var{window} shall be moved, the function
752@code{adjust-window-trailing-edge} described below should be used.
753@end defun
754
755The next four commands are simple interfaces to @code{window-resize}.
756They always operate on the selected window, never delete any window, and
757always raise an error when resizing would violate a restriction imposed
758by @code{window-min-height}, @code{window-min-width}, or
759@code{window-size-fixed}.
760
761@deffn Command enlarge-window delta &optional horizontal
762This function makes the selected window @var{delta} lines taller.
763Interactively, if no argument is given, it makes the selected window one
764line taller. If optional argument @var{horizontal} is non-@code{nil},
765it makes the selected window wider by @var{delta} columns. If
766@var{delta} is negative, it shrinks the selected window by -@var{delta}
767lines or columns. The return value is @code{nil}.
768@end deffn
769 589
770@deffn Command enlarge-window-horizontally delta 590If @var{window} is @code{nil}, it defaults to the selected window. If
771This function makes the selected window @var{delta} columns wider. 591the window cannot be resized as demanded, an error is signaled.
772Interactively, if no argument is given, it makes the selected window one
773column wider.
774@end deffn
775 592
776@deffn Command shrink-window delta &optional horizontal 593The optional argument @var{ignore} has the same meaning as for the
777This function makes the selected window @var{delta} lines smaller. 594function @code{window-resizable} above.
778Interactively, if no argument is given, it makes the selected window one
779line smaller. If optional argument @var{horizontal} is non-@code{nil},
780it makes the selected window narrower by @var{delta} columns. If
781@var{delta} is negative, it enlarges the selected window by -@var{delta}
782lines or columns. The return value is @code{nil}.
783@end deffn
784 595
785@deffn Command shrink-window-horizontally delta 596The choice of which window edge this function alters depends on the
786This function makes the selected window @var{delta} columns narrower. 597splitting and nesting status of the involved windows; in some cases,
787Interactively, if no argument is given, it makes the selected window one 598it may alter both edges. @xref{Splitting Windows}. To resize by
788column narrower. 599moving only the bottom or right edge of a window, use the function
789@end deffn 600@code{adjust-window-trailing-edge}, below.
601@end defun
602
603@c The commands enlarge-window, enlarge-window-horizontally,
604@c shrink-window, and shrink-window-horizontally are documented in the
605@c Emacs manual. They are not preferred for calling from Lisp.
790 606
791The following function is useful for moving the line dividing two 607 The following function is useful for moving the line dividing two
792windows. 608windows.
793 609
794@defun adjust-window-trailing-edge window delta &optional horizontal 610@defun adjust-window-trailing-edge window delta &optional horizontal
@@ -801,7 +617,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 617right. 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, 618to 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 619it is moved as far as possible in the desired direction but no error is
804signalled. 620signaled.
805 621
806This function tries to resize windows adjacent to the edge that is 622This function tries to resize windows adjacent to the edge that is
807moved. Only if this is insufficient, it will also resize windows not 623moved. Only if this is insufficient, it will also resize windows not
@@ -820,7 +636,7 @@ contents exactly. The default for @var{window} is the selected window.
820The optional argument @var{max-height} specifies the maximum total 636The optional argument @var{max-height} specifies the maximum total
821height the window is allowed to be; @code{nil} means use the maximum 637height the window is allowed to be; @code{nil} means use the maximum
822permissible height of a window on @var{window}'s frame. The optional 638permissible height of a window on @var{window}'s frame. The optional
823argument @var{min-height} specifies the minimum toatl height for the 639argument @var{min-height} specifies the minimum total height for the
824window; @code{nil} means use @code{window-min-height}. All these height 640window; @code{nil} means use @code{window-min-height}. All these height
825values include the mode line and/or header line. 641values include the mode line and/or header line.
826 642
@@ -894,222 +710,66 @@ frame. @var{window} can be any window and defaults to the selected one.
894@cindex splitting windows 710@cindex splitting windows
895@cindex window splitting 711@cindex window splitting
896 712
897The functions described below are the primitives needed for creating a 713This section describes functions for creating a new window by
898new window. They do not accept a buffer as an argument. Rather, they 714@dfn{splitting} an existing one.
899``split'' an existing window into two halves, both displaying the buffer
900previously visible in the window that was split.
901 715
902@deffn Command split-window &optional window size side 716@deffn Command split-window &optional window size side
903This function creates a new window adjacent to @var{window}. It returns 717This function creates a new live window next to the window
904the new window which is always a live window. The argument @var{window} 718@var{window}. If @var{window} is omitted or @code{nil}, it defaults
905can denote any window and defaults to the selected one. This function 719to the selected window. That window is ``split'', and reduced in
906does not change the selected window. 720size. The space is taken up by the new window, which is returned.
907 721
908Optional second argument @var{size} a positive number means make 722The optional second argument @var{size} determines the sizes of the
909@var{window} @var{size} lines (or columns) tall. If @var{size} is 723@var{window} and/or the new window. If it is omitted or @code{nil},
910negative, make the new window @minus{}@var{size} lines (or columns) 724both windows are given equal sizes; if there is an odd line, it is
911tall. If @var{size} is omitted or @code{nil}, then @var{window} is 725allocated to the new window. If @var{size} is a positive number,
912divided evenly into two parts. (If there is an odd line, it is 726@var{window} is given @var{size} lines (or columns, depending on the
913allocated to the new window.) 727value of @var{side}). If @var{size} is a negative number, the new
914 728window is given @minus{}@var{size} lines (or columns).
915If splitting would result in making a window smaller than 729
916@code{window-min-height} or @code{window-min-width} (@pxref{Window 730If @var{size} is @code{nil}, this function obeys the variables
917Sizes}), this function usually signals an error. However, if @var{size} 731@code{window-min-height} and @code{window-min-width}. @xref{Change
918is non-@code{nil} and valid, a new window of the requested size is 732Window,,Deleting and Rearranging Windows, emacs, The GNU Emacs
919created. (A size value would be invalid if it assigned less than one 733Manual}. Thus, it signals an error if splitting would result in
920line or less than two columns to the new window.) 734making a window smaller than those variables specify. However, a
921 735non-@code{nil} value for @var{size} causes those variables to be
922Optional third argument @var{side} @code{nil} (or @code{below}) 736ignored; in that case, the smallest allowable window is considered to
923specifies that the new window shall be located below @var{window}. The 737be one that has space for a text area one line tall and/or two columns
924value @code{above} means the new window will be located above 738wide.
925@var{window}. In both cases @var{size} specifies the new number of 739
926lines for @var{window} (or the new window if @var{size} is negative) 740The optional third argument @var{side} determines the position of the
927including space reserved for the mode and/or header line. 741new window relative to @var{window}. If it is @code{nil} or
928 742@code{below}, the new window is placed below @var{window}. If it is
929If @var{side} is @code{t} or @code{right} the new window will be 743@code{above}, the new window is placed above @var{window}. In both
930positioned on the right side of @var{window}. The value @code{left} 744these cases, @var{size} specifies a total window height, in lines.
931means the new window will be located on the left side of @var{window}. 745
932In both cases @var{size} specifies the new number of columns for 746If @var{side} is @code{t} or @code{right}, the new window is placed on
933@var{window} (or the new window provided @var{size} is negative) 747the right of @var{window}. If @var{side} is @code{left}, the new
934including space reserved for margins, fringes and the scroll bar or a 748window is placed on the left of @var{window}. In both these cases,
935divider column. 749@var{size} specifies a total window width, in columns.
936 750
937Any other non-@code{nil} value for @var{side} is currently handled like 751If @var{window} is a live window, the new window inherits various
938@code{t} (or @code{right}). Since this might change in the future, 752properties from it, including margins and scroll bars. If
939application programs should refrain from using other values. 753@var{window} is an internal window, the new window inherits the
940 754properties of the window selected within @var{window}'s frame.
941If @var{window} is live, properties of the new window like margins and 755
942scroll bars are inherited from @var{window}. If @var{window} is an 756If the variable @code{ignore-window-parameters} is non-@code{nil}
943internal window, these properties, as well as the buffer shown in the 757(@pxref{Window Parameters}), this function ignores window parameters.
944new window, are inherited from the window selected on @var{window}'s 758Otherwise, it consults the @code{split-window} parameter of
945frame. 759@var{window}; if this is @code{t}, it splits the window disregarding
946 760any other window parameters. If the @code{split-window} parameter
947If @code{ignore-window-parameters} is non-@code{nil}, this function 761specifies a function, that function is called with the arguments
948ignores window parameters (@pxref{Window Parameters}). Otherwise, if 762@var{window}, @var{size}, and @var{side} to split @var{window}, in
949the @code{split-window} parameter of @var{window} is @code{t}, it splits 763lieu of the usual action of @code{split-window}.
950the window disregarding any other window parameters. If the
951@code{split-window} parameter specifies a function, that function is
952called with the arguments @var{window}, @var{size}, and @var{side} to
953split @var{window}. If that function is @code{ignore}, nothing is done.
954@end deffn 764@end deffn
955 765
956The following example starts with one window on a screen that is 50 766 As an example, we show a combination of @code{split-window} calls
957lines high by 80 columns wide; then it splits the window. 767that yields the window configuration discussed in @ref{Windows and
958 768Frames}. This example demonstrates splitting live windows as well as
959@smallexample 769splitting internal windows. We begin with a frame containing a single
960@group 770window (a live root window), which we denote by @var{W4}. Calling
961(setq W1 (selected-window)) 771@code{(split-window W3)} yields this window configuration:
962 @result{} #<window 8 on windows.texi>
963(setq W2 (split-window W1 15))
964 @result{} #<window 28 on windows.texi>
965@end group
966@group
967(window-top-line W1)
968 @result{} 0
969(window-total-size W1)
970 @result{} 15
971(window-top-line W2)
972 @result{} 15
973@end group
974@end smallexample
975
976The screen looks like this:
977
978@smallexample
979@group
980 __________
981 | | line 0
982 | W1 |
983 |__________|
984 | | line 15
985 | W2 |
986 |__________|
987 line 50
988 column 0 column 80
989@end group
990@end smallexample
991
992Next, split the top window into two side-by-side windows:
993
994@smallexample
995@group
996(setq W3 (split-window W1 35 t))
997 @result{} #<window 32 on windows.texi>
998@end group
999@group
1000(window-left-column W1)
1001 @result{} 0
1002(window-total-size W1 t)
1003 @result{} 35
1004(window-left-column W3)
1005 @result{} 35
1006@end group
1007@end smallexample
1008
1009@need 3000
1010Now the screen looks like this:
1011
1012@smallexample
1013@group
1014 column 35
1015 __________
1016 | | | line 0
1017 | W1 | W3 |
1018 |____|_____|
1019 | | line 15
1020 | W2 |
1021 |__________|
1022 line 50
1023 column 0 column 80
1024@end group
1025@end smallexample
1026
1027Normally, Emacs indicates the border between two side-by-side windows
1028with a scroll bar (@pxref{Scroll Bars}), or with @samp{|} characters. The
1029display table can specify alternative border characters; see @ref{Display
1030Tables}.
1031
1032Below we describe how @code{split-window} can be used to create the
1033window configuration from our earlier example (@pxref{Windows and
1034Frames}) and how internal windows are created for this purpose. We
1035start with a frame containing one live window @code{W2} (in the
1036following scenarios window names are assigned in an arbitrary manner in
1037order to match the names of the example). Evaluating the form
1038@code{(split-window W2 8 t)} creates a new internal window @code{W1}
1039with two children---@code{W2} (the window we've split) and a new leaf
1040window @code{W6}:
1041@smallexample
1042@group
1043 ______________________________________
1044 | ______ ____________________________ |
1045 || || ||
1046 || || ||
1047 || || ||
1048 || || ||
1049 || || ||
1050 || || ||
1051 || || ||
1052 || || ||
1053 || || ||
1054 || || ||
1055 ||__W2__||_____________W6_____________ |
1056 |__________________W1__________________|
1057
1058@end group
1059@end smallexample
1060 772
1061Evaluating now @code{(split-window W6 -3)} creates another internal
1062window @code{W3} with two children---@code{W6} and a new live window
1063@code{W5}. This leaves us with a vertically combined window @code{W3}
1064embedded in the horizontally combined window @code{W1}:
1065@smallexample
1066@group
1067 ______________________________________
1068 | ______ ____________________________ |
1069 || || __________________________ ||
1070 || ||| |||
1071 || ||| |||
1072 || ||| |||
1073 || ||| |||
1074 || ||| |||
1075 || |||____________W6____________|||
1076 || || __________________________ ||
1077 || ||| |||
1078 || |||____________W5____________|||
1079 ||__W2__||_____________W3_____________ |
1080 |__________________W1__________________|
1081
1082@end group
1083@end smallexample
1084
1085Finally, evaluating @code{(split-window W6 nil t)} should get us the
1086desired configuration as depicted below.
1087@smallexample
1088@group
1089 ______________________________________
1090 | ______ ____________________________ |
1091 || || __________________________ ||
1092 || ||| ___________ ___________ |||
1093 || |||| || ||||
1094 || |||| || ||||
1095 || ||||_____W6____||_____W7____||||
1096 || |||____________W4____________|||
1097 || || __________________________ ||
1098 || ||| |||
1099 || |||____________W5____________|||
1100 ||__W2__||_____________W3_____________ |
1101 |__________________W1__________________|
1102
1103@end group
1104@end smallexample
1105
1106The 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
1108Emacs 23 did't allow splitting internal windows.
1109
1110With 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
1112following vertical combination:
1113@smallexample 773@smallexample
1114@group 774@group
1115 ______________________________________ 775 ______________________________________
@@ -1117,112 +777,64 @@ following vertical combination:
1117 || || 777 || ||
1118 || || 778 || ||
1119 || || 779 || ||
780 ||_________________W4_________________||
781 | ____________________________________ |
1120 || || 782 || ||
1121 || || 783 || ||
1122 || || 784 || ||
1123 || ||
1124 ||_________________W6_________________||
1125 | ____________________________________ |
1126 || ||
1127 ||_________________W5_________________|| 785 ||_________________W5_________________||
1128 |__________________W3__________________| 786 |__________________W3__________________|
1129 787
1130@end group 788@end group
1131@end smallexample 789@end smallexample
1132 790
1133Evaluating now @code{(split-window (window-parent W6) -8 'left)} or, 791@noindent
1134equivalently, @code{(split-window W3 -8 'left)} should now produce the 792The @code{split-window} call has created a new live window, denoted by
1135penultimate configuration from the previous scenario from where we can 793@var{W5}. It has also created a new internal window, denoted by
1136continue as described before. 794@var{W3}, which becomes the root window and the parent of both
1137 795@var{W4} and @var{W5}.
1138 Another strategy starts with splitting an initial window @code{W6} by
1139evaluating @code{(split-window W6 nil nil t)} with the following result:
1140@smallexample
1141@group
1142 ______________________________________
1143 | _________________ _________________ |
1144 || || ||
1145 || || ||
1146 || || ||
1147 || || ||
1148 || || ||
1149 || || ||
1150 || || ||
1151 || || ||
1152 || || ||
1153 || || ||
1154 ||________W6_______||________W7_______||
1155 |__________________W4__________________|
1156
1157@end group
1158@end smallexample
1159
1160Evaluating now @code{(split-window W4 -3)} or @code{(split-window
1161(window-parent W6) -3)} should get us a configuration as shown next.
1162@smallexample
1163@group
1164 ______________________________________
1165 | ____________________________________ |
1166 || ________________ ________________ ||
1167 ||| || |||
1168 ||| || |||
1169 ||| || |||
1170 ||| || |||
1171 ||| || |||
1172 |||_______W6_______||________W7______|||
1173 ||_________________W4_________________||
1174 | ____________________________________ |
1175 || ||
1176 ||_________________W5_________________||
1177 |__________________W3__________________|
1178
1179@end group
1180@end smallexample
1181 796
1182The desired configuration can be now obtained by evaluating 797 Next, we call @code{(split-window W3 nil 'left)}, passing the
1183@code{(split-window W3 -8 'left)} or, equivalently, @code{(split-window 798internal window @var{W3} as the argument. The result:
1184(window-parent W5) -8 'left)}.
1185 799
1186 For a final approach let's start with the configuration of two live
1187windows @code{W6} and @code{W7} shown above. If we now evaluate
1188@code{(split-window W4 -8 'left)} or @code{(split-window (window-parent
1189W6) -8 'left)} we get the following configuration.
1190@smallexample 800@smallexample
1191@group 801@group
1192 ______________________________________ 802 ______________________________________
1193 | ______ ____________________________ | 803 | ______ ____________________________ |
1194 || || ____________ ____________ || 804 || || __________________________ ||
1195 || ||| || ||| 805 || ||| |||
1196 || ||| || ||| 806 || ||| |||
1197 || ||| || ||| 807 || ||| |||
1198 || ||| || ||| 808 || |||____________W4____________|||
1199 || ||| || ||| 809 || || __________________________ ||
1200 || ||| || ||| 810 || ||| |||
1201 || ||| || ||| 811 || ||| |||
1202 || |||______W6____||______W7____||| 812 || |||____________W5____________|||
1203 ||__W2__||_____________W4_____________|| 813 ||__W2__||_____________W3_____________ |
1204 |__________________W1__________________| 814 |__________________W1__________________|
1205
1206@end group 815@end group
1207@end smallexample 816@end smallexample
1208 817
1209Evaluating now @code{(split-window W4 -3)} or, for example, 818@noindent
1210@code{(split-window (window-parent W6) -3)} should produce the desired 819A new live window, @var{W2}, is created to the left of @var{W3} (which
1211configuration. 820encompasses the vertical window combination of @var{W4} and @var{W5}).
821A new internal window @var{W1} is also created, and becomes the new
822root window.
1212 823
1213 The two options described next can be used to tune the operation of 824 The following two options can be used to modify the operation of
1214@code{split-window}. 825@code{split-window}.
1215 826
1216@defopt window-splits 827@defopt window-splits
1217If this variable is nil, the function @code{split-window} can split a 828If this variable is @code{nil}, @code{split-window} can only split a
1218window if and only if that window's screen estate is sufficiently large 829window (denoted by @var{window}) if @var{window}'s screen area is
1219to accommodate both--itself and the new window. 830large enough to accommodate both itself and the new window. This is
831the default.
1220 832
1221If this variable is non-@code{nil}, @code{split-window} tries to resize 833If this variable is non-@code{nil}, @code{split-window} tries to
1222all windows that are part of the same combination as the old window to 834resize all windows that are part of the same combination as
1223accommodate the new window. Hence, the new window can be also created if 835@var{window}, in order to accommodate the new window. In particular,
1224the old window is of fixed size or too small to split (@pxref{Window 836this may allow @code{split-window} to succeed even if @var{window} is
1225Sizes}). 837a fixed-size window or too small to ordinarily split.
1226 838
1227In any case, the value of this variable is assigned to the splits status 839In any case, the value of this variable is assigned to the splits status
1228of the new window and, provided old and new window form a new 840of the new window and, provided old and new window form a new
@@ -1601,11 +1213,11 @@ function, it calls that function with @var{window} as its sole argument.
1601@end deffn 1213@end deffn
1602 1214
1603@deffn Command delete-windows-on &optional buffer-or-name frame 1215@deffn Command delete-windows-on &optional buffer-or-name frame
1604This function deletes all windows showing @var{buffer-or-name} and 1216This function deletes all windows showing @var{buffer-or-name}. If
1605returns nil. If there are no windows showing @var{buffer-or-name}, it 1217there are no windows showing @var{buffer-or-name}, it does nothing.
1606does nothing. The optional argument @var{buffer-or-name} may be a 1218The optional argument @var{buffer-or-name} may be a buffer or the name
1607buffer or the name of an existing buffer and defaults to the current 1219of an existing buffer and defaults to the current buffer. Invoking
1608buffer. Invoking this command on a minibuffer signals an error. 1220this command on a minibuffer signals an error.
1609 1221
1610The function @code{delete-windows-on} operates by calling 1222The function @code{delete-windows-on} operates by calling
1611@code{delete-window} for each window showing @var{buffer-or-name}. If a 1223@code{delete-window} for each window showing @var{buffer-or-name}. If a
@@ -1833,7 +1445,7 @@ This function does not select a window that has a non-@code{nil}
1833@end deffn 1445@end deffn
1834 1446
1835The following function returns a copy of the list of windows in the 1447The following function returns a copy of the list of windows in the
1836cyclic odering. 1448cyclic ordering.
1837 1449
1838@defun window-list-1 &optional window &optional minibuf &optional all_frames 1450@defun window-list-1 &optional window &optional minibuf &optional all_frames
1839This function returns a list of live windows. The optional arguments 1451This function returns a list of live windows. The optional arguments
@@ -1843,7 +1455,7 @@ in the list. See the description of @code{next-window} for details.
1843The optional argument @var{window} specifies the first window to list 1455The optional argument @var{window} specifies the first window to list
1844and defaults to the selected window. If @var{window} is not on the list 1456and 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 1457of windows returned, some other window will be listed first but no error
1846is signalled. 1458is signaled.
1847@end defun 1459@end defun
1848 1460
1849The functions described below use @code{window-list-1} for generating a 1461The functions described below use @code{window-list-1} for generating a
@@ -1956,7 +1568,7 @@ This function makes @var{window} display @var{buffer-or-name} and
1956returns @code{nil}. The argument @var{window} has to denote a live 1568returns @code{nil}. The argument @var{window} has to denote a live
1957window and defaults to the selected one. The argument 1569window and defaults to the selected one. The argument
1958@var{buffer-or-name} must specify a buffer or the name of an existing 1570@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} 1571buffer. An error is signaled when @var{window} is @dfn{strongly}
1960dedicated to its buffer (@pxref{Dedicated Windows}) and does not already 1572dedicated to its buffer (@pxref{Dedicated Windows}) and does not already
1961display @var{buffer-or-name}. 1573display @var{buffer-or-name}.
1962 1574
@@ -2043,7 +1655,7 @@ If a window displaying @var{buffer-or-name} is dedicated
2043(@pxref{Dedicated Windows}) and is not the only window on its frame, 1655(@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 1656that 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 1657and there are other frames on the frame's terminal, that frame is dealt
2046with by the function spcecified by @code{frame-auto-hide-function} 1658with by the function specified by @code{frame-auto-hide-function}
2047(@pxref{Quitting Windows}). Otherwise, the buffer provided by the 1659(@pxref{Quitting Windows}). Otherwise, the buffer provided by the
2048function @code{switch-to-prev-buffer} (@pxref{Window History}) is 1660function @code{switch-to-prev-buffer} (@pxref{Window History}) is
2049displayed in the window instead. 1661displayed in the window instead.
@@ -2163,7 +1775,7 @@ unless @var{norecord} is non-@code{nil}.
2163 1775
2164 The command @code{display-buffer} flexibly chooses a window for 1776 The command @code{display-buffer} flexibly chooses a window for
2165display, and displays a specified buffer in that window. It can be 1777display, and displays a specified buffer in that window. It can be
2166called interactively, via the key binding @kbd{C-x 4 o}. It is also 1778called interactively, via the key binding @kbd{C-x 4 C-o}. It is also
2167used as a subroutine by many functions and commands, including 1779used as a subroutine by many functions and commands, including
2168@code{switch-to-buffer} and @code{pop-to-buffer} (@pxref{Switching 1780@code{switch-to-buffer} and @code{pop-to-buffer} (@pxref{Switching
2169Buffers}). 1781Buffers}).
@@ -2221,7 +1833,7 @@ The constant @code{display-buffer-fallback-action}.
2221@noindent 1833@noindent
2222Each action function is called in turn, passing the buffer as the 1834Each action function is called in turn, passing the buffer as the
2223first argument and the combined action alist as the second argument, 1835first argument and the combined action alist as the second argument,
2224until one of the functions returns non-nil. 1836until one of the functions returns non-@code{nil}.
2225 1837
2226The argument @var{action} can also have a non-@code{nil}, non-list 1838The argument @var{action} can also have a non-@code{nil}, non-list
2227value. This has the special meaning that the buffer should be 1839value. This has the special meaning that the buffer should be
@@ -2272,7 +1884,7 @@ returns the window if it succeeds, and @code{nil} if it fails.
2272This function tries to display @var{buffer} in the selected window. 1884This function tries to display @var{buffer} in the selected window.
2273It fails if the selected window is a minibuffer window or is dedicated 1885It fails if the selected window is a minibuffer window or is dedicated
2274to another buffer (@pxref{Dedicated Windows}). It also fails if 1886to another buffer (@pxref{Dedicated Windows}). It also fails if
2275@var{alist} has a non-nil @code{inhibit-same-window} entry. 1887@var{alist} has a non-@code{nil} @code{inhibit-same-window} entry.
2276@end defun 1888@end defun
2277 1889
2278@defun display-buffer-reuse-window buffer alist 1890@defun display-buffer-reuse-window buffer alist
@@ -3281,7 +2893,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 2893displayed at a specified vertical position within the window. It does
3282not ``move point'' with respect to the text. 2894not ``move point'' with respect to the text.
3283 2895
3284If @var{count} is a nonnegative number, that puts the line containing 2896If @var{count} is a non-negative number, that puts the line containing
3285point @var{count} lines down from the top of the window. If 2897point @var{count} lines down from the top of the window. If
3286@var{count} is a negative number, then it counts upward from the 2898@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 2899bottom of the window, so that @minus{}1 stands for the last usable
diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi
index a16da92343e..b64562f6875 100644
--- a/doc/misc/auth.texi
+++ b/doc/misc/auth.texi
@@ -64,13 +64,13 @@ It is a way for multiple applications to share a single configuration
64 64
65@menu 65@menu
66* Overview:: Overview of the auth-source library. 66* Overview:: Overview of the auth-source library.
67* Help for users:: 67* Help for users::
68* Secret Service API:: 68* Secret Service API::
69* Help for developers:: 69* Help for developers::
70* GnuPG and EasyPG Assistant Configuration:: 70* GnuPG and EasyPG Assistant Configuration::
71* Index:: 71* Index::
72* Function Index:: 72* Function Index::
73* Variable Index:: 73* Variable Index::
74@end menu 74@end menu
75@end ifnottex 75@end ifnottex
76 76
@@ -182,7 +182,7 @@ Here's a mixed example using two sources:
182If you don't customize @code{auth-sources}, you'll have to live with 182If you don't customize @code{auth-sources}, you'll have to live with
183the defaults: any host and any port are looked up in the netrc 183the defaults: any host and any port are looked up in the netrc
184file @code{~/.authinfo.gpg}, which is a GnuPG encrypted file 184file @code{~/.authinfo.gpg}, which is a GnuPG encrypted file
185(@pxref{GnuPG and EasyPG Assistant Configuration}). 185(@pxref{GnuPG and EasyPG Assistant Configuration}).
186 186
187If that fails, the unencrypted netrc files @code{~/.authinfo} and 187If that fails, the unencrypted netrc files @code{~/.authinfo} and
188@code{~/.netrc} will be used. 188@code{~/.netrc} will be used.
@@ -340,7 +340,7 @@ If you are using earlier versions of Emacs, you will need:
340@end lisp 340@end lisp
341 341
342If you want your GnuPG passwords to be cached, set up @code{gpg-agent} 342If you want your GnuPG passwords to be cached, set up @code{gpg-agent}
343or EasyPG Assitant 343or EasyPG Assistant
344(@pxref{Caching Passphrases, , Caching Passphrases, epa}). 344(@pxref{Caching Passphrases, , Caching Passphrases, epa}).
345 345
346To quick start, here are some questions: 346To quick start, here are some questions:
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 70ed62ddfa9..545306e4dc7 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -1001,7 +1001,7 @@ press @kbd{^} from the Group buffer to see it. In the Server buffer,
1001you can press @kbd{RET} on a defined server to see all the groups it 1001you can press @kbd{RET} on a defined server to see all the groups it
1002serves (subscribed or not!). You can also add or delete servers, edit 1002serves (subscribed or not!). You can also add or delete servers, edit
1003a foreign server's definition, agentize or de-agentize a server, and 1003a foreign server's definition, agentize or de-agentize a server, and
1004do many other neat things. @xref{Server Buffer}. 1004do many other neat things. @xref{Server Buffer}.
1005@xref{Foreign Groups}. @xref{Agent Basics}. 1005@xref{Foreign Groups}. @xref{Agent Basics}.
1006 1006
1007@vindex gnus-select-method 1007@vindex gnus-select-method
@@ -11805,7 +11805,7 @@ fit these criteria.
11805 11805
11806To use this, make sure that you have @code{w3m} and @code{curl} 11806To use this, make sure that you have @code{w3m} and @code{curl}
11807installed. If you have, then Gnus should display @acronym{HTML} 11807installed. If you have, then Gnus should display @acronym{HTML}
11808automatically. 11808automatically.
11809 11809
11810 11810
11811 11811
@@ -21078,8 +21078,8 @@ as well.
21078 21078
21079This chapter describes tools for searching groups and servers for 21079This chapter describes tools for searching groups and servers for
21080articles matching a query and then retrieving those articles. Gnus 21080articles matching a query and then retrieving those articles. Gnus
21081provides a simpler mechanism for searching through articles in a summary buffer 21081provides a simpler mechanism for searching through articles in a summary buffer
21082to find those matching a pattern. @xref{Searching for Articles}. 21082to find those matching a pattern. @xref{Searching for Articles}.
21083 21083
21084@menu 21084@menu
21085* nnir:: Searching with various engines. 21085* nnir:: Searching with various engines.
@@ -21110,7 +21110,7 @@ interface.
21110 21110
21111The @code{nnimap} and @code{gmane} search engines should work with no 21111The @code{nnimap} and @code{gmane} search engines should work with no
21112configuration. Other engines require a local index that needs to be 21112configuration. Other engines require a local index that needs to be
21113created and maintained outside of Gnus. 21113created and maintained outside of Gnus.
21114 21114
21115 21115
21116@node Basic Usage 21116@node Basic Usage
@@ -21150,7 +21150,7 @@ One more thing: individual search engines may have special search
21150features. You can access these special features by giving a prefix-arg 21150features. You can access these special features by giving a prefix-arg
21151to @code{gnus-group-make-nnir-group}. If you are searching multiple 21151to @code{gnus-group-make-nnir-group}. If you are searching multiple
21152groups with different search engines you will be prompted for the 21152groups with different search engines you will be prompted for the
21153special search features for each engine separately. 21153special search features for each engine separately.
21154 21154
21155 21155
21156@node Setting up nnir 21156@node Setting up nnir
@@ -21191,7 +21191,7 @@ named @code{home} you can use
21191 21191
21192@lisp 21192@lisp
21193(setq gnus-secondary-select-methods 21193(setq gnus-secondary-select-methods
21194 '((nnml "home" 21194 '((nnml "home"
21195 (nnimap-address "localhost") 21195 (nnimap-address "localhost")
21196 (nnir-search-engine namazu)))) 21196 (nnir-search-engine namazu))))
21197@end lisp 21197@end lisp
@@ -21216,9 +21216,9 @@ could change this to
21216@node The imap Engine 21216@node The imap Engine
21217@subsubsection The imap Engine 21217@subsubsection The imap Engine
21218 21218
21219The @code{imap} engine requires no configuration. 21219The @code{imap} engine requires no configuration.
21220 21220
21221Queries using the @code{imap} engine follow a simple query language. 21221Queries using the @code{imap} engine follow a simple query language.
21222The search is always case-insensitive and supports the following 21222The search is always case-insensitive and supports the following
21223features (inspired by the Google search input language): 21223features (inspired by the Google search input language):
21224 21224
@@ -21231,7 +21231,7 @@ operators must be written with all capital letters to be
21231recognised. Also preceding a term with a - sign is equivalent to NOT 21231recognised. Also preceding a term with a - sign is equivalent to NOT
21232term. 21232term.
21233 21233
21234@item Automatic AND queries 21234@item Automatic AND queries
21235If you specify multiple words then they will be treated as an AND 21235If you specify multiple words then they will be treated as an AND
21236expression intended to match all components. 21236expression intended to match all components.
21237 21237
@@ -21264,7 +21264,7 @@ customize @code{nnir-imap-default-search-key}. For example to use
21264@node The gmane Engine 21264@node The gmane Engine
21265@subsubsection The gmane Engine 21265@subsubsection The gmane Engine
21266 21266
21267The @code{gmane} engine requires no configuration. 21267The @code{gmane} engine requires no configuration.
21268 21268
21269Gmane queries follow a simple query language: 21269Gmane queries follow a simple query language:
21270 21270
@@ -21278,11 +21278,11 @@ recognised.
21278@item Required and excluded terms 21278@item Required and excluded terms
21279+ and - can be used to require or exclude terms, e.g. football -american 21279+ and - can be used to require or exclude terms, e.g. football -american
21280 21280
21281@item Unicode handling 21281@item Unicode handling
21282The search engine converts all text to utf-8, so searching should work 21282The search engine converts all text to utf-8, so searching should work
21283in any language. 21283in any language.
21284 21284
21285@item Stopwords 21285@item Stopwords
21286Common English words (like 'the' and 'a') are ignored by default. You 21286Common English words (like 'the' and 'a') are ignored by default. You
21287can override this by prefixing such words with a + (e.g. +the) or 21287can override this by prefixing such words with a + (e.g. +the) or
21288enclosing the word in quotes (e.g. "the"). 21288enclosing the word in quotes (e.g. "the").
@@ -21345,7 +21345,7 @@ to get a group name. By default this is @code{$HOME/Mail}.
21345Using the namazu engine requires creating and maintaining index files. 21345Using the namazu engine requires creating and maintaining index files.
21346One directory should contain all the index files, and nnir must be told 21346One directory should contain all the index files, and nnir must be told
21347where to find them by setting the @code{nnir-namazu-index-directory} 21347where to find them by setting the @code{nnir-namazu-index-directory}
21348variable. 21348variable.
21349 21349
21350To work correctly the @code{nnir-namazu-remove-prefix} variable must 21350To work correctly the @code{nnir-namazu-remove-prefix} variable must
21351also be correct. This is the prefix to remove from each file name 21351also be correct. This is the prefix to remove from each file name
@@ -21408,7 +21408,7 @@ this command periodically, say every four hours.
21408This engine is obsolete. 21408This engine is obsolete.
21409 21409
21410@node Customizations 21410@node Customizations
21411@subsubsection Custimozations 21411@subsubsection Customizations
21412 21412
21413@table @code 21413@table @code
21414 21414