aboutsummaryrefslogtreecommitdiff
path: root/coq
diff options
context:
space:
mode:
authorHendrik Tews2021-02-22 23:00:41 +0100
committerHendrik Tews2021-02-22 23:25:30 +0100
commit76fe29c9b121a0010a0f24b5cca5ac706683e3c3 (patch)
treeac5879e94b68e1b926783c93ff60b27039ccb464 /coq
parentbdb67820696b2bfec06fda72f2a39548c73dcaf7 (diff)
protect uses of coq-callcoq
Uses of coq-callcoq need to correctly handle nil as result for the case that coq-callcoq fails. Additionally, add a regression test. Fixes #551
Diffstat (limited to 'coq')
-rw-r--r--coq/coq-system.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/coq/coq-system.el b/coq/coq-system.el
index c090cecb..01b9b1d5 100644
--- a/coq/coq-system.el
+++ b/coq/coq-system.el
@@ -140,7 +140,10 @@ Interactively (with INTERACTIVE-P), show that number."
(defun coq-autodetect-help (&optional interactive-p)
"Record the output of coqotp -help in `coq-autodetected-help'."
(interactive '(t))
- (setq coq-autodetected-help (coq-callcoq "-help")))
+ (let ((coq-output (coq-callcoq "-help")))
+ (if coq-output
+ (setq coq-autodetected-help coq-output)
+ (setq coq-autodetected-help ""))))
(defun coq--version< (v1 v2)