Index: emacs/src/fileio.c diff -c emacs/src/fileio.c:1.550 emacs/src/fileio.c:1.551 *** emacs/src/fileio.c:1.550 Mon Jul 4 16:06:30 2005 --- emacs/src/fileio.c Wed Jul 20 14:39:35 2005 *************** *** 5818,5830 **** } static Lisp_Object ! do_auto_save_unwind (stream) /* used as unwind-protect function */ ! Lisp_Object stream; { auto_saving = 0; ! if (!NILP (stream)) ! fclose ((FILE *) (XFASTINT (XCAR (stream)) << 16 ! | XFASTINT (XCDR (stream)))); return Qnil; } --- 5818,5830 ---- } static Lisp_Object ! do_auto_save_unwind (arg) /* used as unwind-protect function */ ! Lisp_Object arg; { + FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer; auto_saving = 0; ! if (stream != NULL) ! fclose (stream); return Qnil; } *************** *** 5869,5876 **** int auto_saved = 0; int do_handled_files; Lisp_Object oquit; ! FILE *stream; ! Lisp_Object lispstream; int count = SPECPDL_INDEX (); int orig_minibuffer_auto_raise = minibuffer_auto_raise; int old_message_p = 0; --- 5869,5875 ---- int auto_saved = 0; int do_handled_files; Lisp_Object oquit; ! FILE *stream = NULL; int count = SPECPDL_INDEX (); int orig_minibuffer_auto_raise = minibuffer_auto_raise; int old_message_p = 0; *************** *** 5922,5945 **** } stream = fopen (SDATA (listfile), "w"); - if (stream != NULL) - { - /* Arrange to close that file whether or not we get an error. - Also reset auto_saving to 0. */ - lispstream = Fcons (Qnil, Qnil); - XSETCARFASTINT (lispstream, (EMACS_UINT)stream >> 16); - XSETCDRFASTINT (lispstream, (EMACS_UINT)stream & 0xffff); - } - else - lispstream = Qnil; - } - else - { - stream = NULL; - lispstream = Qnil; } ! record_unwind_protect (do_auto_save_unwind, lispstream); record_unwind_protect (do_auto_save_unwind_1, make_number (minibuffer_auto_raise)); minibuffer_auto_raise = 0; --- 5921,5930 ---- } stream = fopen (SDATA (listfile), "w"); } ! record_unwind_protect (do_auto_save_unwind, ! make_save_value (stream, 0)); record_unwind_protect (do_auto_save_unwind_1, make_number (minibuffer_auto_raise)); minibuffer_auto_raise = 0;
_______________________________________________ Emacs-diffs mailing list Emacs-diffs@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-diffs