diff options
Diffstat (limited to 'etc/isa/settings.ML')
-rw-r--r-- | etc/isa/settings.ML | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/etc/isa/settings.ML b/etc/isa/settings.ML new file mode 100644 index 00000000..3250f9ca --- /dev/null +++ b/etc/isa/settings.ML @@ -0,0 +1,21 @@ +(* + Simple test for variable setting mechanism ML -> PG. + This kind of protocol is included in PGIP for setting config variables. + Here we can use it for executing arbitrary elisp, in fact (eek!) +*) + +fun pg_setvar var exp = writeln ("Proof General, please set the variable " ^ var ^ " to: #" ^ exp ^ "#."); + +pg_setvar "wag" "(+ 33 44)"; (* C-h v wag RET gives 77 *) + +fun pgset var = pg_setvar var "t"; +fun pgreset var = pg_setvar var "nil"; + +pgset "isa-show-types"; (* sets show-types in menu *) + +(* What might be nice is to override 'set' 'reset' fuctions to mirror + settings in PG automatically, but then we'd need to retrieve the + names of the ML values from the 'set' and 'reset' functions... *) + +(* test failure case: prints a debug message if proof-show-debug-messages<>nil *) +pg_setvar "wig" "blah 12 x12" |