aboutsummaryrefslogtreecommitdiffhomepage
path: root/coq/coq-compile-common.el
diff options
context:
space:
mode:
authorGravatar Pierre Courtieu <Pierre.Courtieu@cnam.fr>2015-12-14 13:38:51 +0100
committerGravatar Pierre Courtieu <Pierre.Courtieu@cnam.fr>2015-12-14 13:38:51 +0100
commitb957a9049f64bfe3352b148046df94aa1baf5613 (patch)
tree4170032cf871ad597bad217973d1933cde72d142 /coq/coq-compile-common.el
parent38b6dd235c4a1b2673c01abb9d13b08db1f29b9d (diff)
Fixing coq-prog-arg for auto compilation.
Diffstat (limited to 'coq/coq-compile-common.el')
-rw-r--r--coq/coq-compile-common.el28
1 files changed, 25 insertions, 3 deletions
diff --git a/coq/coq-compile-common.el b/coq/coq-compile-common.el
index e1f19209..48d62cfb 100644
--- a/coq/coq-compile-common.el
+++ b/coq/coq-compile-common.el
@@ -526,11 +526,33 @@ FILE should be an absolute file name. It can be nil if
(cons "-Q" (cons (file-name-directory file) (cons "" result))))))
result))
-(defun coq-prog-args ()
+(defun coq-coqc-prog-args (&optional src-file coq-load-path-opt)
+ ;; coqtop always adds the current directory to the LoadPath, so
+ ;; don't include it in the -Q options. This is not true for coqdep
+ ;; until late 8.5 betas.
+ (let* ((coq-loadpath (or coq-load-path-opt coq-load-path))
+ (coq-load-path-include-current nil)
+ )
+ ;; delete is safe here since coq-include-optionsbuilds a fresh list
+ ;; TODO: replace remove by delete?
+ (remove "-emacs"
+ (remove "-emacs-U"
+ (append coq-prog-args (coq-include-options src-file coq-loadpath))))))
+
+;; FIXME: this function seems to have a strange influence on pg. Is it
+;; interfering with defpgcustom prog-args in pg-custom.el?
+(defun coq-prog-args (&optional src-file loadpath)
;; coqtop always adds the current directory to the LoadPath, so don't
;; include it in the -Q options. This is not true for coqdep.
- (let ((coq-load-path-include-current nil))
- (append coq-prog-args (coq-include-options nil coq-load-path))))
+ (let ((loadpath (or loadpath coq-load-path))
+ (coq-load-path-include-current nil))
+ (append coq-prog-args (coq-include-options src-file loadpath))))
+
+(defun coq-coqc-prog-args (&optional src-file loadpath)
+ ;; coqtop always adds the current directory to the LoadPath, so don't
+ ;; include it in the -Q options. This is not true for coqdep.
+ (remove "-emacs" (remove "-emacs-U" (coq-prog-args src-file loadpath))))
+
;;; ignore library files