1.1 --- a/src/Pure/System/isabelle_system.scala Thu May 20 10:43:46 2010 +0200
1.2 +++ b/src/Pure/System/isabelle_system.scala Thu May 20 11:36:30 2010 +0200
1.3 @@ -150,6 +150,15 @@
1.4 def platform_file(path: String) = new File(platform_path(path))
1.5
1.6
1.7 + /* try_read */
1.8 +
1.9 + def try_read(path: String): String =
1.10 + {
1.11 + val file = platform_file(path)
1.12 + if (file.isFile) Source.fromFile(file).mkString else ""
1.13 + }
1.14 +
1.15 +
1.16 /* source files */
1.17
1.18 private def try_file(file: File) = if (file.isFile) Some(file) else None
1.19 @@ -304,11 +313,8 @@
1.20 /* symbols */
1.21
1.22 private def read_symbols(path: String): List[String] =
1.23 - {
1.24 - val file = platform_file(path)
1.25 - if (file.isFile) Source.fromFile(file).getLines("\n").toList
1.26 - else Nil
1.27 - }
1.28 + Library.chunks(try_read(path)).map(_.toString).toList
1.29 +
1.30 val symbols = new Symbol.Interpretation(
1.31 read_symbols("$ISABELLE_HOME/etc/symbols") :::
1.32 read_symbols("$ISABELLE_HOME_USER/etc/symbols"))