aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Erik Martin-Dorel <erik@martin-dorel.org>2018-04-08 01:54:52 +0200
committerGravatar GitHub <noreply@github.com>2018-04-08 01:54:52 +0200
commitccfc917a6a907c360ce68e8a8be5700428f48b96 (patch)
tree68aa6d37e38009ce60d614908f49c8661e840b0b
parenta7894708e924be6c3968054988b50da7f6c02c6b (diff)
parent53950e9e57639a35d6bf542000636ff6f605acb0 (diff)
Merge pull request #207 from SkySkimmer/master
Make coq-prog-args safe when list of strings.
-rw-r--r--coq/coq-system.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/coq/coq-system.el b/coq/coq-system.el
index fff239c1..f3eabafc 100644
--- a/coq/coq-system.el
+++ b/coq/coq-system.el
@@ -33,6 +33,15 @@
(defvar coq-prog-args)
(defvar coq-debug))
+;; Arbitrary arguments can already be passed through _CoqProject.
+;; However this is not true for all assistants, so we don't modify the
+;; (defpgcustom prog-args) declaration.
+(defun coq--string-list-p (obj)
+ "Determine if OBJ is a list of strings."
+ (or (null obj) (and (consp obj) (stringp (car obj)) (coq--string-list-p (cdr obj)))))
+
+(put 'coq-prog-args 'safe-local-variable #'coq--string-list-p)
+
(defcustom coq-prog-env nil
"List of environment settings to pass to Coq process.
On Windows you might need something like: