src/Pure/Thy/present.ML
changeset 45867 6f27ecf2a951
parent 45296 a3b5fdfb04a3
child 49460 cb4136e4cabf
equal deleted inserted replaced
45866:272e8e4e4fc7 45867:6f27ecf2a951
   497     fun prep_draft path i =
   497     fun prep_draft path i =
   498       let
   498       let
   499         val base = Path.base path;
   499         val base = Path.base path;
   500         val name =
   500         val name =
   501           (case Path.implode (#1 (Path.split_ext base)) of
   501           (case Path.implode (#1 (Path.split_ext base)) of
   502             "" => "DUMMY" ^ serial_string ()
   502             "" => "DUMMY"
   503           | s => s);
   503           | s => s)  ^ serial_string ();
   504       in
   504       in
   505         if File.exists path then
   505         if File.exists path then
   506           (((name, base, File.read path), (i, Latex.theory_entry name)), i + 1)
   506           (((name, base, File.read path), (i, Latex.theory_entry name)), i + 1)
   507         else error ("Bad file: " ^ Path.print path)
   507         else error ("Bad file: " ^ Path.print path)
   508       end;
   508       end;