backout 930a30c1a9af: leads to odd effect of command-line options becoming persistent preferences;
authorwenzelm
Fri, 08 Apr 2016 22:48:25 +0200
changeset 62917 eed66ba99bd9
parent 62916 621afc4607ec
child 62918 2fcbd4abc021
backout 930a30c1a9af: leads to odd effect of command-line options becoming persistent preferences;
src/Doc/JEdit/JEdit.thy
src/Tools/jEdit/lib/Tools/jedit
src/Tools/jEdit/src/plugin.scala
--- a/src/Doc/JEdit/JEdit.thy	Fri Apr 08 22:47:18 2016 +0200
+++ b/src/Doc/JEdit/JEdit.thy	Fri Apr 08 22:48:25 2016 +0200
@@ -241,7 +241,6 @@
     -l NAME      logic image name
     -m MODE      add print mode for output
     -n           no build of session image on startup
-    -o OPTION    override Isabelle system OPTION (via NAME=VAL or NAME)
     -s           system build mode for session image
 
   Start jEdit with Isabelle plugin setup and open FILES
@@ -262,12 +261,6 @@
   do the same persistently (e.g.\ via the \<^emph>\<open>Plugin Options\<close> dialog of
   Isabelle/jEdit), without requiring command-line invocation.
 
-  The \<^verbatim>\<open>-o\<close> option specifies Isabelle system options that override the
-  persistent preferences (see also \secref{sec:options}). Options may be
-  changed on the command line via \<^verbatim>\<open>-o\<close>~\<open>name\<close>\<^verbatim>\<open>=\<close>\<open>value\<close> or \<^verbatim>\<open>-o\<close>~\<open>name\<close>,
-  which abbreviates \<^verbatim>\<open>-o\<close>~\<open>name\<close>\<^verbatim>\<open>=true\<close> for Boolean options. Multiple
-  occurrences of \<^verbatim>\<open>-o\<close> on the command-line are applied in the given order.
-
   The \<^verbatim>\<open>-J\<close> and \<^verbatim>\<open>-j\<close> options allow to pass additional low-level options to
   the JVM or jEdit, respectively. The defaults are provided by the Isabelle
   settings environment @{cite "isabelle-system"}, but note that these only
--- a/src/Tools/jEdit/lib/Tools/jedit	Fri Apr 08 22:47:18 2016 +0200
+++ b/src/Tools/jEdit/lib/Tools/jedit	Fri Apr 08 22:48:25 2016 +0200
@@ -105,7 +105,6 @@
   echo "    -l NAME      logic session name"
   echo "    -m MODE      add print mode for output"
   echo "    -n           no build of session image on startup"
-  echo "    -o OPTION    override Isabelle system OPTION (via NAME=VAL or NAME)"
   echo "    -s           system build mode for session image"
   echo
   echo "  Start jEdit with Isabelle plugin setup and open FILES"
@@ -136,12 +135,11 @@
 JEDIT_LOGIC=""
 JEDIT_PRINT_MODE=""
 JEDIT_BUILD_MODE="normal"
-JEDIT_SYSTEM_OPTIONS=""
 
 function getoptions()
 {
   OPTIND=1
-  while getopts "D:J:bd:fj:l:m:no:s" OPT
+  while getopts "D:J:bd:fj:l:m:ns" OPT
   do
     case "$OPT" in
       D)
@@ -179,13 +177,6 @@
       n)
         JEDIT_BUILD_MODE="none"
         ;;
-      o)
-        if [ -z "$JEDIT_SYSTEM_OPTIONS" ]; then
-          JEDIT_SYSTEM_OPTIONS="$OPTARG"
-        else
-          JEDIT_SYSTEM_OPTIONS="$JEDIT_SYSTEM_OPTIONS,$OPTARG"
-        fi
-        ;;
       s)
         JEDIT_BUILD_MODE="system"
         ;;
@@ -368,7 +359,7 @@
 
 if [ "$BUILD_ONLY" = false ]
 then
-  export JEDIT_SESSION_DIRS JEDIT_LOGIC JEDIT_PRINT_MODE JEDIT_BUILD_MODE JEDIT_SYSTEM_OPTIONS
+  export JEDIT_SESSION_DIRS JEDIT_LOGIC JEDIT_PRINT_MODE JEDIT_BUILD_MODE
   classpath "$JEDIT_HOME/dist/jedit.jar"
   exec isabelle java "${JAVA_ARGS[@]}" isabelle.Main "${ARGS[@]}"
 fi
--- a/src/Tools/jEdit/src/plugin.scala	Fri Apr 08 22:47:18 2016 +0200
+++ b/src/Tools/jEdit/src/plugin.scala	Fri Apr 08 22:48:25 2016 +0200
@@ -400,10 +400,7 @@
       Debug.DISABLE_SEARCH_DIALOG_POOL = true
 
       PIDE.plugin = this
-
-      val options =
-        (Options.init() /: Word.explode(Isabelle_System.getenv("JEDIT_SYSTEM_OPTIONS")))(_ + _)
-      PIDE.options.store(options)
+      PIDE.options.store(Options.init())
       PIDE.completion_history.load()
       PIDE.spell_checker.update(PIDE.options.value)