added system option "jedit_print_mode";
authorwenzelm
Mon, 30 Dec 2013 20:35:17 +0100
changeset 54881 dff57132cf18
parent 54880 ce5faf131fd3
child 54882 61276a7fc369
added system option "jedit_print_mode";
NEWS
src/Doc/System/Interfaces.thy
src/Tools/jEdit/etc/options
src/Tools/jEdit/src/isabelle_logic.scala
--- a/NEWS	Mon Dec 30 12:58:13 2013 +0100
+++ b/NEWS	Mon Dec 30 20:35:17 2013 +0100
@@ -25,6 +25,11 @@
 * Document panel: simplied interaction where every single mouse click
 (re)opens document via desktop environment or as jEdit buffer.
 
+* Option "jedit_print_mode" (see also "Plugin Options / Isabelle /
+General") allows to specify additional print modes for the prover
+process, without requiring old-fashioned command-line invocation of
+"isabelle jedit -m MODE".
+
 
 *** HOL ***
 
--- a/src/Doc/System/Interfaces.thy	Mon Dec 30 12:58:13 2013 +0100
+++ b/src/Doc/System/Interfaces.thy	Mon Dec 30 20:35:17 2013 +0100
@@ -38,7 +38,10 @@
   option bypasses the session build dialog.
 
   The @{verbatim "-m"} option specifies additional print modes for the
-  prover process.
+  prover process.  Note that the system option @{system_option
+  jedit_print_mode} allows to do the same persistently (e.g.\ via the
+  Plugin Options dialog of Isabelle/jEdit), without requiring
+  command-line invocation.
 
   The @{verbatim "-J"} and @{verbatim "-j"} options allow to pass
   additional low-level options to the JVM or jEdit, respectively.  The
--- a/src/Tools/jEdit/etc/options	Mon Dec 30 12:58:13 2013 +0100
+++ b/src/Tools/jEdit/etc/options	Mon Dec 30 20:35:17 2013 +0100
@@ -3,6 +3,9 @@
 public option jedit_logic : string = ""
   -- "default logic session"
 
+public option jedit_print_mode : string = ""
+  -- "default print modes for output, separated by commas (change requires restart)"
+
 public option jedit_auto_load : bool = false
   -- "load all required files automatically to resolve theory imports"
 
--- a/src/Tools/jEdit/src/isabelle_logic.scala	Mon Dec 30 12:58:13 2013 +0100
+++ b/src/Tools/jEdit/src/isabelle_logic.scala	Mon Dec 30 20:35:17 2013 +0100
@@ -60,8 +60,11 @@
 
   def session_args(): List[String] =
   {
-    val modes = space_explode(',', Isabelle_System.getenv("JEDIT_PRINT_MODE")).map("-m" + _)
-    modes ::: List("-r", "-q", jedit_logic())
+    val modes =
+      space_explode(',', PIDE.options.string("jedit_print_mode")) :::
+      space_explode(',', Isabelle_System.getenv("JEDIT_PRINT_MODE"))
+
+    modes.map("-m" + _) ::: List("-r", "-q", jedit_logic())
   }
 
   def session_dirs(): List[Path] = Path.split(Isabelle_System.getenv("JEDIT_SESSION_DIRS"))