# HG changeset patch # User wenzelm # Date 1460141560 -7200 # Node ID 930a30c1a9af8abd0c17b8db2ad9ef4d3a2beda7 # Parent 13252110a6fe1c2c0dfb75779a878684d964f048 option "-o" for "isabelle jedit"; diff -r 13252110a6fe -r 930a30c1a9af src/Doc/JEdit/JEdit.thy --- 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>\Plugin Options\ dialog of Isabelle/jEdit), without requiring command-line invocation. + The \<^verbatim>\-o\ 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>\-o\~\name\\<^verbatim>\=\\value\ or \<^verbatim>\-o\~\name\, + which abbreviates \<^verbatim>\-o\~\name\\<^verbatim>\=true\ for Boolean options. Multiple + occurrences of \<^verbatim>\-o\ on the command-line are applied in the given order. + The \<^verbatim>\-J\ and \<^verbatim>\-j\ 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 diff -r 13252110a6fe -r 930a30c1a9af src/Tools/jEdit/lib/Tools/jedit --- 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 diff -r 13252110a6fe -r 930a30c1a9af src/Tools/jEdit/src/plugin.scala --- 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)