more uniform session_system_mode (see also e57416b649d5);
authorwenzelm
Fri Mar 01 20:16:26 2019 +0100 (3 months ago ago)
changeset 70034f7c9a1be333f
parent 70033 54243334edcf
child 70035 cc0b3e177b49
more uniform session_system_mode (see also e57416b649d5);
src/Tools/jEdit/src/jedit_sessions.scala
     1.1 --- a/src/Tools/jEdit/src/jedit_sessions.scala	Fri Mar 01 17:00:55 2019 +0100
     1.2 +++ b/src/Tools/jEdit/src/jedit_sessions.scala	Fri Mar 01 20:16:26 2019 +0100
     1.3 @@ -29,6 +29,9 @@
     1.4  
     1.5    def session_build_mode(): String = Isabelle_System.getenv("JEDIT_BUILD_MODE")
     1.6  
     1.7 +  def session_system_mode(): Boolean =
     1.8 +    session_build_mode() match { case "" | "system" => true case _ => false }
     1.9 +
    1.10    def sessions_structure(options: Options, dirs: List[Path] = session_dirs()): Sessions.Structure =
    1.11      Sessions.load_structure(session_options(options), dirs = dirs)
    1.12  
    1.13 @@ -119,10 +122,8 @@
    1.14    def session_build(
    1.15      options: Options, progress: Progress = No_Progress, no_build: Boolean = false): Int =
    1.16    {
    1.17 -    val mode = session_build_mode()
    1.18 -
    1.19      Build.build(session_options(options), progress = progress, build_heap = true,
    1.20 -      no_build = no_build, system_mode = mode == "" || mode == "system",
    1.21 +      no_build = no_build, system_mode = session_system_mode(),
    1.22        dirs = session_dirs(), infos = PIDE.resources.session_base_info.infos,
    1.23        sessions = List(PIDE.resources.session_name)).rc
    1.24    }
    1.25 @@ -132,7 +133,7 @@
    1.26      Isabelle_Process.start(PIDE.session, session_options(options),
    1.27        sessions_structure = Some(PIDE.resources.session_base_info.sessions_structure),
    1.28        logic = PIDE.resources.session_name,
    1.29 -      store = Some(Sessions.store(options, session_build_mode() == "system")),
    1.30 +      store = Some(Sessions.store(options, session_system_mode())),
    1.31        modes =
    1.32          (space_explode(',', options.string("jedit_print_mode")) :::
    1.33           space_explode(',', Isabelle_System.getenv("JEDIT_PRINT_MODE"))).reverse,