[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 54ab2b3674 3/3: Add NEWS entries for recent autosaved buffer modi
From: |
Lars Ingebrigtsen |
Subject: |
master 54ab2b3674 3/3: Add NEWS entries for recent autosaved buffer modification status |
Date: |
Mon, 9 May 2022 21:46:50 -0400 (EDT) |
branch: master
commit 54ab2b36740166d379c713e843870310f1ccf7a1
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Add NEWS entries for recent autosaved buffer modification status
* doc/lispref/buffers.texi (Buffer Modification): Note 'autosaved'
value.
---
doc/lispref/buffers.texi | 4 +++-
etc/NEWS | 20 ++++++++++++++++----
2 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi
index 3e3b0bd9f0..8d1d9f5ddb 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 5cdc9a4b3e..8306136e5d 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