src/Pure/System/options.scala
changeset 67847 c61acb4855b6
parent 67845 46fa8c2c142a
child 68841 252b43600737
equal deleted inserted replaced
67846:bdf6933f7ac9 67847:c61acb4855b6
   128   }
   128   }
   129 
   129 
   130   def read_prefs(file: Path = PREFS): String =
   130   def read_prefs(file: Path = PREFS): String =
   131     if (file.is_file) File.read(file) else ""
   131     if (file.is_file) File.read(file) else ""
   132 
   132 
   133   def init(prefs: String = read_prefs(PREFS)): Options =
   133   def init(prefs: String = read_prefs(PREFS), opts: List[String] = Nil): Options =
   134   {
   134   {
   135     var options = empty
   135     var options = empty
   136     for {
   136     for {
   137       dir <- Isabelle_System.components()
   137       dir <- Isabelle_System.components()
   138       file = dir + OPTIONS if file.is_file
   138       file = dir + OPTIONS if file.is_file
   139     } { options = Parser.parse_file(options, file.implode, File.read(file)) }
   139     } { options = Parser.parse_file(options, file.implode, File.read(file)) }
   140     Options.Parser.parse_prefs(options, prefs)
   140     (Options.Parser.parse_prefs(options, prefs) /: opts)(_ + _)
   141   }
   141   }
   142 
   142 
   143 
   143 
   144   /* encode */
   144   /* encode */
   145 
   145