emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 68dd94448f: ; Fix recent documentation changes


From: Eli Zaretskii
Subject: master 68dd94448f: ; Fix recent documentation changes
Date: Tue, 10 May 2022 09:06:59 -0400 (EDT)

branch: master
commit 68dd94448f0b46cced59c7fe33f77f74ddf656ad
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    ; Fix recent documentation changes
    
    * src/fileio.c (Fdo_auto_save):
    * src/buffer.c (Fbuffer_modified_p, Frestore_buffer_modified_p):
    * doc/lispref/buffers.texi (Buffer Modification): Improve
    documentation of 'do-auto-save', 'buffer-modified-p' and
    'restore-buffer-modified-p'.
---
 doc/lispref/buffers.texi | 10 +++++-----
 src/buffer.c             | 10 +++++-----
 src/fileio.c             | 12 +++++++-----
 3 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi
index 8d1d9f5ddb..2e5771f347 100644
--- a/doc/lispref/buffers.texi
+++ b/doc/lispref/buffers.texi
@@ -541,12 +541,12 @@ file formerly visited.
 @ref{Text}.
 
 @defun buffer-modified-p &optional buffer
-This function returns non-@code{nil} if the buffer @var{buffer} has
+This function returns non-@code{nil} if @var{buffer} has
 been modified since it was last read in from a file or saved, or
-@code{nil} otherwise.  If @var{buffer} has been autosaved after
-@var{buffer} was last modified, the symbol @code{autosaved} is
-returned.  If @var{buffer} is not supplied, the current buffer is
-tested.
+@code{nil} otherwise.  If @var{buffer} has been auto-saved since the
+time it was last modified, this function returns the symbol
+@code{autosaved}.  If @var{buffer} is @code{nil} or omitted, it
+defaults to the current buffer.
 @end defun
 
 @defun set-buffer-modified-p flag
diff --git a/src/buffer.c b/src/buffer.c
index 0f3061b497..0af14a1060 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1379,8 +1379,8 @@ DEFUN ("buffer-modified-p", Fbuffer_modified_p, 
Sbuffer_modified_p,
        doc: /* Return non-nil if BUFFER was modified since its file was last 
read or saved.
 No argument or nil as argument means use current buffer as BUFFER.
 
-If BUFFER has been autosaved after BUFFER was last modified, the
-symbol `autosaved' is returned.  */)
+If BUFFER was autosaved since it was last modified, this function
+returns the symbol `autosaved'.  */)
   (Lisp_Object buffer)
 {
   struct buffer *buf = decode_buffer (buffer);
@@ -1448,9 +1448,9 @@ DEFUN ("restore-buffer-modified-p", 
Frestore_buffer_modified_p,
        Srestore_buffer_modified_p, 1, 1, 0,
        doc: /* Like `set-buffer-modified-p', but doesn't redisplay buffer's 
mode line.
 A nil FLAG means to mark the buffer as unmodified.  A non-nil FLAG
-means mark the buffer as modified, except the special value
-`autosaved', which will instead mark the buffer as having been
-autosaved.
+means mark the buffer as modified, but the special value
+`autosaved' will instead mark the buffer as having been
+autosaved since it was last modified.
 
 This function also locks or unlocks the file visited by the buffer,
 if both `buffer-file-truename' and `buffer-file-name' are non-nil.
diff --git a/src/fileio.c b/src/fileio.c
index 9da14c8f54..094516bfef 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -5972,13 +5972,15 @@ do_auto_save_eh (Lisp_Object ignore)
 
 DEFUN ("do-auto-save", Fdo_auto_save, Sdo_auto_save, 0, 2, "",
        doc: /* Auto-save all buffers that need it.
-This is all buffers that have auto-saving enabled and are changed
-since last auto-saved.
+This auto-saves all buffers that have auto-saving enabled and
+were changed since last auto-saved.
 
-Auto-saving writes the buffer into a file so that your editing is not
-lost if the system crashes.
+Auto-saving writes the buffer into a file so that your edits are
+not lost if the system crashes.
+
+The auto-save file is not the file you visited; that changes only
+when you save.
 
-This file is not the file you visited; that changes only when you save.
 Normally, run the normal hook `auto-save-hook' before saving.
 
 A non-nil NO-MESSAGE argument means do not print any message if successful.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]