diff options
| author | Jason Gross | 2016-12-04 14:09:24 -0500 |
|---|---|---|
| committer | Jason Gross | 2017-04-28 13:40:43 -0400 |
| commit | e1fc5c4dae82acd2eb6618724599aca368c200b7 (patch) | |
| tree | fee617eeb70980fa8250db49aad55f8de6905fc0 | |
| parent | 7943b1fade775af48917d54878e65b80217be038 (diff) | |
Add .dir-locals.el and _CoqProject files for emacs stdlib editing
These set up PG to use the local coqtop, and the local coqlib, when
editing files in the stdlib. As per
https://github.com/coq/coq/pull/386#issuecomment-279012238, we can use
`_CoqProject` for `theories/Init`, and this allows CoqIDE to edit those
files. However, we cannot use it for `theories/`, because a
`_CoqProject` file will override a `.dir-locals.el` in the same
directory, and there is no way to get PG to pick up a valid `-coqlib`
from `_CoqProject` (because it'll take the path relative to the current
directory, not relative to the directory of `_CoqProject`).
| -rw-r--r-- | theories/.dir-locals.el | 4 | ||||
| -rw-r--r-- | theories/Init/_CoqProject | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/theories/.dir-locals.el b/theories/.dir-locals.el new file mode 100644 index 0000000000..4e8830f6c1 --- /dev/null +++ b/theories/.dir-locals.el @@ -0,0 +1,4 @@ +((coq-mode . ((eval . (let ((default-directory (locate-dominating-file + buffer-file-name ".dir-locals.el"))) + (setq-local coq-prog-args `("-coqlib" ,(expand-file-name "..") "-R" ,(expand-file-name ".") "Coq")) + (setq-local coq-prog-name (expand-file-name "../bin/coqtop"))))))) diff --git a/theories/Init/_CoqProject b/theories/Init/_CoqProject new file mode 100644 index 0000000000..bff79d34bf --- /dev/null +++ b/theories/Init/_CoqProject @@ -0,0 +1,2 @@ +-R .. Coq +-arg -noinit |
