[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: auto-save-visited-file-name
From: |
Richard Stallman |
Subject: |
Re: auto-save-visited-file-name |
Date: |
Fri, 17 Oct 2003 16:46:22 -0400 |
Does this solve the problems you found with auto-save-visited-file-name?
*** buffer.c.~1.438.~ Thu Sep 11 09:51:05 2003
--- buffer.c Fri Oct 17 11:37:36 2003
***************
*** 1429,1435 ****
if (STRINGP (b->auto_save_file_name)
&& b->auto_save_modified != 0
&& BUF_SAVE_MODIFF (b) < b->auto_save_modified
! && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b))
{
Lisp_Object tem;
tem = Fsymbol_value (intern ("delete-auto-save-files"));
--- 1429,1436 ----
if (STRINGP (b->auto_save_file_name)
&& b->auto_save_modified != 0
&& BUF_SAVE_MODIFF (b) < b->auto_save_modified
! && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b)
! && NILP (Fsymbol_value (intern ("auto-save-visited-file-name"))))
{
Lisp_Object tem;
tem = Fsymbol_value (intern ("delete-auto-save-files"));
*** fileio.c.~1.494.~ Thu Sep 11 09:51:19 2003
--- fileio.c Fri Oct 17 11:35:48 2003
***************
*** 4684,4690 ****
{
Lisp_Object val;
! if (auto_saving)
{
/* We use emacs-mule for auto saving... */
setup_coding_system (Qemacs_mule, coding);
--- 4684,4691 ----
{
Lisp_Object val;
! if (auto_saving
! && ! NILP (Fsymbol_value (intern ("auto-save-visited-file-name"))))
{
/* We use emacs-mule for auto saving... */
setup_coding_system (Qemacs_mule, coding);
***************
*** 5212,5218 ****
error ("IO error writing %s: %s", SDATA (filename),
emacs_strerror (save_errno));
! if (visiting)
{
SAVE_MODIFF = MODIFF;
XSETFASTINT (current_buffer->save_length, Z - BEG);
--- 5213,5222 ----
error ("IO error writing %s: %s", SDATA (filename),
emacs_strerror (save_errno));
! if (visiting
! || (auto_saving
! && ! NILP (Fsymbol_value (intern ("auto-save-visited-file-name")))))
!
{
SAVE_MODIFF = MODIFF;
XSETFASTINT (current_buffer->save_length, Z - BEG);
***************
*** 5775,5785 ****
minibuffer_auto_raise = 0;
auto_saving = 1;
! /* First, save all files which don't have handlers. If Emacs is
! crashing, the handlers may tweak what is causing Emacs to crash
! in the first place, and it would be a shame if Emacs failed to
! autosave perfectly ordinary files because it couldn't handle some
! ange-ftp'd file. */
for (do_handled_files = 0; do_handled_files < 2; do_handled_files++)
for (tail = Vbuffer_alist; GC_CONSP (tail); tail = XCDR (tail))
{
--- 5779,5792 ----
minibuffer_auto_raise = 0;
auto_saving = 1;
! /* On first pass, save all files that don't have handlers.
! On second pass, save all files that do have handlers.
!
! If Emacs is crashing, the handlers may tweak what is causing
! Emacs to crash in the first place, and it would be a shame if
! Emacs failed to autosave perfectly ordinary files because it
! couldn't handle some ange-ftp'd file. */
!
for (do_handled_files = 0; do_handled_files < 2; do_handled_files++)
for (tail = Vbuffer_alist; GC_CONSP (tail); tail = XCDR (tail))
{