diff options
Diffstat (limited to 'doc/lispref')
| -rw-r--r-- | doc/lispref/ChangeLog | 37 | ||||
| -rw-r--r-- | doc/lispref/buffers.texi | 9 | ||||
| -rw-r--r-- | doc/lispref/files.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/frames.texi | 3 | ||||
| -rw-r--r-- | doc/lispref/internals.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/intro.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/processes.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/spellfile | 3 | ||||
| -rw-r--r-- | doc/lispref/two-volume-cross-refs.txt | 4 | ||||
| -rw-r--r-- | doc/lispref/windows.texi | 336 |
10 files changed, 213 insertions, 187 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index cbe016ac96d..0fa50492481 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,36 @@ | |||
| 1 | 2011-11-17 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * windows.texi (Resizing Windows, Splitting Windows) | ||
| 4 | (Deleting Windows): Use term window-combination-resize instead | ||
| 5 | of window-splits. | ||
| 6 | |||
| 7 | 2011-11-16 Martin Rudalics <rudalics@gmx.at> | ||
| 8 | |||
| 9 | * windows.texi (Resizing Windows, Splitting Windows): Rename | ||
| 10 | occurrences of window-nest to window-combination-limit. | ||
| 11 | |||
| 12 | 2011-11-14 Juanma Barranquero <lekktu@gmail.com> | ||
| 13 | |||
| 14 | * intro.texi (Lisp History): Fix typo. | ||
| 15 | |||
| 16 | 2011-11-12 Martin Rudalics <rudalics@gmx.at> | ||
| 17 | |||
| 18 | * windows.texi (Splitting Windows, Deleting Windows): Remove | ||
| 19 | references to splits status of windows. | ||
| 20 | |||
| 21 | 2011-11-10 Glenn Morris <rgm@gnu.org> | ||
| 22 | |||
| 23 | * buffers.texi (Read Only Buffers): Expand a bit on why | ||
| 24 | toggle-read-only should only be used interactively. (Bug#7292) | ||
| 25 | |||
| 26 | 2011-11-09 Chong Yidong <cyd@gnu.org> | ||
| 27 | |||
| 28 | * windows.texi (Window Sizes): Document window-pixel-edges, | ||
| 29 | window-inside-pixel-edges, window-absolute-pixel-edges, and | ||
| 30 | window-inside-absolute-pixel-edges. | ||
| 31 | (Resizing Windows): shrink-window-if-larger-than-buffer works on | ||
| 32 | non-full-width windows. | ||
| 33 | |||
| 1 | 2011-11-09 Martin Rudalics <rudalics@gmx.at> | 34 | 2011-11-09 Martin Rudalics <rudalics@gmx.at> |
| 2 | 35 | ||
| 3 | * windows.texi (Resizing Windows): Rewrite documentation of | 36 | * windows.texi (Resizing Windows): Rewrite documentation of |
| @@ -1094,9 +1127,9 @@ | |||
| 1094 | * commands.texi (Misc Events): Add cross-references to where | 1127 | * commands.texi (Misc Events): Add cross-references to where |
| 1095 | POSITION of a mouse event is described in detail. | 1128 | POSITION of a mouse event is described in detail. |
| 1096 | 1129 | ||
| 1097 | 2010-08-08 Christoph <cschol2112@googlemail.com> | 1130 | 2010-08-08 Christoph Scholtes <cschol2112@googlemail.com> |
| 1098 | 1131 | ||
| 1099 | * control.texi (Handling Errors) <error-message-string>: Fix arg name. | 1132 | * control.texi (Handling Errors) <error-message-string>: Fix arg name. |
| 1100 | 1133 | ||
| 1101 | 2010-08-08 Juanma Barranquero <lekktu@gmail.com> | 1134 | 2010-08-08 Juanma Barranquero <lekktu@gmail.com> |
| 1102 | 1135 | ||
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index 816d0f9faa8..ee2ce2e2001 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi | |||
| @@ -748,10 +748,11 @@ of the list (comparison is done with @code{eq}). | |||
| 748 | 748 | ||
| 749 | @deffn Command toggle-read-only &optional arg | 749 | @deffn Command toggle-read-only &optional arg |
| 750 | This command toggles whether the current buffer is read-only. It is | 750 | This command toggles whether the current buffer is read-only. It is |
| 751 | intended for interactive use; do not use it in programs. At any given | 751 | intended for interactive use; do not use it in programs (it may have |
| 752 | point in a program, you should know whether you want the read-only flag | 752 | side-effects, such as enabling View mode, and does not affect |
| 753 | on or off; so you can set @code{buffer-read-only} explicitly to the | 753 | read-only text properties). To change the read-only state of a buffer in |
| 754 | proper value, @code{t} or @code{nil}. | 754 | a program, explicitly set @code{buffer-read-only} to the proper value. |
| 755 | To temporarily ignore a read-only state, bind @code{inhibit-read-only}. | ||
| 755 | 756 | ||
| 756 | If @var{arg} is non-@code{nil}, it should be a raw prefix argument. | 757 | If @var{arg} is non-@code{nil}, it should be a raw prefix argument. |
| 757 | @code{toggle-read-only} sets @code{buffer-read-only} to @code{t} if | 758 | @code{toggle-read-only} sets @code{buffer-read-only} to @code{t} if |
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 71b612c527d..86ecfd122ef 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi | |||
| @@ -2827,7 +2827,7 @@ If @code{file-remote-p} returns the same identifier for two different | |||
| 2827 | filenames, that means they are stored on the same file system and can | 2827 | filenames, that means they are stored on the same file system and can |
| 2828 | be accessed locally with respect to each other. This means, for | 2828 | be accessed locally with respect to each other. This means, for |
| 2829 | example, that it is possible to start a remote process accessing both | 2829 | example, that it is possible to start a remote process accessing both |
| 2830 | files at the same time. Implementors of file handlers need to ensure | 2830 | files at the same time. Implementers of file handlers need to ensure |
| 2831 | this principle is valid. | 2831 | this principle is valid. |
| 2832 | 2832 | ||
| 2833 | @var{identification} specifies which part of the identifier shall be | 2833 | @var{identification} specifies which part of the identifier shall be |
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index d9399e98a69..d2e86a77112 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi | |||
| @@ -2414,7 +2414,7 @@ This function returns the ``vendor'' that provided the X server | |||
| 2414 | software (as a string). Really this means whoever distributes the X | 2414 | software (as a string). Really this means whoever distributes the X |
| 2415 | server. | 2415 | server. |
| 2416 | 2416 | ||
| 2417 | When the developers of X labelled software distributors as | 2417 | When the developers of X labeled software distributors as |
| 2418 | ``vendors,'' they showed their false assumption that no system could | 2418 | ``vendors,'' they showed their false assumption that no system could |
| 2419 | ever be developed and distributed noncommercially. | 2419 | ever be developed and distributed noncommercially. |
| 2420 | @end defun | 2420 | @end defun |
| @@ -2430,4 +2430,3 @@ This variable's value is @code{t} if no X window manager is in use. | |||
| 2430 | The functions @code{x-pixel-width} and @code{x-pixel-height} return the | 2430 | The functions @code{x-pixel-width} and @code{x-pixel-height} return the |
| 2431 | width and height of an X Window frame, measured in pixels. | 2431 | width and height of an X Window frame, measured in pixels. |
| 2432 | @end ignore | 2432 | @end ignore |
| 2433 | |||
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index 5cdd983f40d..0168c564e34 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi | |||
| @@ -887,7 +887,7 @@ known to be unchanged since the last complete redisplay. | |||
| 887 | @item unchanged_modified | 887 | @item unchanged_modified |
| 888 | @itemx overlay_unchanged_modified | 888 | @itemx overlay_unchanged_modified |
| 889 | The values of @code{modiff} and @code{overlay_modiff}, respectively, | 889 | The values of @code{modiff} and @code{overlay_modiff}, respectively, |
| 890 | after the last compelete redisplay. If their current values match | 890 | after the last complete redisplay. If their current values match |
| 891 | @code{modiff} or @code{overlay_modiff}, that means | 891 | @code{modiff} or @code{overlay_modiff}, that means |
| 892 | @code{beg_unchanged} and @code{end_unchanged} contain no useful | 892 | @code{beg_unchanged} and @code{end_unchanged} contain no useful |
| 893 | information. | 893 | information. |
diff --git a/doc/lispref/intro.texi b/doc/lispref/intro.texi index 7c070726023..44ac947fa99 100644 --- a/doc/lispref/intro.texi +++ b/doc/lispref/intro.texi | |||
| @@ -101,7 +101,7 @@ for other purposes as well, such as writing editing commands. | |||
| 101 | Dozens of Lisp implementations have been built over the years, each | 101 | Dozens of Lisp implementations have been built over the years, each |
| 102 | with its own idiosyncrasies. Many of them were inspired by Maclisp, | 102 | with its own idiosyncrasies. Many of them were inspired by Maclisp, |
| 103 | which was written in the 1960s at MIT's Project MAC. Eventually the | 103 | which was written in the 1960s at MIT's Project MAC. Eventually the |
| 104 | implementors of the descendants of Maclisp came together and developed a | 104 | implementers of the descendants of Maclisp came together and developed a |
| 105 | standard for Lisp systems, called Common Lisp. In the meantime, Gerry | 105 | standard for Lisp systems, called Common Lisp. In the meantime, Gerry |
| 106 | Sussman and Guy Steele at MIT developed a simplified but very powerful | 106 | Sussman and Guy Steele at MIT developed a simplified but very powerful |
| 107 | dialect of Lisp, called Scheme. | 107 | dialect of Lisp, called Scheme. |
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index d4f8ee9708b..51d91572d0e 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi | |||
| @@ -420,7 +420,7 @@ remote files. | |||
| 420 | Per default, this variable is always set to @code{t}, meaning that a | 420 | Per default, this variable is always set to @code{t}, meaning that a |
| 421 | call of @code{process-file} could potentially change any file on a | 421 | call of @code{process-file} could potentially change any file on a |
| 422 | remote host. When set to @code{nil}, a file handler could optimize | 422 | remote host. When set to @code{nil}, a file handler could optimize |
| 423 | its behaviour with respect to remote file attributes caching. | 423 | its behavior with respect to remote file attributes caching. |
| 424 | 424 | ||
| 425 | This variable should never be changed by @code{setq}. Instead of, it | 425 | This variable should never be changed by @code{setq}. Instead of, it |
| 426 | shall be set only by let-binding. | 426 | shall be set only by let-binding. |
diff --git a/doc/lispref/spellfile b/doc/lispref/spellfile index b373d00bebf..e66dcc88f71 100644 --- a/doc/lispref/spellfile +++ b/doc/lispref/spellfile | |||
| @@ -240,7 +240,7 @@ correct' | |||
| 240 | counterintuitive | 240 | counterintuitive |
| 241 | cr | 241 | cr |
| 242 | creatable | 242 | creatable |
| 243 | customie | 243 | customize |
| 244 | deactivate | 244 | deactivate |
| 245 | deactivated | 245 | deactivated |
| 246 | deassigns | 246 | deassigns |
| @@ -331,7 +331,6 @@ for' | |||
| 331 | formfeed | 331 | formfeed |
| 332 | forms' | 332 | forms' |
| 333 | forw | 333 | forw |
| 334 | forwa | ||
| 335 | found' | 334 | found' |
| 336 | frob | 335 | frob |
| 337 | from' | 336 | from' |
diff --git a/doc/lispref/two-volume-cross-refs.txt b/doc/lispref/two-volume-cross-refs.txt index 99b48d342ab..53a9f58cd01 100644 --- a/doc/lispref/two-volume-cross-refs.txt +++ b/doc/lispref/two-volume-cross-refs.txt | |||
| @@ -87,7 +87,7 @@ to create elisp2-aux-vol-added | |||
| 87 | insert elisp2-aux-vol-added into vol1.aux (append) | 87 | insert elisp2-aux-vol-added into vol1.aux (append) |
| 88 | insert elisp1-aux-vol-added into vol2.aux (prepend) | 88 | insert elisp1-aux-vol-added into vol2.aux (prepend) |
| 89 | 89 | ||
| 90 | (so you dont have to do it again) | 90 | (so you don't have to do it again) |
| 91 | % cp vol1.aux elisp1-aux-ready | 91 | % cp vol1.aux elisp1-aux-ready |
| 92 | % cp vol2.aux elisp2-aux-ready | 92 | % cp vol2.aux elisp2-aux-ready |
| 93 | 93 | ||
| @@ -120,7 +120,7 @@ Be sure that .fn file has no blank lines. | |||
| 120 | % texindex vol1.fn | 120 | % texindex vol1.fn |
| 121 | % texindex vol2.fn | 121 | % texindex vol2.fn |
| 122 | 122 | ||
| 123 | (so you dont have to do it again) | 123 | (so you don't have to do it again) |
| 124 | % cp vol1.fns elisp1-fns-2vol-ready | 124 | % cp vol1.fns elisp1-fns-2vol-ready |
| 125 | % cp vol2.fns elisp2-fns-2vol-ready | 125 | % cp vol2.fns elisp2-fns-2vol-ready |
| 126 | 126 | ||
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 52ac5a53900..8c99a06909b 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -375,13 +375,13 @@ Bars}). At the top of the window is an optional header line | |||
| 375 | line (@pxref{Mode Line Format}). | 375 | line (@pxref{Mode Line Format}). |
| 376 | 376 | ||
| 377 | Emacs provides several functions for finding the height and width of | 377 | Emacs provides several functions for finding the height and width of |
| 378 | a window. Most of these functions report the values as integer | 378 | a window. Except where noted, these heights and widths are reported |
| 379 | multiples of the default character height and width. On a graphical | 379 | as integer numbers of lines and columns respectively. On a graphical |
| 380 | display, the actual screen size of this default height and width are | 380 | display, each ``line'' and ``column'' actually corresponds to the |
| 381 | those specified by the frame's default font. Hence, if the buffer | 381 | height and width of a ``default'' character specified by the frame's |
| 382 | contains text that is displayed in a different size, the reported | 382 | default font. Thus, if a window is displaying text with a different |
| 383 | height and width of the window may differ from the actual number of | 383 | font or size, the reported height and width for that window may differ |
| 384 | text lines or columns displayed in it. | 384 | from the actual number of text lines or columns displayed within it. |
| 385 | 385 | ||
| 386 | @cindex window height | 386 | @cindex window height |
| 387 | @cindex height of a window | 387 | @cindex height of a window |
| @@ -534,6 +534,45 @@ can be resized in the desired direction. To determine that, use the | |||
| 534 | function @code{window-resizable}. @xref{Resizing Windows}. | 534 | function @code{window-resizable}. @xref{Resizing Windows}. |
| 535 | @end defun | 535 | @end defun |
| 536 | 536 | ||
| 537 | The following functions can be used to find a window's size and | ||
| 538 | position in pixels. Though mostly useful on graphical displays, they | ||
| 539 | can also be called on text-only terminals, where the screen area of | ||
| 540 | each text character is taken to be ``one pixel''. | ||
| 541 | |||
| 542 | @defun window-pixel-edges &optional window | ||
| 543 | This function return a list of pixel coordinates for the edges of | ||
| 544 | @var{window}. If @var{window} is omitted or @code{nil}, it defaults | ||
| 545 | to the selected window. | ||
| 546 | |||
| 547 | The return value has the form @code{(@var{left} @var{top} @var{right} | ||
| 548 | @var{bottom})}. The list elements are, respectively, the X coordinate | ||
| 549 | of the left window edge, the Y coordinate of the top edge, one more | ||
| 550 | than the X coordinate of the right edge, and one more than the Y | ||
| 551 | coordinate of the bottom edge. The origin coordinate @samp{(0,0)} is | ||
| 552 | taken to be the top left corner of the frame's window area. | ||
| 553 | |||
| 554 | These edge values include the space used by the window's scroll bar, | ||
| 555 | margins, fringes, header line, and mode line, if any. | ||
| 556 | @end defun | ||
| 557 | |||
| 558 | @defun window-inside-pixel-edges &optional window | ||
| 559 | This function is like @code{window-pixel-edges}, except that it | ||
| 560 | returns the edge coordinates for the window's text area, rather than | ||
| 561 | the edge coordinates for the window itself. @var{window} must specify | ||
| 562 | a live window. | ||
| 563 | @end defun | ||
| 564 | |||
| 565 | @defun window-absolute-pixel-edges &optional window | ||
| 566 | This function is like @code{window-pixel-edges}, except that it | ||
| 567 | returns the edge coordinates relative to the top left corner of the | ||
| 568 | display screen. | ||
| 569 | @end defun | ||
| 570 | |||
| 571 | @defun window-inside-absolute-pixel-edges &optional window | ||
| 572 | This function is like @code{window-inside-pixel-edges}, except that it | ||
| 573 | returns the edge coordinates relative to the top left corner of the | ||
| 574 | display screen. @var{window} must specify a live window. | ||
| 575 | @end defun | ||
| 537 | 576 | ||
| 538 | @node Resizing Windows | 577 | @node Resizing Windows |
| 539 | @section Resizing Windows | 578 | @section Resizing Windows |
| @@ -593,10 +632,11 @@ the window cannot be resized as demanded, an error is signaled. | |||
| 593 | The optional argument @var{ignore} has the same meaning as for the | 632 | The optional argument @var{ignore} has the same meaning as for the |
| 594 | function @code{window-resizable} above. | 633 | function @code{window-resizable} above. |
| 595 | 634 | ||
| 596 | The choice of which window edge this function alters depends on the | 635 | The choice of which window edges this function alters depends on the |
| 597 | splitting and nesting status of the involved windows; in some cases, | 636 | values of the option @code{window-combination-resize} and the |
| 598 | it may alter both edges. @xref{Splitting Windows}. To resize by | 637 | combination-limit status of the involved windows; in some cases, it may |
| 599 | moving only the bottom or right edge of a window, use the function | 638 | alter both edges. @xref{Splitting Windows}. To resize by moving only |
| 639 | the bottom or right edge of a window, use the function | ||
| 600 | @code{adjust-window-trailing-edge}, below. | 640 | @code{adjust-window-trailing-edge}, below. |
| 601 | @end defun | 641 | @end defun |
| 602 | 642 | ||
| @@ -604,104 +644,85 @@ moving only the bottom or right edge of a window, use the function | |||
| 604 | @c shrink-window, and shrink-window-horizontally are documented in the | 644 | @c shrink-window, and shrink-window-horizontally are documented in the |
| 605 | @c Emacs manual. They are not preferred for calling from Lisp. | 645 | @c Emacs manual. They are not preferred for calling from Lisp. |
| 606 | 646 | ||
| 607 | The following function is useful for moving the line dividing two | ||
| 608 | windows. | ||
| 609 | |||
| 610 | @defun adjust-window-trailing-edge window delta &optional horizontal | 647 | @defun adjust-window-trailing-edge window delta &optional horizontal |
| 611 | This function moves @var{window}'s bottom edge by @var{delta} lines. | 648 | This function moves @var{window}'s bottom edge by @var{delta} lines. |
| 612 | Optional argument @var{horizontal} non-@code{nil} means to move | 649 | If optional argument @var{horizontal} is non-@code{nil}, it instead |
| 613 | @var{window}'s right edge by @var{delta} columns. The argument | 650 | moves the right edge by @var{delta} columns. If @var{window} is |
| 614 | @var{window} defaults to the selected window. | 651 | @code{nil}, it defaults to the selected window. |
| 615 | 652 | ||
| 616 | If @var{delta} is greater zero, this moves the edge downwards or to the | 653 | A positive @var{delta} moves the edge downwards or to the right; a |
| 617 | right. If @var{delta} is less than zero, this moves the edge upwards or | 654 | negative @var{delta} moves it upwards or to the left. If the edge |
| 618 | to the left. If the edge can't be moved by @var{delta} lines or columns, | 655 | cannot be moved as far as specified by @var{delta}, this function |
| 619 | it is moved as far as possible in the desired direction but no error is | 656 | moves it as far as possible but does not signal a error. |
| 620 | signaled. | ||
| 621 | 657 | ||
| 622 | This function tries to resize windows adjacent to the edge that is | 658 | This function tries to resize windows adjacent to the edge that is |
| 623 | moved. Only if this is insufficient, it will also resize windows not | 659 | moved. If this is not possible for some reason (e.g. if that adjacent |
| 624 | adjacent to that edge. As a consequence, if you move an edge in one | 660 | window is fixed-size), it may resize other windows. |
| 625 | direction and back in the other direction by the same amount, the | ||
| 626 | resulting window configuration will not be necessarily identical to the | ||
| 627 | one before the first move. So if your intend to just resize | ||
| 628 | @var{window}, you should not use this function but call | ||
| 629 | @code{window-resize} (see above) instead. | ||
| 630 | @end defun | 661 | @end defun |
| 631 | 662 | ||
| 663 | The following commands resize windows in more specific ways. When | ||
| 664 | called interactively, they act on the selected window. | ||
| 665 | |||
| 632 | @deffn Command fit-window-to-buffer &optional window max-height min-height override | 666 | @deffn Command fit-window-to-buffer &optional window max-height min-height override |
| 633 | This command makes @var{window} the right height to display its | 667 | This command adjusts the height of @var{window} to fit the text in it. |
| 634 | contents exactly. The default for @var{window} is the selected window. | 668 | It returns non-@code{nil} if it was able to resize @var{window}, and |
| 635 | 669 | @code{nil} otherwise. If @var{window} is omitted or @code{nil}, it | |
| 636 | The optional argument @var{max-height} specifies the maximum total | 670 | defaults to the selected window. Otherwise, it should be a live |
| 637 | height the window is allowed to be; @code{nil} means use the maximum | 671 | window. |
| 638 | permissible height of a window on @var{window}'s frame. The optional | 672 | |
| 639 | argument @var{min-height} specifies the minimum total height for the | 673 | The optional argument @var{max-height}, if non-@code{nil}, specifies |
| 640 | window; @code{nil} means use @code{window-min-height}. All these height | 674 | the maximum total height that this function can give @var{window}. |
| 641 | values include the mode line and/or header line. | 675 | The optional argument @var{min-height}, if no-@code{nil}, specifies |
| 642 | 676 | the minimum total height that it can give, which overrides the | |
| 643 | If the optional argument @var{override} is non-@code{nil}, this means to | 677 | variable @code{window-min-height}. |
| 644 | ignore any restrictions imposed by @code{window-min-height} and | 678 | |
| 645 | @code{window-min-width} on the size of @var{window}. | 679 | If the optional argument @var{override} is non-@code{nil}, this |
| 646 | 680 | function ignores any size restrictions imposed by | |
| 647 | This function returns non-@code{nil} if it orderly resized @var{window}, | 681 | @code{window-min-height} and @code{window-min-width}. |
| 648 | and @code{nil} otherwise. | ||
| 649 | @end deffn | 682 | @end deffn |
| 650 | 683 | ||
| 651 | @deffn Command shrink-window-if-larger-than-buffer &optional window | 684 | @deffn Command shrink-window-if-larger-than-buffer &optional window |
| 652 | This command shrinks @var{window} vertically to be as small as possible | 685 | This command attempts to reduce @var{window}'s height as much as |
| 653 | while still showing the full contents of its buffer---but not less than | 686 | possible while still showing its full buffer, but no less than |
| 654 | @code{window-min-height} lines. The argument @var{window} must denote | 687 | @code{window-min-height} lines. The return value is non-@code{nil} if |
| 655 | a live window and defaults to the selected one. | 688 | the window was resized, and @code{nil} otherwise. If @var{window} is |
| 656 | 689 | omitted or @code{nil}, it defaults to the selected window. Otherwise, | |
| 657 | However, this command does nothing if the window is already too small to | 690 | it should be a live window. |
| 658 | display the whole text of the buffer, or if part of the contents are | 691 | |
| 659 | currently scrolled off screen, or if the window is not the full width of | 692 | This command does nothing if the window is already too short to |
| 660 | its frame, or if the window is the only window in its frame. | 693 | display all of its buffer, or if any of the buffer is scrolled |
| 661 | 694 | off-screen, or if the window is the only live window in its frame. | |
| 662 | This command returns non-@code{nil} if it actually shrank the window | ||
| 663 | and @code{nil} otherwise. | ||
| 664 | @end deffn | 695 | @end deffn |
| 665 | 696 | ||
| 666 | @cindex balancing window sizes | 697 | @cindex balancing window sizes |
| 667 | Emacs provides two functions to balance windows, that is, to even out | ||
| 668 | the sizes of all windows on the same frame. The minibuffer window and | ||
| 669 | fixed-size windows are not resized by these functions. | ||
| 670 | |||
| 671 | @deffn Command balance-windows &optional window-or-frame | 698 | @deffn Command balance-windows &optional window-or-frame |
| 672 | This function balances windows in a way that gives more space to | 699 | This function balances windows in a way that gives more space to |
| 673 | full-width and/or full-height windows. If @var{window-or-frame} | 700 | full-width and/or full-height windows. If @var{window-or-frame} |
| 674 | specifies a frame, it balances all windows on that frame. If | 701 | specifies a frame, it balances all windows on that frame. If |
| 675 | @var{window-or-frame} specifies a window, it balances that window and | 702 | @var{window-or-frame} specifies a window, it balances only that window |
| 676 | its siblings (@pxref{Windows and Frames}) only. | 703 | and its siblings (@pxref{Windows and Frames}). |
| 677 | @end deffn | 704 | @end deffn |
| 678 | 705 | ||
| 679 | @deffn Command balance-windows-area | 706 | @deffn Command balance-windows-area |
| 680 | This function attempts to give all windows on the selected frame | 707 | This function attempts to give all windows on the selected frame |
| 681 | approximately the same share of the screen area. This means that | 708 | approximately the same share of the screen area. Full-width or |
| 682 | full-width or full-height windows are not given more space than other | 709 | full-height windows are not given more space than other windows. |
| 683 | windows. | ||
| 684 | @end deffn | 710 | @end deffn |
| 685 | 711 | ||
| 686 | @cindex maximizing windows | 712 | @cindex maximizing windows |
| 687 | The following function can be used to give a window the maximum possible | ||
| 688 | size without deleting other ones. | ||
| 689 | |||
| 690 | @deffn Command maximize-window &optional window | 713 | @deffn Command maximize-window &optional window |
| 691 | This function maximizes @var{window}. More precisely, this makes | 714 | This function attempts to make @var{window} as large as possible, in |
| 692 | @var{window} as large as possible without resizing its frame or deleting | 715 | both dimensions, without resizing its frame or deleting other windows. |
| 693 | other windows. @var{window} can be any window and defaults to the | 716 | If @var{window} is omitted or @code{nil}, it defaults to the selected |
| 694 | selected one. | 717 | window. |
| 695 | @end deffn | 718 | @end deffn |
| 696 | 719 | ||
| 697 | @cindex minimizing windows | 720 | @cindex minimizing windows |
| 698 | To make a window as small as possible without deleting it the | ||
| 699 | following function can be used. | ||
| 700 | |||
| 701 | @deffn Command minimize-window &optional window | 721 | @deffn Command minimize-window &optional window |
| 702 | This function minimizes @var{window}. More precisely, this makes | 722 | This function attempts to make @var{window} as small as possible, in |
| 703 | @var{window} as small as possible without deleting it or resizing its | 723 | both dimensions, without deleting it or resizing its frame. If |
| 704 | frame. @var{window} can be any window and defaults to the selected one. | 724 | @var{window} is omitted or @code{nil}, it defaults to the selected |
| 725 | window. | ||
| 705 | @end deffn | 726 | @end deffn |
| 706 | 727 | ||
| 707 | 728 | ||
| @@ -719,7 +740,7 @@ This function creates a new live window next to the window | |||
| 719 | to the selected window. That window is ``split'', and reduced in | 740 | to the selected window. That window is ``split'', and reduced in |
| 720 | size. The space is taken up by the new window, which is returned. | 741 | size. The space is taken up by the new window, which is returned. |
| 721 | 742 | ||
| 722 | The optional second argument @var{size} determines the sizes of the | 743 | The optional second argument @var{size} determines the sizes of |
| 723 | @var{window} and/or the new window. If it is omitted or @code{nil}, | 744 | @var{window} and/or the new window. If it is omitted or @code{nil}, |
| 724 | both windows are given equal sizes; if there is an odd line, it is | 745 | both windows are given equal sizes; if there is an odd line, it is |
| 725 | allocated to the new window. If @var{size} is a positive number, | 746 | allocated to the new window. If @var{size} is a positive number, |
| @@ -765,10 +786,10 @@ lieu of the usual action of @code{split-window}. | |||
| 765 | 786 | ||
| 766 | As an example, we show a combination of @code{split-window} calls | 787 | As an example, we show a combination of @code{split-window} calls |
| 767 | that yields the window configuration discussed in @ref{Windows and | 788 | that yields the window configuration discussed in @ref{Windows and |
| 768 | Frames}. This example demonstrates splitting live windows as well as | 789 | Frames}. This example demonstrates splitting a live window as well as |
| 769 | splitting internal windows. We begin with a frame containing a single | 790 | splitting an internal window. We begin with a frame containing a |
| 770 | window (a live root window), which we denote by @var{W4}. Calling | 791 | single window (a live root window), which we denote by @var{W4}. |
| 771 | @code{(split-window W3)} yields this window configuration: | 792 | Calling @code{(split-window W3)} yields this window configuration: |
| 772 | 793 | ||
| 773 | @smallexample | 794 | @smallexample |
| 774 | @group | 795 | @group |
| @@ -816,15 +837,14 @@ internal window @var{W3} as the argument. The result: | |||
| 816 | @end smallexample | 837 | @end smallexample |
| 817 | 838 | ||
| 818 | @noindent | 839 | @noindent |
| 819 | A new live window, @var{W2}, is created to the left of @var{W3} (which | 840 | A new live window @var{W2} is created, to the left of the internal |
| 820 | encompasses the vertical window combination of @var{W4} and @var{W5}). | 841 | window @var{W3}. A new internal window @var{W1} is created, becoming |
| 821 | A new internal window @var{W1} is also created, and becomes the new | 842 | the new root window. |
| 822 | root window. | ||
| 823 | 843 | ||
| 824 | The following two options can be used to modify the operation of | 844 | The following two options can be used to modify the operation of |
| 825 | @code{split-window}. | 845 | @code{split-window}. |
| 826 | 846 | ||
| 827 | @defopt window-splits | 847 | @defopt window-combination-resize |
| 828 | If this variable is @code{nil}, @code{split-window} can only split a | 848 | If this variable is @code{nil}, @code{split-window} can only split a |
| 829 | window (denoted by @var{window}) if @var{window}'s screen area is | 849 | window (denoted by @var{window}) if @var{window}'s screen area is |
| 830 | large enough to accommodate both itself and the new window. This is | 850 | large enough to accommodate both itself and the new window. This is |
| @@ -836,45 +856,16 @@ resize all windows that are part of the same combination as | |||
| 836 | this may allow @code{split-window} to succeed even if @var{window} is | 856 | this may allow @code{split-window} to succeed even if @var{window} is |
| 837 | a fixed-size window or too small to ordinarily split. | 857 | a fixed-size window or too small to ordinarily split. |
| 838 | 858 | ||
| 839 | In any case, the value of this variable is assigned to the splits status | 859 | Also if this variable is non-@code{nil}, subsequent resizing and |
| 840 | of the new window and, provided old and new window form a new | 860 | deleting @var{window} will usually affect @emph{all} windows in |
| 841 | combination, of the old window as well. The splits status of a window | 861 | @var{window}'s combination. |
| 842 | can be retrieved by invoking the function @code{window-splits} and | ||
| 843 | altered by the function @code{set-window-splits} described next. | ||
| 844 | 862 | ||
| 845 | If @code{window-nest} (see below) is non-@code{nil}, the space for the | 863 | The setting of this variable has no effect if |
| 846 | new window is exclusively taken from the old window, but the splits | 864 | @code{window-combination-limit} (see below) is non-@code{nil}. |
| 847 | status of the involved windows is nevertheless set as described here. | ||
| 848 | @end defopt | 865 | @end defopt |
| 849 | 866 | ||
| 850 | @defun window-splits &optional window | 867 | To illustrate the use of @code{window-combination-resize} consider the |
| 851 | This function returns the splits status of @var{window}. The argument | 868 | following window configuration: |
| 852 | @var{window} can be any window and defaults to the selected one. | ||
| 853 | |||
| 854 | @cindex splits status | ||
| 855 | The @dfn{splits status} of a window specifies how resizing and deleting | ||
| 856 | that window may affect the size of other windows in the same window | ||
| 857 | combination. More precisely, if @var{window}'s splits status is | ||
| 858 | @code{nil} and @var{window} is resized, the corresponding space is | ||
| 859 | preferably taken from (or given to) @var{window}'s right sibling. When | ||
| 860 | @var{window} is deleted, its space is given to its left sibling. If | ||
| 861 | @var{window}'s splits status is non-@code{nil}, resizing and deleting | ||
| 862 | @var{window} may resize @emph{all} windows in @var{window}'s | ||
| 863 | combination. | ||
| 864 | |||
| 865 | The splits status is initially set by @code{split-window} | ||
| 866 | from the current value of the variable @code{window-splits} (see above) | ||
| 867 | and can be reset by the function @code{set-window-splits} (see below). | ||
| 868 | @end defun | ||
| 869 | |||
| 870 | @defun set-window-splits window &optional status | ||
| 871 | This function sets the splits status (see above) of @var{window} to | ||
| 872 | @var{status}. The argument @var{window} can be any window and defaults | ||
| 873 | to the selected one. The return value is @var{status}. | ||
| 874 | @end defun | ||
| 875 | |||
| 876 | To illustrate the use of @code{window-splits} consider the following | ||
| 877 | window configuration: | ||
| 878 | @smallexample | 869 | @smallexample |
| 879 | @group | 870 | @group |
| 880 | ______________________________________ | 871 | ______________________________________ |
| @@ -895,8 +886,9 @@ window configuration: | |||
| 895 | @end group | 886 | @end group |
| 896 | @end smallexample | 887 | @end smallexample |
| 897 | 888 | ||
| 898 | Splitting window @code{W3} with @code{window-splits} @code{nil} | 889 | Splitting window @code{W3} with @code{window-combination-resize} |
| 899 | produces a configuration where the size of @code{W2} remains unchanged: | 890 | @code{nil} produces a configuration where the size of @code{W2} remains |
| 891 | unchanged: | ||
| 900 | @smallexample | 892 | @smallexample |
| 901 | @group | 893 | @group |
| 902 | ______________________________________ | 894 | ______________________________________ |
| @@ -917,10 +909,8 @@ produces a configuration where the size of @code{W2} remains unchanged: | |||
| 917 | @end group | 909 | @end group |
| 918 | @end smallexample | 910 | @end smallexample |
| 919 | 911 | ||
| 920 | Splitting @code{W3} with @code{window-splits} non-@code{nil} instead | 912 | Splitting @code{W3} with @code{window-combination-resize} non-@code{nil} |
| 921 | produces a configuration where all windows have approximately the same | 913 | instead steals the space for @code{W4} from both @code{W2} and @code{W3}: |
| 922 | height: | ||
| 923 | |||
| 924 | @smallexample | 914 | @smallexample |
| 925 | @group | 915 | @group |
| 926 | ______________________________________ | 916 | ______________________________________ |
| @@ -941,34 +931,36 @@ height: | |||
| 941 | @end group | 931 | @end group |
| 942 | @end smallexample | 932 | @end smallexample |
| 943 | 933 | ||
| 944 | @defopt window-nest | 934 | @defopt window-combination-limit |
| 945 | If this variable is @code{nil}, @code{split-window} creates a new parent | 935 | If this variable is @code{nil}, @code{split-window} creates a new parent |
| 946 | window if and only if the old window has no parent window or shall be | 936 | window if and only if the old window has no parent window or shall be |
| 947 | split orthogonally to the combination it is part of. If this variable | 937 | split orthogonally to the combination it is part of. If this variable |
| 948 | is non-@code{nil}, @code{split-window} always creates a new parent | 938 | is @code{t}, @code{split-window} always creates a new parent window. If |
| 949 | window. If this variable is always non-@code{nil}, a frame's window | 939 | this variable is always @code{t}, a frame's window tree is a binary tree |
| 950 | tree is a binary tree so every window but the frame's root window has | 940 | so every window but the frame's root window has exactly one sibling. |
| 951 | exactly one sibling. | 941 | Other values are reserved for future use. |
| 952 | 942 | ||
| 953 | The value of this variable is also assigned to the nest status of the | 943 | The value of this variable is also assigned to the combination-limit |
| 954 | new parent window. The nest status of any window can be retrieved via | 944 | status of the new parent window. The combination-limit status of any |
| 955 | the function @code{window-nest} and altered by the function | 945 | window can be retrieved via the function @code{window-combination-limit} |
| 956 | @code{set-window-nest}, see below. | 946 | and altered by the function @code{set-window-combination-limit}, see |
| 947 | below. | ||
| 957 | @end defopt | 948 | @end defopt |
| 958 | 949 | ||
| 959 | @defun window-nest &optional window | 950 | @defun window-combination-limit &optional window |
| 960 | This function returns the nest status of @var{window}. The argument | 951 | This function returns the combination-limit status of @var{window}. The |
| 961 | @var{window} can be any window and defaults to the selected one. Note, | 952 | argument @var{window} can be any window and defaults to the selected |
| 962 | however, that the nest status is currently meaningful for internal | 953 | one. Note, however, that the combination-limit status is currently |
| 963 | windows only. | 954 | meaningful for internal windows only. |
| 964 | 955 | ||
| 965 | @cindex nest status | 956 | @cindex combination-limit status |
| 966 | The @dfn{nest status} of a window specifies whether that window may be | 957 | The @dfn{combination-limit status} of a window specifies whether that |
| 967 | removed and its child windows recombined with that window's siblings | 958 | window may be removed and its child windows recombined with that |
| 968 | when such a sibling's child window is deleted. The nest status is | 959 | window's siblings when such a sibling's child window is deleted. The |
| 969 | initially assigned by @code{split-window} from the current value of the | 960 | combination-limit status is initially assigned by @code{split-window} |
| 970 | variable @code{window-nest} (see above) and can be reset by the function | 961 | from the current value of the variable @code{window-combination-limit} |
| 971 | @code{set-window-nest} (see below). | 962 | (see above) and can be reset by the function |
| 963 | @code{set-window-combination-limit} (see below). | ||
| 972 | 964 | ||
| 973 | If the return value is @code{nil}, child windows of @var{window} may be | 965 | If the return value is @code{nil}, child windows of @var{window} may be |
| 974 | recombined with @var{window}'s siblings when a window gets deleted. A | 966 | recombined with @var{window}'s siblings when a window gets deleted. A |
| @@ -976,16 +968,17 @@ return value of @code{nil} means that child windows of @var{window} are | |||
| 976 | never (re-)combined with @var{window}'s siblings in such a case. | 968 | never (re-)combined with @var{window}'s siblings in such a case. |
| 977 | @end defun | 969 | @end defun |
| 978 | 970 | ||
| 979 | @defun set-window-nest window &optional status | 971 | @defun set-window-combination-limit window &optional status |
| 980 | This functions sets the nest status (see above) of @var{window} to | 972 | This functions sets the combination-limit status (see above) of |
| 981 | @var{status}. The argument @var{window} can be any window and defaults | 973 | @var{window} to @var{status}. The argument @var{window} can be any |
| 982 | to the selected one. Note that setting the nest status is meaningful | 974 | window and defaults to the selected one. Note that setting the |
| 983 | for internal windows only. The return value is @var{status}. | 975 | combination-limit status is meaningful for internal windows only. The |
| 976 | return value is @var{status}. | ||
| 984 | @end defun | 977 | @end defun |
| 985 | 978 | ||
| 986 | To illustrate the use of @code{window-nest} consider the following | 979 | To illustrate the use of @code{window-combination-limit} consider the |
| 987 | configuration (throughout the following examples we shall assume that | 980 | following configuration (throughout the following examples we shall |
| 988 | @code{window-splits} invariantly is @code{nil}). | 981 | assume that @code{window-combination-resize} invariantly is @code{nil}). |
| 989 | @smallexample | 982 | @smallexample |
| 990 | @group | 983 | @group |
| 991 | ______________________________________ | 984 | ______________________________________ |
| @@ -1007,7 +1000,8 @@ configuration (throughout the following examples we shall assume that | |||
| 1007 | @end smallexample | 1000 | @end smallexample |
| 1008 | 1001 | ||
| 1009 | Splitting @code{W2} into two windows above each other with | 1002 | Splitting @code{W2} into two windows above each other with |
| 1010 | @code{window-nest} equal @code{nil} will get you a configuration like: | 1003 | @code{window-combination-limit} equal @code{nil} will get you a |
| 1004 | configuration like: | ||
| 1011 | @smallexample | 1005 | @smallexample |
| 1012 | @group | 1006 | @group |
| 1013 | ______________________________________ | 1007 | ______________________________________ |
| @@ -1074,9 +1068,9 @@ follows: | |||
| 1074 | 1068 | ||
| 1075 | Hence, with respect to the initial configuration, window @code{W2} has | 1069 | Hence, with respect to the initial configuration, window @code{W2} has |
| 1076 | grown at the expense of window @code{W3}. If, however, in the initial | 1070 | grown at the expense of window @code{W3}. If, however, in the initial |
| 1077 | configuration you had split @code{W2} with @code{window-nest} bound to | 1071 | configuration you had split @code{W2} with |
| 1078 | @code{t}, a new internal window @code{W5} would have been created as | 1072 | @code{window-combination-limit} bound to @code{t}, a new internal window |
| 1079 | depicted below. | 1073 | @code{W5} would have been created as depicted below. |
| 1080 | @smallexample | 1074 | @smallexample |
| 1081 | @group | 1075 | @group |
| 1082 | ______________________________________ | 1076 | ______________________________________ |
| @@ -1189,12 +1183,12 @@ window parameters. If the @code{delete-window} parameter specifies a | |||
| 1189 | function, that function is called with @var{window} as its sole | 1183 | function, that function is called with @var{window} as its sole |
| 1190 | argument. | 1184 | argument. |
| 1191 | 1185 | ||
| 1192 | If the splits status of @var{window} (@pxref{Splitting Windows}) is | 1186 | If @code{window-combination-resize} (@pxref{Splitting Windows}) is |
| 1193 | @code{nil}, the space @var{window} took up is given to its left sibling | 1187 | @code{nil}, the space @var{window} took up is given to its left sibling |
| 1194 | if such a window exists and to its right sibling otherwise. If the | 1188 | if such a window exists and to its right sibling otherwise. If |
| 1195 | splits status of @var{window} is non-@code{nil}, its space is | 1189 | @code{window-combination-resize} is non-@code{nil}, the space of |
| 1196 | proportionally distributed among the remaining windows in the same | 1190 | @var{window} is proportionally distributed among the remaining windows |
| 1197 | combination. | 1191 | in the same combination. |
| 1198 | @end deffn | 1192 | @end deffn |
| 1199 | 1193 | ||
| 1200 | @deffn Command delete-other-windows &optional window | 1194 | @deffn Command delete-other-windows &optional window |