comparison src/fileio.c @ 112291:d10e4c917525

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