diff options
Diffstat (limited to 'coq/coq-compile-common.el')
-rw-r--r-- | coq/coq-compile-common.el | 8 |
1 files changed, 5 insertions, 3 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 |