summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-05-10 03:46:34 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-05-10 03:46:43 +0200
commit54ab2b36740166d379c713e843870310f1ccf7a1 (patch)
treede18d08b7a4723d33ec5e7058a5430ad5d6a4852
parent0bee4cda881f7db4113cba541b684c334e828c4a (diff)
downloademacs-54ab2b36740166d379c713e843870310f1ccf7a1.tar.gz
Add NEWS entries for recent autosaved buffer modification status
* doc/lispref/buffers.texi (Buffer Modification): Note 'autosaved' value.
-rw-r--r--doc/lispref/buffers.texi4
-rw-r--r--etc/NEWS20
2 files changed, 19 insertions, 5 deletions
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi
index 3e3b0bd9f01..8d1d9f5ddb2 100644
--- a/doc/lispref/buffers.texi
+++ b/doc/lispref/buffers.texi
@@ -566,7 +566,9 @@ function @code{force-mode-line-update} works by doing this:
@defun restore-buffer-modified-p flag
Like @code{set-buffer-modified-p}, but does not force redisplay
-of mode lines.
+of mode lines. This function also allows a @var{flag} value of
+@code{autosaved}, which marks the buffer as having been autosaved
+after the last modification.
@end defun
@deffn Command not-modified &optional arg
diff --git a/etc/NEWS b/etc/NEWS
index 5cdc9a4b3ee..8306136e5dd 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1564,14 +1564,21 @@ Emacs buffers, like indentation and the like. The new ert function
* Incompatible Lisp Changes in Emacs 29.1
++++
+** 'buffer-modified-p' has been extended.
+This function was previously documented to return only nil or t. This
+has been changed to nil/'autosaved'/non-nil. The new 'autosaved'
+value means that the buffer is modified, but that it hasn't been
+modified after the last auto-save.
+
---
-** 'with-silent-modifications' also restores buffer modification ticks.
+** 'with-silent-modifications' also restores buffer autosave status.
'with-silent-modifications' is a macro meant to be used by the font
locking machinery to allow applying text properties without changing
the modification status of the buffer. However, it didn't restore the
-buffer modification ticks, so applying font locking to a modified
-buffer that had already been auto-saved would trigger another
-auto-saving. This is no longer the case.
+buffer autosave status, so applying font locking to a modified buffer
+that had already been auto-saved would trigger another auto-saving.
+This is no longer the case.
---
** 'prin1' doesn't always escape "." and "?" in symbols any more.
@@ -1709,6 +1716,11 @@ functions.
* Lisp Changes in Emacs 29.1
++++
+*** 'restore-buffer-modified-p' can now alter buffer auto-save state.
+With a FLAG value of 'autosaved', it will mark the buffer as having
+been auto-saved after the last modification.
+
---
*** New minor mode 'isearch-fold-quotes-mode'.
This sets up 'search-default-mode' so that quote characters are