clarified isabelle options -l;
authorwenzelm
Tue Oct 29 16:52:25 2013 +0100 (2013-10-29)
changeset 54347d5589530f3ba
parent 54346 a3c59f04346f
child 54348 923690bfb818
clarified isabelle options -l;
src/Doc/System/Sessions.thy
src/Pure/System/options.scala
     1.1 --- a/src/Doc/System/Sessions.thy	Tue Oct 29 15:34:29 2013 +0100
     1.2 +++ b/src/Doc/System/Sessions.thy	Tue Oct 29 16:52:25 2013 +0100
     1.3 @@ -249,6 +249,8 @@
     1.4    \secref{sec:tool-build}.
     1.5  
     1.6    Option @{verbatim "-g"} prints the value of the given option.
     1.7 +  Option @{verbatim "-l"} lists all options with their declaration and
     1.8 +  current value.
     1.9  
    1.10    Option @{verbatim "-x"} specifies a file to export the result in
    1.11    YXML format, instead of printing it in human-readable form.
     2.1 --- a/src/Pure/System/options.scala	Tue Oct 29 15:34:29 2013 +0100
     2.2 +++ b/src/Pure/System/options.scala	Tue Oct 29 16:52:25 2013 +0100
     2.3 @@ -162,7 +162,10 @@
     2.4  {
     2.5    override def toString: String = options.iterator.mkString("Options (", ",", ")")
     2.6  
     2.7 -  def print: String = cat_lines(options.toList.sortBy(_._1).map(p => p._2.print))
     2.8 +  private def print_opt(opt: Options.Opt): String =
     2.9 +    if (opt.public) "public " + opt.print else opt.print
    2.10 +
    2.11 +  def print: String = cat_lines(options.toList.sortBy(_._1).map(p => print_opt(p._2)))
    2.12  
    2.13    def description(name: String): String = check_name(name).description
    2.14