bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21612: 24.5; Configuration variable to delete auto-save file when in


From: Lars Ingebrigtsen
Subject: bug#21612: 24.5; Configuration variable to delete auto-save file when intentionally killing buffer
Date: Wed, 18 Aug 2021 16:31:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]