diff -r 87ebf5a50283 -r 42267c650205 src/Pure/Tools/doc.scala --- a/src/Pure/Tools/doc.scala Fri Apr 01 17:06:10 2022 +0200 +++ b/src/Pure/Tools/doc.scala Fri Apr 01 23:19:12 2022 +0200 @@ -128,22 +128,23 @@ /* Isabelle tool wrapper */ val isabelle_tool = Isabelle_Tool("doc", "view Isabelle PDF documentation", - Scala_Project.here, args => { - val getopts = Getopts(""" + Scala_Project.here, + { args => + val getopts = Getopts(""" Usage: isabelle doc [DOC ...] View Isabelle PDF documentation. """) - val docs = getopts(args) + val docs = getopts(args) - if (docs.isEmpty) Output.writeln(cat_lines(contents_lines().map(_._2)), stdout = true) - else { - docs.foreach(name => - contents().docs.find(_.name == name) match { - case Some(doc) => view(doc.path) - case None => error("No Isabelle documentation entry: " + quote(name)) - } - ) - } - }) + if (docs.isEmpty) Output.writeln(cat_lines(contents_lines().map(_._2)), stdout = true) + else { + docs.foreach(name => + contents().docs.find(_.name == name) match { + case Some(doc) => view(doc.path) + case None => error("No Isabelle documentation entry: " + quote(name)) + } + ) + } + }) }