aboutsummaryrefslogtreecommitdiffhomepage
path: root/coq/coq.el
diff options
context:
space:
mode:
authorGravatar Pierre Courtieu <Pierre.Courtieu@cnam.fr>2015-11-02 14:54:56 +0100
committerGravatar Pierre Courtieu <Pierre.Courtieu@cnam.fr>2015-11-02 14:56:15 +0100
commit8260bc52e829f21a664c13c4b1c5b70a8b0ee048 (patch)
treecf5d7a1b300aa7045448ec09b08996a52d8f6834 /coq/coq.el
parente557f0dc6bd679b012758294206866ae57e3f76c (diff)
coq-pre-v85 option to fix coqdep invocation in [compile before require].
Command line options changed heavily betwenn 8.4 and 8.5. We need an option to force V8.4 in some cases, mainly to infer the right coqtop/coqdep invocations.
Diffstat (limited to 'coq/coq.el')
-rw-r--r--coq/coq.el16
1 files changed, 16 insertions, 0 deletions
diff --git a/coq/coq.el b/coq/coq.el
index 9d9463b5..bc2d299a 100644
--- a/coq/coq.el
+++ b/coq/coq.el
@@ -59,6 +59,13 @@
(defvar prettify-symbols-alist nil)))
+(defun get-coq-version ()
+ (let ((c (shell-command-to-string "coqtop -v")))
+ (if (string-match "version \\([^ ]+\\)\\s-" c)
+ (match-string 1 c)
+ c)))
+
+
;; ----- coq-shell configuration options
;;; Code:
@@ -90,6 +97,13 @@ See also `coq-prog-env' to adjust the environment."
:type 'boolean
:group 'coq)
+(defcustom coq-pre-v85 nil
+ "Whether to use <= coq-8.4 config (nil by default).
+Mainly to deal with command line options that changed between 8.4
+and 8.5 (-Q foo bar replace -I foo)."
+ :type 'boolean
+ :group 'coq)
+
(defun coq-build-prog-args ()
"Adjusts default `coq-prog-args'. May be overridden by file variables."
(delete "-emacs" coq-prog-args)
@@ -959,6 +973,8 @@ This is specific to `coq-mode'."
(defun coq-SearchAbout ()
(interactive)
(coq-ask-do
+ ;; TODO: use [Add Search Blacklist "foo"] to exclude optionaly some patterns:
+ ;; "_ind" "_rec" "R_" "_equation"
"SearchAbout (ex: \"eq_\" eq -bool)"
"SearchAbout")
(message "use `coq-SearchAbout-all' to see constants ending with \"_ind\", \"_rec\", etc"))