diff options
| -rw-r--r-- | coq/coq-syntax.el | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/coq/coq-syntax.el b/coq/coq-syntax.el index 6da832c8..09ba5878 100644 --- a/coq/coq-syntax.el +++ b/coq/coq-syntax.el @@ -83,26 +83,29 @@ version of coq by doing 'coqtop -v'." ) (setq coq-version-is-V7 nil)) (t (let* ((str (shell-command-to-string (concat coq-prog-name " -v"))) - (x (string-match "version \\([.0-9]*\\)" str)) - (num (match-string 1 str))) + ;; da: next line not used? + ;;(x (string-match "version \\([.0-9]*\\)" str)) + (num (match-string 1 str))) ;; da: added this to avoid type error in case coq command fails (if (null num) (setq num "")) (cond ((string-match num "\\<6.") - (message v6) - (setq coq-version-is-V7 nil) - (setq coq-version-is-V74 nil)) - ((or (string-match num "\\<7.0") (string-match num "\\<7.1") - (string-match num "\\<7.2") (string-match num "\\<7.3")) - (message v7) - (setq coq-version-is-V7 t) - (setq coq-version-is-V74 nil)) - ((string-match num "\\<8")) + (message v6) + (setq coq-version-is-V7 nil) + (setq coq-version-is-V74 nil)) + ((or (string-match num "\\<7.0") + (string-match num "\\<7.1") + (string-match num "\\<7.2") + (string-match num "\\<7.3")) + (message v7) + (setq coq-version-is-V7 t) + (setq coq-version-is-V74 nil)) + ((string-match num "\\<8")) (t - (message v8) - (setq coq-version-is-V8 t) - (setq coq-version-is-V7 t) - (setq coq-version-is-V74 t)))))))) + (message v8) + (setq coq-version-is-V8 t) + (setq coq-version-is-V7 t) + (setq coq-version-is-V74 t)))))))) ;; ----- keywords for font-lock. |
