]> code.delx.au - gnu-emacs/blobdiff - doc/lispref/buffers.texi
More doc for debug-on-event.
[gnu-emacs] / doc / lispref / buffers.texi
index ce1a8b0fb4eac861eb07fe67292ec479b15c681e..c2e792cd5859ffbd67e48ae1dde19760fe881996 100644 (file)
@@ -1,6 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990-1995, 1998-1999, 2001-2011
+@c Copyright (C) 1990-1995, 1998-1999, 2001-2012
 @c   Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../../info/buffers
@@ -748,10 +748,11 @@ of the list (comparison is done with @code{eq}).
 
 @deffn Command toggle-read-only &optional arg
 This command toggles whether the current buffer is read-only.  It is
-intended for interactive use; do not use it in programs.  At any given
-point in a program, you should know whether you want the read-only flag
-on or off; so you can set @code{buffer-read-only} explicitly to the
-proper value, @code{t} or @code{nil}.
+intended for interactive use; do not use it in programs (it may have
+side-effects, such as enabling View mode, and does not affect
+read-only text properties).  To change the read-only state of a buffer in
+a program, explicitly set @code{buffer-read-only} to the proper value.
+To temporarily ignore a read-only state, bind @code{inhibit-read-only}.
 
 If @var{arg} is non-@code{nil}, it should be a raw prefix argument.
 @code{toggle-read-only} sets @code{buffer-read-only} to @code{t} if
@@ -884,23 +885,28 @@ This buffer therefore becomes the least desirable candidate for
 @code{other-buffer} to return.  The argument can be either a buffer
 itself or the name of one.
 
-@code{bury-buffer} operates on each frame's @code{buffer-list} parameter
-as well as the fundamental buffer list; therefore, the buffer that you
-bury will come last in the value of @code{(buffer-list @var{frame})} and
-in the value of @code{(buffer-list)}.
-
-If @var{buffer-or-name} is @code{nil} or omitted, this means to bury
-the current buffer.  In addition, if the buffer is displayed in the
-selected window, this switches to some other buffer (obtained using
-@code{other-buffer}) in the selected window.  @xref{Switching
-Buffers}.  But if the selected window is dedicated to its buffer, it
-deletes that window if there are other windows left on its frame.
-Otherwise, if the selected window is the only window on its frame, it
-iconifies that frame.  If @var{buffer-or-name} is displayed in some
+This functions operates on each frame's @code{buffer-list} parameter as
+well as the fundamental buffer list; therefore, the buffer that you bury
+will come last in the value of @code{(buffer-list @var{frame})} and in
+the value of @code{(buffer-list)}.  In addition, it also puts the buffer
+at the end of the list of buffer of the selected window (@pxref{Window
+History}) provided it is shown in that window.
+
+If @var{buffer-or-name} is @code{nil} or omitted, this means to bury the
+current buffer.  In addition, if the current buffer is displayed in the
+selected window, this makes sure that the window is either deleted or
+another buffer is shown in it.  More precisely, if the window is
+dedicated (@pxref{Dedicated Windows}) and there are other windows on its
+frame, the window is deleted.  If the window is both dedicated and the
+only window on its frame's terminal, the function specified by
+@code{frame-auto-hide-function} (@pxref{Quitting Windows}) will deal
+with the window.  If the window is not dedicated to its buffer, it calls
+@code{switch-to-prev-buffer} (@pxref{Window History}) to show another
+buffer in that window.  If @var{buffer-or-name} is displayed in some
 other window, it remains displayed there.
 
 To replace a buffer in all the windows that display it, use
-@code{replace-buffer-in-windows} @xref{Buffers and Windows}.
+@code{replace-buffer-in-windows}, @xref{Buffers and Windows}.
 @end deffn
 
 @deffn Command unbury-buffer