src/Tools/jEdit/src/isabelle.scala
changeset 56393 22f533e6a049
parent 56278 2576d3a40ed6
child 56394 bbf4d512f395
--- a/src/Tools/jEdit/src/isabelle.scala	Thu Apr 03 20:17:12 2014 +0200
+++ b/src/Tools/jEdit/src/isabelle.scala	Thu Apr 03 20:53:35 2014 +0200
@@ -46,8 +46,10 @@
   def mode_syntax(name: String): Option[Outer_Syntax] =
     name match {
       case "isabelle" | "isabelle-markup" =>
-        val syntax = PIDE.session.recent_syntax
-        if (syntax == Outer_Syntax.empty) None else Some(syntax)
+        PIDE.session.recent_syntax match {
+          case syntax : Outer_Syntax if syntax != Outer_Syntax.empty => Some(syntax)
+          case _ => None
+        }
       case "isabelle-options" => Some(Options.options_syntax)
       case "isabelle-root" => Some(Build.root_syntax)
       case "isabelle-ml" => Some(ml_syntax)