From 76fe29c9b121a0010a0f24b5cca5ac706683e3c3 Mon Sep 17 00:00:00 2001 From: Hendrik Tews Date: Mon, 22 Feb 2021 23:00:41 +0100 Subject: 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 --- coq/coq-system.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'coq') 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) -- cgit v1.2.3