diff options
| author | Pierre Courtieu | 2006-12-12 10:48:39 +0000 |
|---|---|---|
| committer | Pierre Courtieu | 2006-12-12 10:48:39 +0000 |
| commit | 987c4a3f3302a56af59cce103d9846043d49633b (patch) | |
| tree | 921ca91cb940f3c64498000f6f7ca83093a27f94 | |
| parent | 7cfe98c3398b78866d7cfab6989922fe231cb130 (diff) | |
Fixed coq 8.0 compatibility and coq version detection.
| -rw-r--r-- | coq/coq-syntax.el | 5 | ||||
| -rw-r--r-- | coq/coq.el | 7 |
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))))))))) @@ -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? |
