comparison src/fileio.c @ 112332:28ca83ef1128

Merge from mainline.
author Paul Eggert <eggert@cs.ucla.edu>
date Mon, 17 Jan 2011 11:24:36 -0800
parents 56d3e9c28eb0 d10e4c917525
children 42e22c4f06b7
comparison
equal deleted inserted replaced
112331:f6578f2bd119 112332:28ca83ef1128
735 /* The error here is dubious, but there is little else we 735 /* The error here is dubious, but there is little else we
736 can do. The alternatives are to return nil, which is 736 can do. The alternatives are to return nil, which is
737 as bad as (and in many cases worse than) throwing the 737 as bad as (and in many cases worse than) throwing the
738 error, or to ignore the error, which will likely result 738 error, or to ignore the error, which will likely result
739 in looping through 225307 stat's, which is not only 739 in looping through 225307 stat's, which is not only
740 dog-slow, but also useless since it will fallback to 740 dog-slow, but also useless since eventually nil would
741 the errow below, anyway. */ 741 have to be returned anyway. */
742 report_file_error ("Cannot create temporary name for prefix", 742 report_file_error ("Cannot create temporary name for prefix",
743 Fcons (prefix, Qnil)); 743 Fcons (prefix, Qnil));
744 /* not reached */ 744 /* not reached */
745 } 745 }
746 } 746 }
747
748 error ("Cannot create temporary name for prefix `%s'",
749 SDATA (prefix));
750 return Qnil;
751 } 747 }
752 748
753 749
754 DEFUN ("make-temp-name", Fmake_temp_name, Smake_temp_name, 1, 1, 0, 750 DEFUN ("make-temp-name", Fmake_temp_name, Smake_temp_name, 1, 1, 0,
755 doc: /* Generate temporary file name (string) starting with PREFIX (a string). 751 doc: /* Generate temporary file name (string) starting with PREFIX (a string).
5227 Qnil, Qnil); 5223 Qnil, Qnil);
5228 } 5224 }
5229 5225
5230 static Lisp_Object 5226 static Lisp_Object
5231 do_auto_save_unwind (Lisp_Object arg) /* used as unwind-protect function */ 5227 do_auto_save_unwind (Lisp_Object arg) /* used as unwind-protect function */
5232 5228
5233 { 5229 {
5234 FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer; 5230 FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer;
5235 auto_saving = 0; 5231 auto_saving = 0;
5236 if (stream != NULL) 5232 if (stream != NULL)
5237 { 5233 {
5242 return Qnil; 5238 return Qnil;
5243 } 5239 }
5244 5240
5245 static Lisp_Object 5241 static Lisp_Object
5246 do_auto_save_unwind_1 (Lisp_Object value) /* used as unwind-protect function */ 5242 do_auto_save_unwind_1 (Lisp_Object value) /* used as unwind-protect function */
5247 5243
5248 { 5244 {
5249 minibuffer_auto_raise = XINT (value); 5245 minibuffer_auto_raise = XINT (value);
5250 return Qnil; 5246 return Qnil;
5251 } 5247 }
5252 5248
5868 5864
5869 #ifdef HAVE_SYNC 5865 #ifdef HAVE_SYNC
5870 defsubr (&Sunix_sync); 5866 defsubr (&Sunix_sync);
5871 #endif 5867 #endif
5872 } 5868 }
5873