aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMartin Rudalics2011-10-09 14:26:29 +0200
committerMartin Rudalics2011-10-09 14:26:29 +0200
commitd83dc65b3f42fae9b2085b9a1ca986c401d49f8d (patch)
tree403ebf31f85d2ecab263f4ad79004de19a92dad3 /doc
parent56f2d1e18338b7096d6b7f85cc11d3bf598ab394 (diff)
downloademacs-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/ChangeLog9
-rw-r--r--doc/lispref/buffers.texi33
-rw-r--r--doc/lispref/windows.texi67
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 @@
12011-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
12011-10-08 Glenn Morris <rgm@gnu.org> 102011-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
885itself or the name of one. 885itself or the name of one.
886 886
887@code{bury-buffer} operates on each frame's @code{buffer-list} parameter 887This functions operates on each frame's @code{buffer-list} parameter as
888as well as the fundamental buffer list; therefore, the buffer that you 888well as the fundamental buffer list; therefore, the buffer that you bury
889bury will come last in the value of @code{(buffer-list @var{frame})} and 889will come last in the value of @code{(buffer-list @var{frame})} and in
890in the value of @code{(buffer-list)}. 890the value of @code{(buffer-list)}. In addition, it also puts the buffer
891 891at the end of the list of buffer of the selected window (@pxref{Window
892If @var{buffer-or-name} is @code{nil} or omitted, this means to bury 892History}) provided it is shown in that window.
893the current buffer. In addition, if the buffer is displayed in the 893
894selected window, this switches to some other buffer (obtained using 894If @var{buffer-or-name} is @code{nil} or omitted, this means to bury the
895@code{other-buffer}) in the selected window. @xref{Switching 895current buffer. In addition, if the current buffer is displayed in the
896Buffers}. But if the selected window is dedicated to its buffer, it 896selected window, this makes sure that the window is either deleted or
897deletes that window if there are other windows left on its frame. 897another buffer is shown in it. More precisely, if the window is
898Otherwise, if the selected window is the only window on its frame, it 898dedicated (@pxref{Dedicated Windows}) and there are other windows on its
899iconifies that frame. If @var{buffer-or-name} is displayed in some 899frame, the window is deleted. If the window is both dedicated and the
900only window on its frame's terminal, the function specified by
901@code{frame-auto-hide-function} (@pxref{Quitting Windows}) will deal
902with 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
904buffer in that window. If @var{buffer-or-name} is displayed in some
900other window, it remains displayed there. 905other window, it remains displayed there.
901 906
902To replace a buffer in all the windows that display it, use 907To 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
2076all windows displaying it. For each such window, it choose another 2076all windows displaying it. For each such window, it choose another
2077buffer using @code{switch-to-prev-buffer} (@pxref{Window History}). 2077buffer 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 2079The argument @var{buffer-or-name} may be a buffer, or the name of an
2080buffer; it defaults to the current buffer. 2080existing buffer; it defaults to the current buffer.
2081 2081
2082If a window displaying @var{buffer-or-name} is dedicated 2082If 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,
2084is not the only window on its frame, that window is deleted. If that 2084that window is deleted. If that window is the only window on its frame
2085window is the only window on its frame and there are other frames on the 2085and there are other frames on the frame's terminal, that frame is dealt
2086frame's terminal, that frame is deleted too; otherwise, the buffer 2086with by the function spcecified by @code{frame-auto-hide-function}
2087provided by the function @code{switch-to-prev-buffer} (@pxref{Window 2087(@pxref{Quitting Windows}). Otherwise, the buffer provided by the
2088History}) is displayed instead. 2088function @code{switch-to-prev-buffer} (@pxref{Window History}) is
2089displayed 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
2786When you want to get rid of a window used for displaying a buffer you 2787When you want to get rid of a window used for displaying a buffer you
2787can use the function @code{delete-window} (@pxref{Deleting Windows}) to 2788can call @code{delete-window} or @code{delete-windows-on}
2788remove 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
2789separate frame, you might want to call @code{delete-frame} 2790buffer 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
2791been reused for displaying the buffer, you might prefer showing the 2792hand, a window has been reused for displaying the buffer, you might
2792buffer previously shown in that window by calling the function 2793prefer showing the buffer previously shown in that window by calling the
2793@code{switch-to-prev-buffer} (@pxref{Window History}). Finally, you 2794function @code{switch-to-prev-buffer} (@pxref{Window History}).
2794might want to either bury (@pxref{The Buffer List}) or kill 2795Finally, 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.
2807Quitting @var{window} means to proceed as follows: If @var{window} was 2808Quitting @var{window} means to proceed as follows: If @var{window} was
2808created specially for displaying its current buffer, delete @var{window} 2809created specially for displaying its current buffer, delete @var{window}
2809provided its frame contains at least one other live window. If 2810provided 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
2811exist, delete the frame together with @var{window}. If, however, there 2812on the frame's terminal, the value of @var{kill} determines how to
2812are no other frames left, display some other buffer in @var{window}. 2813proceed with the window. If @var{kill} is @code{nil}, the fate of the
2814frame is determined by calling @code{frame-auto-hide-function} (see
2815below) with that frame as sole argument. If @var{kill} is
2816non-@code{nil}, the frame is deleted unconditionally.
2813 2817
2814If @var{window} was reused for displaying its buffer, this command tries 2818If @var{window} was reused for displaying its buffer, this command tries
2815to display the buffer previously shown in it. It also tries to restore 2819to 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}
2832after it's done. 2836after it's done.
2833 2837
2838The following option specifies how to deal with a frame containing just
2839one window that shall be either quit or whose buffer shall be buried.
2840
2841@defopt frame-auto-hide-function
2842The function specified by this option is called to automatically hide
2843frames. This function is called with one argument - a frame.
2844
2845The function specified here is called by @code{bury-buffer} (@pxref{The
2846Buffer List}) when the selected window is dedicated and shows the buffer
2847that shall be buried. It is also called by @code{quit-window} (see
2848above) when the frame of the window that shall be quit has been
2849specially created for displaying that window's buffer and the buffer
2850shall be buried.
2851
2852The default is to call @code{iconify-frame} (@pxref{Visibility of
2853Frames}). 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
2856can take a frame as its sole argument.
2857
2858Note that the function specified by this option is called if and only if
2859there's at least one other frame on the terminal of the frame it's
2860supposed 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