diff options
author | Gaëtan Gilbert <gaetan.gilbert@skyskimmer.net> | 2017-10-24 17:21:33 +0200 |
---|---|---|
committer | Gaëtan Gilbert <gaetan.gilbert@skyskimmer.net> | 2017-12-22 18:03:48 +0100 |
commit | 53950e9e57639a35d6bf542000636ff6f605acb0 (patch) | |
tree | f77b3a8e521031b508e5a7ec1cb6629da509e7eb | |
parent | 9083698d0bbd4438208fa72222438ae59684542d (diff) |
Make coq-prog-args safe when list of strings.
They could be passed through _CoqProject regardless.
-rw-r--r-- | coq/coq-system.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/coq/coq-system.el b/coq/coq-system.el index 8da4ea23..0bcf6a07 100644 --- a/coq/coq-system.el +++ b/coq/coq-system.el @@ -22,6 +22,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 d to pass to Coq process. On Windows you might need something like: |