--- a/src/Doc/JEdit/JEdit.thy Fri Apr 08 20:15:20 2016 +0200
+++ b/src/Doc/JEdit/JEdit.thy Fri Apr 08 20:52:40 2016 +0200
@@ -241,6 +241,7 @@
-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
@@ -261,6 +262,12 @@
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 20:15:20 2016 +0200
+++ b/src/Tools/jEdit/lib/Tools/jedit Fri Apr 08 20:52:40 2016 +0200
@@ -105,6 +105,7 @@
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"
@@ -135,11 +136,12 @@
JEDIT_LOGIC=""
JEDIT_PRINT_MODE=""
JEDIT_BUILD_MODE="normal"
+JEDIT_SYSTEM_OPTIONS=""
function getoptions()
{
OPTIND=1
- while getopts "D:J:bd:fj:l:m:ns" OPT
+ while getopts "D:J:bd:fj:l:m:no:s" OPT
do
case "$OPT" in
D)
@@ -177,6 +179,13 @@
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"
;;
@@ -359,7 +368,7 @@
if [ "$BUILD_ONLY" = false ]
then
- export JEDIT_SESSION_DIRS JEDIT_LOGIC JEDIT_PRINT_MODE JEDIT_BUILD_MODE
+ export JEDIT_SESSION_DIRS JEDIT_LOGIC JEDIT_PRINT_MODE JEDIT_BUILD_MODE JEDIT_SYSTEM_OPTIONS
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 20:15:20 2016 +0200
+++ b/src/Tools/jEdit/src/plugin.scala Fri Apr 08 20:52:40 2016 +0200
@@ -400,7 +400,10 @@
Debug.DISABLE_SEARCH_DIALOG_POOL = true
PIDE.plugin = this
- PIDE.options.store(Options.init())
+
+ val options =
+ (Options.init() /: Word.explode(Isabelle_System.getenv("JEDIT_SYSTEM_OPTIONS")))(_ + _)
+ PIDE.options.store(options)
PIDE.completion_history.load()
PIDE.spell_checker.update(PIDE.options.value)