diff options
| author | David Aspinall | 2001-08-31 11:34:52 +0000 |
|---|---|---|
| committer | David Aspinall | 2001-08-31 11:34:52 +0000 |
| commit | 2fd0b8278f0c455e07bdba83cd5299589ad9c847 (patch) | |
| tree | 5aba76fd71fb9b6681f144dca7aa28dd0dff2755 | |
| parent | e065b530807f96ec06bc8ad51dfbe776ad88e8fc (diff) | |
Add setting for turning on theorem dependency tracking
| -rw-r--r-- | isa/isa.el | 41 |
1 files changed, 40 insertions, 1 deletions
@@ -192,7 +192,7 @@ and script mode." ;; FIXME: temporary hack for almost enabling/disabling printing. ;; Also for setting default values. proof-shell-pre-sync-init-cmd "ProofGeneral.init false;" - proof-shell-init-cmd (proof-assistant-settings-cmd) + proof-shell-init-cmd (proof-assistant-settings-cmd) proof-shell-restart-cmd "ProofGeneral.isa_restart();" proof-shell-quit-cmd "quit();" @@ -717,6 +717,45 @@ you will be asked to retract the file or process the remainder of it." )) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Theorem dependencies (experimental) +;; + +(defpacustom theorem-dependencies nil + "Whether to track theorem dependencies within Proof General." + :type 'boolean + ;; when this is built-in (or with a ":=%b" setting). + ;; :setting ("depends_enable()" . "depends_disable()") + :eval (isa-theorem-dependencies-switch)) + +(defvar isa-dependsml-file-loaded nil) + +(add-hook 'proof-shell-kill-function-hooks + (lambda () (setq isa-dependsml-file-loaded nil))) + +(defun isa-load-dependsml-file () + ;; NB: maybe doesn't work if enabled before Isabelle starts. + (if (proof-shell-available-p) + (progn + (proof-shell-invisible-command + (proof-format-filename + "use \"%r\";" + (concat (file-name-directory + (locate-library "isa")) + "depends.ML"))) + (setq isa-dependsml-file-loaded t)))) + +(defun isa-theorem-dependencies-switch () + "Switch on/off theorem dependency tracking. (Experimental feature)." + (if (and isa-theorem-dependencies (not isa-dependsml-file-loaded)) + (isa-load-dependsml-file)) + (proof-shell-invisible-command (if isa-theorem-dependencies + "depends_enable()" + "depends_disable()"))) + + + (provide 'isa) |
