aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coq/coq-syntax.el5
-rw-r--r--coq/coq.el7
2 files changed, 9 insertions, 3 deletions
diff --git a/coq/coq-syntax.el b/coq/coq-syntax.el
index 87eac7c0..d9cd479d 100644
--- a/coq/coq-syntax.el
+++ b/coq/coq-syntax.el
@@ -56,13 +56,16 @@ version of coq by doing 'coqtop -v'." )
(t;; otherwise do coqtop -v and see which version we have
(let* ((str (shell-command-to-string (concat coq-prog-name " -v")))
;; this match sets match-string below
- (ver (string-match "version \\([.0-9]*\\)" str)))
+ (ver (string-match "version v?\\([.0-9]*\\)" str)))
(message str)
(let ((num (and ver (match-string 1 str))))
(cond
((and num (string-match "\\<8.0" num))
(message v80)
(setq coq-version-is-V8-0 t))
+ ((and num (string-match "\\<8.1" num))
+ (message v81)
+ (setq coq-version-is-V8-1 t))
(t ; 8.1 by default now
(message (concat "Falling back to default: " v81))
(setq coq-version-is-V8-1 t)))))))))
diff --git a/coq/coq.el b/coq/coq.el
index 94e770f3..cd1f6356 100644
--- a/coq/coq.el
+++ b/coq/coq.el
@@ -85,8 +85,11 @@ To disable coqc being called (and use only make), set this to nil."
;; quarter of 2005).
(defvar coq-shell-prompt-pattern
- (concat "\\(?:\n" proof-id " < [^\n]+\371\\|\n<prompt>[^\n]+</prompt>\\)")
- "*The prompt pattern for the inferior shell running coq.")
+ (if coq-version-is-V8-0
+ (concat "\\(?:\n" proof-id " < \\)")
+ (concat "\\(?:\n" proof-id " < [^\n]+\371\\|\n<prompt>[^\n]+</prompt>\\)")
+ )
+ "*The prompt pattern for the inferior shell running coq.")
; (concat "^\n?" proof-id " < \\(?:[0-9]+ |\\(?:" proof-id "|?\\)*| " "[0-9]+ < \\)?\\(?:\x6\\|\371\\)")
;; FIXME da: this was disabled (set to nil) -- why?