summaryrefslogtreecommitdiff
path: root/doc/lispref/buffers.texi
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-05-10 03:38:01 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-05-10 03:46:43 +0200
commit0bee4cda881f7db4113cba541b684c334e828c4a (patch)
tree4873dc599fb34e07c5e967ea5d91cb867c151c1b /doc/lispref/buffers.texi
parent0b2f550e3229c7a1b001fb1a09e7a5b4e3ecfb3e (diff)
downloademacs-0bee4cda881f7db4113cba541b684c334e828c4a.tar.gz
Reimplement recent with-silent-modifications auto-save changes
* doc/lispref/buffers.texi (Buffer Modification): Document buffer-modified-p returning `autosaved'. * lisp/subr.el (with-silent-modifications): Use restore-buffer-modified-p instead of altering the buffer modiff (since this has other side effects like not updating after async `display' changes. * src/buffer.c (Fbuffer_modified_p): Allow returning whether the buffer has been autosaved after changes. (Frestore_buffer_modified_p): Allow adjusting whether the buffer has been autosaved after changes. * src/fileio.c (Fdo_auto_save): Refill the doc string.
Diffstat (limited to 'doc/lispref/buffers.texi')
-rw-r--r--doc/lispref/buffers.texi10
1 files changed, 6 insertions, 4 deletions
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi
index d8cf3d7919b..3e3b0bd9f01 100644
--- a/doc/lispref/buffers.texi
+++ b/doc/lispref/buffers.texi
@@ -541,10 +541,12 @@ file formerly visited.
@ref{Text}.
@defun buffer-modified-p &optional buffer
-This function returns @code{t} if the buffer @var{buffer} has been modified
-since it was last read in from a file or saved, or @code{nil}
-otherwise. If @var{buffer} is not supplied, the current buffer
-is tested.
+This function returns non-@code{nil} if the buffer @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.
@end defun
@defun set-buffer-modified-p flag