diff options
| author | Martin Rudalics | 2011-10-09 14:26:29 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2011-10-09 14:26:29 +0200 |
| commit | d83dc65b3f42fae9b2085b9a1ca986c401d49f8d (patch) | |
| tree | 403ebf31f85d2ecab263f4ad79004de19a92dad3 /doc | |
| parent | 56f2d1e18338b7096d6b7f85cc11d3bf598ab394 (diff) | |
| download | emacs-d83dc65b3f42fae9b2085b9a1ca986c401d49f8d.tar.gz emacs-d83dc65b3f42fae9b2085b9a1ca986c401d49f8d.zip | |
Describe frame-auto-hide-function and related issues.
* buffers.texi (The Buffer List): Describe how bury-buffer deals
with the selected window.
* windows.texi (Buffers and Windows): Reformulate text on how
replace-buffer-in-windows deals with a window.
(Quitting Windows): Describe how quit-window deals with a
standalone frame. Describe new option frame-auto-hide-function.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/ChangeLog | 9 | ||||
| -rw-r--r-- | doc/lispref/buffers.texi | 33 | ||||
| -rw-r--r-- | doc/lispref/windows.texi | 67 |
3 files changed, 76 insertions, 33 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index adc15cfc373..f822b4bebdf 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2011-10-09 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * buffers.texi (The Buffer List): Describe how bury-buffer deals | ||
| 4 | with the selected window. | ||
| 5 | * windows.texi (Buffers and Windows): Reformulate text on how | ||
| 6 | replace-buffer-in-windows deals with a window. | ||
| 7 | (Quitting Windows): Describe how quit-window deals with a | ||
| 8 | standalone frame. Describe new option frame-auto-hide-function. | ||
| 9 | |||
| 1 | 2011-10-08 Glenn Morris <rgm@gnu.org> | 10 | 2011-10-08 Glenn Morris <rgm@gnu.org> |
| 2 | 11 | ||
| 3 | * symbols.texi (Other Plists): Markup fix. (Bug#9702) | 12 | * symbols.texi (Other Plists): Markup fix. (Bug#9702) |
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index ce1a8b0fb4e..816d0f9faa8 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi | |||
| @@ -884,23 +884,28 @@ This buffer therefore becomes the least desirable candidate for | |||
| 884 | @code{other-buffer} to return. The argument can be either a buffer | 884 | @code{other-buffer} to return. The argument can be either a buffer |
| 885 | itself or the name of one. | 885 | itself or the name of one. |
| 886 | 886 | ||
| 887 | @code{bury-buffer} operates on each frame's @code{buffer-list} parameter | 887 | This functions operates on each frame's @code{buffer-list} parameter as |
| 888 | as well as the fundamental buffer list; therefore, the buffer that you | 888 | well as the fundamental buffer list; therefore, the buffer that you bury |
| 889 | bury will come last in the value of @code{(buffer-list @var{frame})} and | 889 | will come last in the value of @code{(buffer-list @var{frame})} and in |
| 890 | in the value of @code{(buffer-list)}. | 890 | the value of @code{(buffer-list)}. In addition, it also puts the buffer |
| 891 | 891 | at the end of the list of buffer of the selected window (@pxref{Window | |
| 892 | If @var{buffer-or-name} is @code{nil} or omitted, this means to bury | 892 | History}) provided it is shown in that window. |
| 893 | the current buffer. In addition, if the buffer is displayed in the | 893 | |
| 894 | selected window, this switches to some other buffer (obtained using | 894 | If @var{buffer-or-name} is @code{nil} or omitted, this means to bury the |
| 895 | @code{other-buffer}) in the selected window. @xref{Switching | 895 | current buffer. In addition, if the current buffer is displayed in the |
| 896 | Buffers}. But if the selected window is dedicated to its buffer, it | 896 | selected window, this makes sure that the window is either deleted or |
| 897 | deletes that window if there are other windows left on its frame. | 897 | another buffer is shown in it. More precisely, if the window is |
| 898 | Otherwise, if the selected window is the only window on its frame, it | 898 | dedicated (@pxref{Dedicated Windows}) and there are other windows on its |
| 899 | iconifies that frame. If @var{buffer-or-name} is displayed in some | 899 | frame, the window is deleted. If the window is both dedicated and the |
| 900 | only window on its frame's terminal, the function specified by | ||
| 901 | @code{frame-auto-hide-function} (@pxref{Quitting Windows}) will deal | ||
| 902 | with the window. If the window is not dedicated to its buffer, it calls | ||
| 903 | @code{switch-to-prev-buffer} (@pxref{Window History}) to show another | ||
| 904 | buffer in that window. If @var{buffer-or-name} is displayed in some | ||
| 900 | other window, it remains displayed there. | 905 | other window, it remains displayed there. |
| 901 | 906 | ||
| 902 | To replace a buffer in all the windows that display it, use | 907 | To replace a buffer in all the windows that display it, use |
| 903 | @code{replace-buffer-in-windows}. @xref{Buffers and Windows}. | 908 | @code{replace-buffer-in-windows}, @xref{Buffers and Windows}. |
| 904 | @end deffn | 909 | @end deffn |
| 905 | 910 | ||
| 906 | @deffn Command unbury-buffer | 911 | @deffn Command unbury-buffer |
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index bffea19210c..41ccbaafd49 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -2076,16 +2076,17 @@ This command replaces @var{buffer-or-name} with some other buffer, in | |||
| 2076 | all windows displaying it. For each such window, it choose another | 2076 | all windows displaying it. For each such window, it choose another |
| 2077 | buffer using @code{switch-to-prev-buffer} (@pxref{Window History}). | 2077 | buffer using @code{switch-to-prev-buffer} (@pxref{Window History}). |
| 2078 | 2078 | ||
| 2079 | @var{buffer-or-name} may be a buffer, or the name of an existing | 2079 | The argument @var{buffer-or-name} may be a buffer, or the name of an |
| 2080 | buffer; it defaults to the current buffer. | 2080 | existing buffer; it defaults to the current buffer. |
| 2081 | 2081 | ||
| 2082 | If a window displaying @var{buffer-or-name} is dedicated | 2082 | If a window displaying @var{buffer-or-name} is dedicated |
| 2083 | (@pxref{Dedicated Windows}), has never displayed any other buffers and | 2083 | (@pxref{Dedicated Windows}) and is not the only window on its frame, |
| 2084 | is not the only window on its frame, that window is deleted. If that | 2084 | that window is deleted. If that window is the only window on its frame |
| 2085 | window is the only window on its frame and there are other frames on the | 2085 | and there are other frames on the frame's terminal, that frame is dealt |
| 2086 | frame's terminal, that frame is deleted too; otherwise, the buffer | 2086 | with by the function spcecified by @code{frame-auto-hide-function} |
| 2087 | provided by the function @code{switch-to-prev-buffer} (@pxref{Window | 2087 | (@pxref{Quitting Windows}). Otherwise, the buffer provided by the |
| 2088 | History}) is displayed instead. | 2088 | function @code{switch-to-prev-buffer} (@pxref{Window History}) is |
| 2089 | displayed in the window instead. | ||
| 2089 | @end deffn | 2090 | @end deffn |
| 2090 | 2091 | ||
| 2091 | 2092 | ||
| @@ -2784,14 +2785,14 @@ non-@code{nil} value. | |||
| 2784 | @section Quitting Windows | 2785 | @section Quitting Windows |
| 2785 | 2786 | ||
| 2786 | When you want to get rid of a window used for displaying a buffer you | 2787 | When you want to get rid of a window used for displaying a buffer you |
| 2787 | can use the function @code{delete-window} (@pxref{Deleting Windows}) to | 2788 | can call @code{delete-window} or @code{delete-windows-on} |
| 2788 | remove that window from its frame. If the buffer has been shown on a | 2789 | (@pxref{Deleting Windows}) to remove that window from its frame. If the |
| 2789 | separate frame, you might want to call @code{delete-frame} | 2790 | buffer is shown on a separate frame, you might want to call |
| 2790 | (@pxref{Deleting Frames}) instead. If, on the other hand, a window has | 2791 | @code{delete-frame} (@pxref{Deleting Frames}) instead. If, on the other |
| 2791 | been reused for displaying the buffer, you might prefer showing the | 2792 | hand, a window has been reused for displaying the buffer, you might |
| 2792 | buffer previously shown in that window by calling the function | 2793 | prefer showing the buffer previously shown in that window by calling the |
| 2793 | @code{switch-to-prev-buffer} (@pxref{Window History}). Finally, you | 2794 | function @code{switch-to-prev-buffer} (@pxref{Window History}). |
| 2794 | might want to either bury (@pxref{The Buffer List}) or kill | 2795 | Finally, you might want to either bury (@pxref{The Buffer List}) or kill |
| 2795 | (@pxref{Killing Buffers}) the window's buffer. | 2796 | (@pxref{Killing Buffers}) the window's buffer. |
| 2796 | 2797 | ||
| 2797 | The following function uses information on how the window for | 2798 | The following function uses information on how the window for |
| @@ -2807,9 +2808,12 @@ instead of burying it. | |||
| 2807 | Quitting @var{window} means to proceed as follows: If @var{window} was | 2808 | Quitting @var{window} means to proceed as follows: If @var{window} was |
| 2808 | created specially for displaying its current buffer, delete @var{window} | 2809 | created specially for displaying its current buffer, delete @var{window} |
| 2809 | provided its frame contains at least one other live window. If | 2810 | provided its frame contains at least one other live window. If |
| 2810 | @var{window} is the only window on its frame and other frames still | 2811 | @var{window} is the only window on its frame and there are other frames |
| 2811 | exist, delete the frame together with @var{window}. If, however, there | 2812 | on the frame's terminal, the value of @var{kill} determines how to |
| 2812 | are no other frames left, display some other buffer in @var{window}. | 2813 | proceed with the window. If @var{kill} is @code{nil}, the fate of the |
| 2814 | frame is determined by calling @code{frame-auto-hide-function} (see | ||
| 2815 | below) with that frame as sole argument. If @var{kill} is | ||
| 2816 | non-@code{nil}, the frame is deleted unconditionally. | ||
| 2813 | 2817 | ||
| 2814 | If @var{window} was reused for displaying its buffer, this command tries | 2818 | If @var{window} was reused for displaying its buffer, this command tries |
| 2815 | to display the buffer previously shown in it. It also tries to restore | 2819 | to display the buffer previously shown in it. It also tries to restore |
| @@ -2831,6 +2835,31 @@ stored in @var{window}'s @code{quit-restore} window parameter | |||
| 2831 | (@pxref{Window Parameters}) and resets that parameter to @code{nil} | 2835 | (@pxref{Window Parameters}) and resets that parameter to @code{nil} |
| 2832 | after it's done. | 2836 | after it's done. |
| 2833 | 2837 | ||
| 2838 | The following option specifies how to deal with a frame containing just | ||
| 2839 | one window that shall be either quit or whose buffer shall be buried. | ||
| 2840 | |||
| 2841 | @defopt frame-auto-hide-function | ||
| 2842 | The function specified by this option is called to automatically hide | ||
| 2843 | frames. This function is called with one argument - a frame. | ||
| 2844 | |||
| 2845 | The function specified here is called by @code{bury-buffer} (@pxref{The | ||
| 2846 | Buffer List}) when the selected window is dedicated and shows the buffer | ||
| 2847 | that shall be buried. It is also called by @code{quit-window} (see | ||
| 2848 | above) when the frame of the window that shall be quit has been | ||
| 2849 | specially created for displaying that window's buffer and the buffer | ||
| 2850 | shall be buried. | ||
| 2851 | |||
| 2852 | The default is to call @code{iconify-frame} (@pxref{Visibility of | ||
| 2853 | Frames}). Alternatively, you may either specify @code{delete-frame} | ||
| 2854 | (@pxref{Deleting Frames}) to remove the frame from its display, | ||
| 2855 | @code{ignore} to leave the frame unchanged, or any other function that | ||
| 2856 | can take a frame as its sole argument. | ||
| 2857 | |||
| 2858 | Note that the function specified by this option is called if and only if | ||
| 2859 | there's at least one other frame on the terminal of the frame it's | ||
| 2860 | supposed to handle and that frame contains only one live window. | ||
| 2861 | @end defopt | ||
| 2862 | |||
| 2834 | 2863 | ||
| 2835 | @node Window Point | 2864 | @node Window Point |
| 2836 | @section Windows and Point | 2865 | @section Windows and Point |