# HG changeset patch # User wenzelm # Date 1574339127 -3600 # Node ID f7a9889068ff931846cd295dfcb07dc61f0e642b # Parent 2f782d5f5d5a200a7aa2daa0acd2756907c7154e added document antiquotation @{system_option}; diff -r 2f782d5f5d5a -r f7a9889068ff src/Doc/Isar_Ref/Document_Preparation.thy --- a/src/Doc/Isar_Ref/Document_Preparation.thy Wed Nov 20 17:26:04 2019 +0100 +++ b/src/Doc/Isar_Ref/Document_Preparation.thy Thu Nov 21 13:25:27 2019 +0100 @@ -108,6 +108,7 @@ @{antiquotation_def emph} & : & \antiquotation\ \\ @{antiquotation_def bold} & : & \antiquotation\ \\ @{antiquotation_def verbatim} & : & \antiquotation\ \\ + @{antiquotation_def system_option} & : & \antiquotation\ \\ @{antiquotation_def session} & : & \antiquotation\ \\ @{antiquotation_def "file"} & : & \antiquotation\ \\ @{antiquotation_def "url"} & : & \antiquotation\ \\ @@ -198,6 +199,7 @@ @@{antiquotation emph} options @{syntax text} | @@{antiquotation bold} options @{syntax text} | @@{antiquotation verbatim} options @{syntax text} | + @@{antiquotation system_option} options @{syntax embedded} | @@{antiquotation session} options @{syntax embedded} | @@{antiquotation path} options @{syntax embedded} | @@{antiquotation "file"} options @{syntax name} | @@ -290,6 +292,10 @@ \<^descr> \@{verbatim s}\ prints uninterpreted source text literally as ASCII characters, using some type-writer font style. + \<^descr> \@{system_option name}\ prints the given system option verbatim. The name + is checked wrt.\ cumulative \<^verbatim>\etc/options\ of all Isabelle components, + notably \<^file>\~~/etc/options\. + \<^descr> \@{session name}\ prints given session name verbatim. The name is checked wrt.\ the dependencies of the current session. diff -r 2f782d5f5d5a -r f7a9889068ff src/Pure/Thy/document_antiquotations.ML --- a/src/Pure/Thy/document_antiquotations.ML Wed Nov 20 17:26:04 2019 +0100 +++ b/src/Pure/Thy/document_antiquotations.ML Thu Nov 21 13:25:27 2019 +0100 @@ -260,6 +260,16 @@ in #1 (Input.source_content text) end)); +(* system options *) + +val _ = Theory.setup + (Thy_Output.antiquotation_verbatim_embedded \<^binding>\system_option\ + (Scan.lift Args.embedded_position) + (fn ctxt => fn (name, pos) => + let val _ = Completion.check_option (Options.default ()) ctxt (name, pos); + in name end)); + + (* ML text *) local