Subject: Re: bug#21612: 24.5; Configuration variable to delete auto-save file when intentionally killing buffer

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 18 Aug 2021 16:31:49 +0200

Eli Zaretskii <[email-masked]> writes:

> But that would exactly do what I asked not to do, and you agreed: ask
> that question by default.  Because the default value of the variable
> is non-nil...

Oh yeah, I'd forgotten that it was t by default.

Hm...  

  /* Delete any auto-save file, if we saved it in this session.
     But not if the buffer is modified.  */
  if (STRINGP (BVAR (b, auto_save_file_name))
      && BUF_AUTOSAVE_MODIFF (b) != 0
      && BUF_SAVE_MODIFF (b) < BUF_AUTOSAVE_MODIFF (b)
      && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b)
      && NILP (Fsymbol_value (intern ("auto-save-visited-file-name"))))
    {
      Lisp_Object delete;
      delete = Fsymbol_value (intern ("delete-auto-save-files"));
      if (! NILP (delete))
	internal_delete_file (BVAR (b, auto_save_file_name));
    }

Actually, I'm not sure that my first reading of this code was correct.
Will this code ever trigger a file deletion?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no