src/Pure/Thy/thy_output.ML
changeset 68505 088780aa2b70
parent 68482 cb84beb84ca9
child 68506 cef6c6b009fb
equal deleted inserted replaced
68504:3524d60b8f15 68505:088780aa2b70
   259 
   259 
   260     val nesting = Toplevel.level state' - Toplevel.level state;
   260     val nesting = Toplevel.level state' - Toplevel.level state;
   261 
   261 
   262     val active_tag' =
   262     val active_tag' =
   263       if is_some tag' then tag'
   263       if is_some tag' then tag'
   264       else if cmd_name = "end" andalso not (Toplevel.is_toplevel state') then NONE
   264       else if cmd_name = "end" andalso Toplevel.is_end_theory state' then SOME "theory"
   265       else
   265       else
   266         (case Keyword.command_tags keywords cmd_name @ document_tags of
   266         (case Keyword.command_tags keywords cmd_name @ document_tags of
   267           default_tag :: _ => SOME default_tag
   267           default_tag :: _ => SOME default_tag
   268         | [] =>
   268         | [] =>
   269             if Keyword.is_vacuous keywords cmd_name andalso Toplevel.is_proof state
   269             if Keyword.is_vacuous keywords cmd_name andalso Toplevel.is_proof state