aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Hendrik Tews <hendrik@askra.de>2012-11-03 21:12:02 +0000
committerGravatar Hendrik Tews <hendrik@askra.de>2012-11-03 21:12:02 +0000
commitf7d28e6a8f9bc683b093628c9bbc38322ae4fd50 (patch)
treebbb25fc21c831927f51d318e2186cf0ce0b389e2
parentc3fafdf54d54c78124e76a72f4ecacb43dc5fcf1 (diff)
make coq-include-options independent of current buffer
-rw-r--r--coq/coq-compile-common.el8
-rw-r--r--coq/coq-seq-compile.el5
2 files changed, 8 insertions, 5 deletions
diff --git a/coq/coq-compile-common.el b/coq/coq-compile-common.el
index 62ecfff4..4e2e7802 100644
--- a/coq/coq-compile-common.el
+++ b/coq/coq-compile-common.el
@@ -344,9 +344,11 @@ options they are translated."
(setq entry (cdr entry)))
(list "-R" (expand-file-name (car entry)) "-as" (nth 1 entry)))))
-(defun coq-include-options (file)
+(defun coq-include-options (file coq-load-path)
"Build the list of include options for coqc, coqdep and coqtop.
-The options list includes all entries from `coq-load-path'
+The options list includes all entries from argument COQ-LOAD-PATH
+\(which should be `coq-load-path' of the buffer that invoked the
+compilation)
prefixed with suitable options and, if
`coq-load-path-include-current' is enabled, the directory base of
FILE. The resulting list is fresh for every call, callers can
@@ -370,7 +372,7 @@ FILE should be an absolute file name. It can be nil if
;; coqtop always adds the current directory to the LoadPath, so don't
;; include it in the -I options.
(let ((coq-load-path-include-current nil))
- (append coq-prog-args (coq-include-options nil))))
+ (append coq-prog-args (coq-include-options nil coq-load-path))))
;; ignore library files
diff --git a/coq/coq-seq-compile.el b/coq/coq-seq-compile.el
index 4756d382..2dd1e954 100644
--- a/coq/coq-seq-compile.el
+++ b/coq/coq-seq-compile.el
@@ -82,7 +82,8 @@ dependencies are absolute too and the simplified treatment of
`coq-load-path-include-current' in `coq-include-options' won't
break."
(let ((coqdep-arguments
- (nconc (coq-include-options lib-src-file) (list lib-src-file)))
+ (nconc (coq-include-options lib-src-file coq-load-path)
+ (list lib-src-file)))
coqdep-status coqdep-output)
(if coq-debug-auto-compilation
(message "call coqdep arg list: %s" coqdep-arguments))
@@ -119,7 +120,7 @@ break."
Display errors in buffer `coq-compile-response-buffer'."
(message "Recompile %s" src-file)
(let ((coqc-arguments
- (nconc (coq-include-options src-file) (list src-file)))
+ (nconc (coq-include-options src-file coq-load-path) (list src-file)))
coqc-status)
(coq-init-compile-response-buffer
(mapconcat 'identity (cons coq-compiler coqc-arguments) " "))