Correct and reword recent changes to window.texi.
[bpt/emacs.git] / doc / lispref / buffers.texi
index 6ad329f..6462788 100644 (file)
@@ -634,7 +634,8 @@ file should not be done.
 @c Emacs 19 feature
 @defun visited-file-modtime
 This function returns the current buffer's recorded last file
-modification time, as a list of the form @code{(@var{high} @var{low})}.
+modification time, as a list of the form @code{(@var{high} @var{low}
+@var{microsec} @var{picosec})}.
 (This is the same format that @code{file-attributes} uses to return
 time values; see @ref{File Attributes}.)
 
@@ -664,9 +665,8 @@ is not @code{nil}, and otherwise to the last modification time of the
 visited file.
 
 If @var{time} is neither @code{nil} nor zero, it should have the form
-@code{(@var{high} . @var{low})} or @code{(@var{high} @var{low})}, in
-either case containing two integers, each of which holds 16 bits of the
-time.
+@code{(@var{high} @var{low} @var{microsec} @var{picosec})},
+the format used by @code{current-time} (@pxref{Time of Day}).
 
 This function is useful if the buffer was not read from the file
 normally, or if the file itself has been changed for some known benign
@@ -740,31 +740,25 @@ properties have no effect.  If @code{inhibit-read-only} is a list, then
 of the list (comparison is done with @code{eq}).
 @end defvar
 
-@deffn Command toggle-read-only &optional arg message
-This command toggles whether the current buffer is read-only, by
-setting the variable @code{buffer-read-only}.  If @var{arg} is
-non-@code{nil}, it should be a raw prefix argument; the command then
-makes the buffer read-only if the numeric value of that prefix
-argument is positive, and makes the buffer writable otherwise.
-@xref{Prefix Command Arguments}.
-
-If called interactively, or if called from Lisp with @var{message} is
-non-@code{nil}, the command prints a message reporting the buffer's
-new read-only status.
-
-When making the buffer read-only, this command also enables View mode
+@deffn Command read-only-mode &optional arg
+This is the mode command for Read Only minor mode, a buffer-local
+minor mode.  When the mode is enabled, @code{buffer-read-only} is
+non-@code{nil} in the buffer; when disabled, @code{buffer-read-only}
+is @code{nil} in the buffer.  The calling convention is the same as
+for other minor mode commands (@pxref{Minor Mode Conventions}).
+
+This minor mode mainly serves as a wrapper for
+@code{buffer-read-only}; unlike most minor modes, there is no separate
+@code{read-only-mode} variable.  Even when Read Only mode is disabled,
+characters with non-@code{nil} @code{read-only} text properties remain
+read-only.  To temporarily ignore all read-only states, bind
+@code{inhibit-read-only}, as described above.
+
+When enabling Read Only mode, this mode command also enables View mode
 if the option @code{view-read-only} is non-@code{nil}.  @xref{Misc
 Buffer,,Miscellaneous Buffer Operations, emacs, The GNU Emacs Manual}.
-When making the buffer writable, it disables View mode if View mode
-was enabled.
-
-Lisp programs should only call @code{toggle-read-only} if they really
-intend to do the same thing as the user command, including possibly
-enabling or disabling View mode.  Note also that this command works by
-setting @code{buffer-read-only}, so even if you make the buffer
-writable, characters with non-@code{nil} @code{read-only} text
-properties will remain read-only.  To temporarily ignore all read-only
-states, bind @code{inhibit-read-only}, as described above.
+When disabling Read Only mode, it disables View mode if View mode was
+enabled.
 @end deffn
 
 @defun barf-if-buffer-read-only
@@ -892,7 +886,7 @@ 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.
 
-This functions operates on each frame's @code{buffer-list} parameter as
+This function 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
@@ -902,15 +896,15 @@ 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.
+another buffer is shown in it.  More precisely, if the selected window
+is dedicated (@pxref{Dedicated Windows}) and there are other windows on
+its frame, the window is deleted.  If it is the only window on its frame
+and that frame is not the only frame on its terminal, the frame is
+``dismissed'' by calling the function specified by
+@code{frame-auto-hide-function} (@pxref{Quitting Windows}).  Otherwise,
+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}.
@@ -1243,4 +1237,3 @@ This function returns the current gap position in the current buffer.
 @defun gap-size
 This function returns the current gap size of the current buffer.
 @end defun
-