> Date: Fri, 30 Dec 2005 17:04:39 +0100 > From: Sven Joachim <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > CC: emacs-pretest-bug@gnu.org > Subject: Re: Quitting `save-buffer' loses backup file > > I wrote: > > > Here is a summary of what Emacs does in the scenario: > > > > (a) Before saving bar, Emacs renames bar to bar~, overwriting the old > > backup in the process, and sets `buffer-backed-up' to t. This is > > documented in the manual. > > > > (b) Emacs tries to save bar but fails to do so, because the user quits. > > To reduce harm, Emacs renames bar~ back to bar. But -- and this is > > probably wrong -- Emacs does not set `buffer-backed-up' back to nil. > > Actually, (b) is coded and documented in the function > basic-save-buffer-2, near the end: > > ,---- > | ;; If we get an error writing the new file, and we made > | ;; the backup by renaming, undo the backing-up. > | (and setmodes (not success) > | (rename-file (cdr setmodes) buffer-file-name)))))) > `---- > > What do you think of the following patch which sets `buffer-backed-up' > back to nil here?
Thanks, I installed the second variant of your patch. _______________________________________________ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug