aboutsummaryrefslogtreecommitdiff
path: root/coq
diff options
context:
space:
mode:
authorHendrik Tews2017-01-19 11:40:28 +0100
committerHendrik Tews2017-01-19 11:40:28 +0100
commit4bcac92df46da9e68b5e3d565bb118fb63b4feb4 (patch)
treeec19916cf72884ee83fc7f52d8c7d87b83ce767f /coq
parent77c3f2eac868f177b73d2aa59b277e40fc48fd0c (diff)
save settings not defined with defpacustom (fixes #142)
- infrastructure for saving/resetting customizations not defined with defpacustom - improve Coq -> Auto Compilation menu - polish documentation and manual
Diffstat (limited to 'coq')
-rw-r--r--coq/coq-abbrev.el90
-rw-r--r--coq/coq-compile-common.el21
-rw-r--r--coq/coq.el6
3 files changed, 85 insertions, 32 deletions
diff --git a/coq/coq-abbrev.el b/coq/coq-abbrev.el
index 534c013d..2b318dea 100644
--- a/coq/coq-abbrev.el
+++ b/coq/coq-abbrev.el
@@ -169,34 +169,68 @@ It was constructed with `proof-defstringset-fn'.")
coq-compile-parallel-in-background)
:help ,(concat "Continue background compilation after "
"the first error as far as possible")]
- ["no quick"
- (customize-set-variable 'coq-compile-quick 'no-quick)
- :style radio
- :selected (eq coq-compile-quick 'no-quick)
- :active (and coq-compile-before-require
- coq-compile-parallel-in-background)
- :help "Compile without -quick but accept existion .vio's"]
- ["quick no vio2vo"
- (customize-set-variable 'coq-compile-quick 'quick-no-vio2vo)
- :style radio
- :selected (eq coq-compile-quick 'quick-no-vio2vo)
- :active (and coq-compile-before-require
- coq-compile-parallel-in-background)
- :help "Compile with -quick, accept existing .vo's, don't run vio2vo"]
- ["quick and vio2vo"
- (customize-set-variable 'coq-compile-quick 'quick-and-vio2vo)
- :style radio
- :selected (eq coq-compile-quick 'quick-and-vio2vo)
- :active (and coq-compile-before-require
- coq-compile-parallel-in-background)
- :help "Compile with -quick, accept existing .vo's, run vio2vo later"]
- ["ensure vo"
- (customize-set-variable 'coq-compile-quick 'ensure-vo)
- :style radio
- :selected (eq coq-compile-quick 'ensure-vo)
- :active (and coq-compile-before-require
- coq-compile-parallel-in-background)
- :help "Ensure only vo's are used for consistency"]
+ ("Quick compilation"
+ ["no quick"
+ (customize-set-variable 'coq-compile-quick 'no-quick)
+ :style radio
+ :selected (eq coq-compile-quick 'no-quick)
+ :active (and coq-compile-before-require
+ coq-compile-parallel-in-background)
+ :help "Compile without -quick but accept existion .vio's"]
+ ["quick no vio2vo"
+ (customize-set-variable 'coq-compile-quick 'quick-no-vio2vo)
+ :style radio
+ :selected (eq coq-compile-quick 'quick-no-vio2vo)
+ :active (and coq-compile-before-require
+ coq-compile-parallel-in-background)
+ :help "Compile with -quick, accept existing .vo's, don't run vio2vo"]
+ ["quick and vio2vo"
+ (customize-set-variable 'coq-compile-quick 'quick-and-vio2vo)
+ :style radio
+ :selected (eq coq-compile-quick 'quick-and-vio2vo)
+ :active (and coq-compile-before-require
+ coq-compile-parallel-in-background)
+ :help "Compile with -quick, accept existing .vo's, run vio2vo later"]
+ ["ensure vo"
+ (customize-set-variable 'coq-compile-quick 'ensure-vo)
+ :style radio
+ :selected (eq coq-compile-quick 'ensure-vo)
+ :active (and coq-compile-before-require
+ coq-compile-parallel-in-background)
+ :help "Ensure only vo's are used for consistency"]
+ )
+ ("Auto Save"
+ ["Query coq buffers"
+ (customize-set-variable 'coq-compile-auto-save 'ask-coq)
+ :style radio
+ :selected (eq coq-compile-auto-save 'ask-coq)
+ :active coq-compile-before-require
+ :help "Ask for each coq-mode buffer, except the current buffer"]
+ ["Query all buffers"
+ (customize-set-variable 'coq-compile-auto-save 'ask-all)
+ :style radio
+ :selected (eq coq-compile-auto-save 'ask-all)
+ :active coq-compile-before-require
+ :help "Ask for all buffers"]
+ ["Autosave coq buffers"
+ (customize-set-variable 'coq-compile-auto-save 'save-coq)
+ :style radio
+ :selected (eq coq-compile-auto-save 'save-coq)
+ :active coq-compile-before-require
+ :help "Save all Coq buffers without confirmation, except the current one"]
+ ["Autosave all buffers"
+ (customize-set-variable 'coq-compile-auto-save 'save-all)
+ :style radio
+ :selected (eq coq-compile-auto-save 'save-all)
+ :active coq-compile-before-require
+ :help "Save all buffers without confirmation"]
+ )
+ ["Lock Ancesotors"
+ coq-lock-ancestors-toggle
+ :style toggle
+ :selected coq-lock-ancestors
+ :active coq-compile-before-require
+ :help "Lock files of imported modules"]
["Confirm External Compilation"
coq-confirm-external-compilation-toggle
:style toggle
diff --git a/coq/coq-compile-common.el b/coq/coq-compile-common.el
index 4b0033d1..72a16881 100644
--- a/coq/coq-compile-common.el
+++ b/coq/coq-compile-common.el
@@ -246,7 +246,10 @@ quick-and-vio2vo Same as `quick-no-vio2vo', but start vio2vo processes
ensure-vo Ensure that all library dependencies are present as .vo
files and delete outdated .vio files or .vio files that
are more recent than the corresponding .vo file. This
- setting is the only one that ensures soundness."
+ setting is the only one that ensures soundness.
+
+This option can be set via menu
+`Coq -> Auto Compilation -> Quick compilation'."
:type
'(radio
(const :tag "don't use -quick but accept existing vio files" no-quick)
@@ -371,7 +374,10 @@ This makes four permitted values: 'ask-coq to confirm saving all
modified Coq buffers, 'ask-all to confirm saving all modified
buffers, 'save-coq to save all modified Coq buffers without
confirmation and 'save-all to save all modified buffers without
-confirmation."
+confirmation.
+
+This option can be set via menu
+`Coq -> Auto Compilation -> Auto Save'."
:type
'(radio
(const :tag "ask for each coq-mode buffer, except the current buffer"
@@ -389,17 +395,24 @@ confirmation."
"If non-nil, lock ancestor module files.
If external compilation is used (via `coq-compile-command') then
only the direct ancestors are locked. Otherwise all ancestors are
-locked when the \"Require\" command is processed."
+locked when the \"Require\" command is processed.
+
+This option can be set via menu
+`Coq -> Auto Compilation -> Lock Ancestors'."
+
:type 'boolean
:safe 'booleanp
:group 'coq-auto-compile)
+;; define coq-lock-ancestors-toggle
+(proof-deftoggle coq-lock-ancestors)
+
(defpacustom confirm-external-compilation t
"If set let user change and confirm the compilation command.
Otherwise start the external compilation without confirmation.
This option can be set/reset via menu
-`Coq -> Settings -> Confirm External Compilation'."
+`Coq -> Auto Compilation -> Confirm External Compilation'."
:type 'boolean
:group 'coq-auto-compile)
diff --git a/coq/coq.el b/coq/coq.el
index edf905ae..f6c67475 100644
--- a/coq/coq.el
+++ b/coq/coq.el
@@ -1544,6 +1544,12 @@ Near here means PT is either inside or just aside of a comment."
;; FIXME da: Does Coq have a help or about command?
;; proof-info-command "Help"
+ ;; Settings not defined with defpacustom because they have an unsupported
+ ;; type.
+ (setq proof-assistant-additional-settings
+ '(coq-compile-quick coq-compile-keep-going
+ coq-compile-auto-save coq-lock-ancestors))
+
(setq proof-goal-command-p 'coq-goal-command-p
proof-find-and-forget-fn 'coq-find-and-forget
pg-topterm-goalhyplit-fn 'coq-goal-hyp