buffer-saved-size

buffer-saved-size is a variable defined in `C source code'.
Its value is
0

global value is the same.
  • Automatically becomes permanently buffer-local when set.

Documentation:
Length of current buffer when last read in, saved or auto-saved.
0 initially.
-1 means auto-saving turned off until next real save.

If you set this to -2, that means don't turn off auto-saving in this buffer
if its text size shrinks. If you use `buffer-swap-text' on a buffer,
you probably should set this to -2 in that buffer.