[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/fileio.c
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/src/fileio.c |
Date: |
Tue, 10 Sep 2002 22:03:24 -0400 |
Index: emacs/src/fileio.c
diff -c emacs/src/fileio.c:1.460 emacs/src/fileio.c:1.461
*** emacs/src/fileio.c:1.460 Mon Aug 19 13:23:43 2002
--- emacs/src/fileio.c Tue Sep 10 22:03:24 2002
***************
*** 5566,5572 ****
if (!NILP (stream))
fclose ((FILE *) (XFASTINT (XCAR (stream)) << 16
| XFASTINT (XCDR (stream))));
- pop_message ();
return Qnil;
}
--- 5566,5571 ----
***************
*** 5578,5583 ****
--- 5577,5596 ----
return Qnil;
}
+ static Lisp_Object
+ do_auto_save_make_dir (dir)
+ Lisp_Object dir;
+ {
+ return call2 (Qmake_directory, dir, Qt);
+ }
+
+ static Lisp_Object
+ do_auto_save_eh (ignore)
+ Lisp_Object ignore;
+ {
+ return Qnil;
+ }
+
DEFUN ("do-auto-save", Fdo_auto_save, Sdo_auto_save, 0, 2, "",
doc: /* Auto-save all buffers that need it.
This is all buffers that have auto-saving enabled
***************
*** 5601,5607 ****
Lisp_Object lispstream;
int count = SPECPDL_INDEX ();
int orig_minibuffer_auto_raise = minibuffer_auto_raise;
! int message_p = 0;
if (max_specpdl_size < specpdl_size + 40)
max_specpdl_size = specpdl_size + 40;
--- 5614,5620 ----
Lisp_Object lispstream;
int count = SPECPDL_INDEX ();
int orig_minibuffer_auto_raise = minibuffer_auto_raise;
! int old_message_p = 0;
if (max_specpdl_size < specpdl_size + 40)
max_specpdl_size = specpdl_size + 40;
***************
*** 5609,5616 ****
if (minibuf_level)
no_message = Qt;
! if (NILP (no_message));
! message_p = push_message ();
/* Ordinarily don't quit within this function,
but don't make it impossible to quit (in case we get hung in I/O). */
--- 5622,5632 ----
if (minibuf_level)
no_message = Qt;
! if (NILP (no_message))
! {
! old_message_p = push_message ();
! record_unwind_protect (pop_message_unwind, Qnil);
! }
/* Ordinarily don't quit within this function,
but don't make it impossible to quit (in case we get hung in I/O). */
***************
*** 5637,5643 ****
Lisp_Object dir;
dir = Ffile_name_directory (listfile);
if (NILP (Ffile_directory_p (dir)))
! call2 (Qmake_directory, dir, Qt);
}
stream = fopen (SDATA (listfile), "w");
--- 5653,5661 ----
Lisp_Object dir;
dir = Ffile_name_directory (listfile);
if (NILP (Ffile_directory_p (dir)))
! internal_condition_case_1 (do_auto_save_make_dir,
! dir, Fcons (Fcons (Qfile_error, Qnil),
Qnil),
! do_auto_save_eh);
}
stream = fopen (SDATA (listfile), "w");
***************
*** 5765,5781 ****
if (auto_saved && NILP (no_message))
{
! if (message_p)
{
sit_for (1, 0, 0, 0, 0);
restore_message ();
}
else
message1 ("Auto-saving...done");
}
Vquit_flag = oquit;
unbind_to (count, Qnil);
return Qnil;
}
--- 5783,5804 ----
if (auto_saved && NILP (no_message))
{
! if (old_message_p)
{
+ /* If we are going to restore an old message,
+ give time to read ours. */
sit_for (1, 0, 0, 0, 0);
restore_message ();
}
else
+ /* If we displayed a message and then restored a state
+ with no message, leave a "done" message on the screen. */
message1 ("Auto-saving...done");
}
Vquit_flag = oquit;
+ /* This restores the message-stack status. */
unbind_to (count, Qnil);
return Qnil;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/src/fileio.c,
Richard M. Stallman <=