/[emacs]/emacs/src/fileio.c
ViewVC logotype

Diff of /emacs/src/fileio.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.460 by eliz, Mon Aug 19 17:23:43 2002 UTC revision 1.461 by rms, Wed Sep 11 02:03:24 2002 UTC
# Line 5566  do_auto_save_unwind (stream)  /* used as Line 5566  do_auto_save_unwind (stream)  /* used as
5566    if (!NILP (stream))    if (!NILP (stream))
5567      fclose ((FILE *) (XFASTINT (XCAR (stream)) << 16      fclose ((FILE *) (XFASTINT (XCAR (stream)) << 16
5568                        | XFASTINT (XCDR (stream))));                        | XFASTINT (XCDR (stream))));
   pop_message ();  
5569    return Qnil;    return Qnil;
5570  }  }
5571    
# Line 5578  do_auto_save_unwind_1 (value)  /* used a Line 5577  do_auto_save_unwind_1 (value)  /* used a
5577    return Qnil;    return Qnil;
5578  }  }
5579    
5580    static Lisp_Object
5581    do_auto_save_make_dir (dir)
5582         Lisp_Object dir;
5583    {
5584      return call2 (Qmake_directory, dir, Qt);
5585    }
5586    
5587    static Lisp_Object
5588    do_auto_save_eh (ignore)
5589         Lisp_Object ignore;
5590    {
5591      return Qnil;
5592    }
5593    
5594  DEFUN ("do-auto-save", Fdo_auto_save, Sdo_auto_save, 0, 2, "",  DEFUN ("do-auto-save", Fdo_auto_save, Sdo_auto_save, 0, 2, "",
5595         doc: /* Auto-save all buffers that need it.         doc: /* Auto-save all buffers that need it.
5596  This is all buffers that have auto-saving enabled  This is all buffers that have auto-saving enabled
# Line 5601  A non-nil CURRENT-ONLY argument means sa Line 5614  A non-nil CURRENT-ONLY argument means sa
5614    Lisp_Object lispstream;    Lisp_Object lispstream;
5615    int count = SPECPDL_INDEX ();    int count = SPECPDL_INDEX ();
5616    int orig_minibuffer_auto_raise = minibuffer_auto_raise;    int orig_minibuffer_auto_raise = minibuffer_auto_raise;
5617    int message_p = 0;    int old_message_p = 0;
5618    
5619    if (max_specpdl_size < specpdl_size + 40)    if (max_specpdl_size < specpdl_size + 40)
5620      max_specpdl_size = specpdl_size + 40;      max_specpdl_size = specpdl_size + 40;
# Line 5609  A non-nil CURRENT-ONLY argument means sa Line 5622  A non-nil CURRENT-ONLY argument means sa
5622    if (minibuf_level)    if (minibuf_level)
5623      no_message = Qt;      no_message = Qt;
5624    
5625    if (NILP (no_message));    if (NILP (no_message))
5626      message_p = push_message ();      {
5627          old_message_p = push_message ();
5628          record_unwind_protect (pop_message_unwind, Qnil);
5629        }
5630        
5631    /* Ordinarily don't quit within this function,    /* Ordinarily don't quit within this function,
5632       but don't make it impossible to quit (in case we get hung in I/O).  */       but don't make it impossible to quit (in case we get hung in I/O).  */
# Line 5637  A non-nil CURRENT-ONLY argument means sa Line 5653  A non-nil CURRENT-ONLY argument means sa
5653            Lisp_Object dir;            Lisp_Object dir;
5654            dir = Ffile_name_directory (listfile);            dir = Ffile_name_directory (listfile);
5655            if (NILP (Ffile_directory_p (dir)))            if (NILP (Ffile_directory_p (dir)))
5656              call2 (Qmake_directory, dir, Qt);              internal_condition_case_1 (do_auto_save_make_dir,
5657                                           dir, Fcons (Fcons (Qfile_error, Qnil), Qnil),
5658                                           do_auto_save_eh);
5659          }          }
5660                
5661        stream = fopen (SDATA (listfile), "w");        stream = fopen (SDATA (listfile), "w");
# Line 5765  A non-nil CURRENT-ONLY argument means sa Line 5783  A non-nil CURRENT-ONLY argument means sa
5783    
5784    if (auto_saved && NILP (no_message))    if (auto_saved && NILP (no_message))
5785      {      {
5786        if (message_p)        if (old_message_p)
5787          {          {
5788              /* If we are going to restore an old message,
5789                 give time to read ours.  */
5790            sit_for (1, 0, 0, 0, 0);            sit_for (1, 0, 0, 0, 0);
5791            restore_message ();            restore_message ();
5792          }          }
5793        else        else
5794            /* If we displayed a message and then restored a state
5795               with no message, leave a "done" message on the screen.  */
5796          message1 ("Auto-saving...done");          message1 ("Auto-saving...done");
5797      }      }
5798    
5799    Vquit_flag = oquit;    Vquit_flag = oquit;
5800    
5801      /* This restores the message-stack status.  */
5802    unbind_to (count, Qnil);    unbind_to (count, Qnil);
5803    return Qnil;    return Qnil;
5804  }  }

Legend:
Removed from v.1.460  
changed lines
  Added in v.1.461

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26