aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorLars Ingebrigtsen2022-05-12 02:16:38 +0200
committerLars Ingebrigtsen2022-05-12 02:16:38 +0200
commit1642a5ffcdf734c629e5aec963a0b190997704d6 (patch)
treecbcd00919ab5f0c0d65ea6cd08fd77b3cf61414a /src/buffer.c
parentdce85743b6856132a64709cd191951f9d190ce6e (diff)
downloademacs-1642a5ffcdf734c629e5aec963a0b190997704d6.tar.gz
emacs-1642a5ffcdf734c629e5aec963a0b190997704d6.zip
Adjust restore-buffer-modified-p autosaved logic
* doc/lispref/buffers.texi (Buffer Modification): Adjust documentation. * src/buffer.c (Frestore_buffer_modified_p): Fix up the logic around `autosaved': It means "the buffer is modified, and also autosaved".
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 0af14a10609..89b04a42801 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1448,9 +1448,9 @@ DEFUN ("restore-buffer-modified-p", Frestore_buffer_modified_p,
1448 Srestore_buffer_modified_p, 1, 1, 0, 1448 Srestore_buffer_modified_p, 1, 1, 0,
1449 doc: /* Like `set-buffer-modified-p', but doesn't redisplay buffer's mode line. 1449 doc: /* Like `set-buffer-modified-p', but doesn't redisplay buffer's mode line.
1450A nil FLAG means to mark the buffer as unmodified. A non-nil FLAG 1450A nil FLAG means to mark the buffer as unmodified. A non-nil FLAG
1451means mark the buffer as modified, but the special value 1451means mark the buffer as modified. A special value of `autosaved'
1452`autosaved' will instead mark the buffer as having been 1452will mark the buffer modified, and also as having been autosaved since
1453autosaved since it was last modified. 1453it was last modified.
1454 1454
1455This function also locks or unlocks the file visited by the buffer, 1455This function also locks or unlocks the file visited by the buffer,
1456if both `buffer-file-truename' and `buffer-file-name' are non-nil. 1456if both `buffer-file-truename' and `buffer-file-name' are non-nil.
@@ -1496,13 +1496,13 @@ state of the current buffer. Use with care. */)
1496 SAVE_MODIFF = MODIFF; 1496 SAVE_MODIFF = MODIFF;
1497 else 1497 else
1498 { 1498 {
1499 if (EQ (flag, Qautosaved))
1500 BUF_AUTOSAVE_MODIFF (b) = MODIFF;
1501 /* If SAVE_MODIFF == auto_save_modified == MODIFF, we can either 1499 /* If SAVE_MODIFF == auto_save_modified == MODIFF, we can either
1502 decrease SAVE_MODIFF and auto_save_modified or increase 1500 decrease SAVE_MODIFF and auto_save_modified or increase
1503 MODIFF. */ 1501 MODIFF. */
1504 else if (SAVE_MODIFF >= MODIFF) 1502 if (SAVE_MODIFF >= MODIFF)
1505 SAVE_MODIFF = modiff_incr (&MODIFF); 1503 SAVE_MODIFF = modiff_incr (&MODIFF);
1504 if (EQ (flag, Qautosaved))
1505 BUF_AUTOSAVE_MODIFF (b) = MODIFF;
1506 } 1506 }
1507 return flag; 1507 return flag;
1508} 1508}