aboutsummaryrefslogtreecommitdiffhomepage
path: root/pg-init.el
diff options
context:
space:
mode:
authorGravatar Stefan Monnier <monnier@iro.umontreal.ca>2019-01-12 19:42:37 -0500
committerGravatar Stefan Monnier <monnier@iro.umontreal.ca>2019-01-12 19:42:37 -0500
commit58cea1b8ffb02bc546ddb56a669d4094390d4809 (patch)
treed06d857e9839f4662e8d36249e9c55e75a51c9ea /pg-init.el
parentfb3b75dab55b6e6befffc53e136422558be5faa0 (diff)
* pg-init.el: Add subdirs during compilation (bug #413)
* generic/pg-user.el (proof-add-completions): `proof-assistant` can also be the empty string :-(
Diffstat (limited to 'pg-init.el')
-rw-r--r--pg-init.el22
1 files changed, 20 insertions, 2 deletions
diff --git a/pg-init.el b/pg-init.el
index 3a2e5492..0634de0b 100644
--- a/pg-init.el
+++ b/pg-init.el
@@ -1,9 +1,9 @@
-;;; pg-init.el --- PG init file for package.el and ELPA compatibility -*- lexical-binding: t; -*-
+;;; pg-init.el --- PG init file for package.el and ELPA compatibility -*- lexical-binding:t; -*-
;; This file is part of Proof General.
;; Portions © Copyright 1994-2012 David Aspinall and University of Edinburgh
-;; Portions © Copyright 2003-2018 Free Software Foundation, Inc.
+;; Portions © Copyright 2003-2019 Free Software Foundation, Inc.
;; Portions © Copyright 2001-2017 Pierre Courtieu
;; Portions © Copyright 2010, 2016 Erik Martin-Dorel
;; Portions © Copyright 2011-2013, 2016-2017 Hendrik Tews
@@ -47,5 +47,23 @@
(file-name-directory
(or load-file-name buffer-file-name)))))
+(eval-when-compile
+ ;; FIXME: This is used during installation of the ELPA package:
+ ;; we presume that this file will be compiled before any of the files in
+ ;; sub-directories and we presume that all files are compiled within the same
+ ;; session, so we here add to load-path all the subdirectories so
+ ;; that files in (say) coq/ can (require 'coq-foo) and the compiler will find
+ ;; the corresponding file.
+ (let ((byte-compile-directories
+ '("generic" "lib"
+ "coq" "easycrypt" "pghaskell" "pgocaml" "pgshell" "phox"
+ ;; FIXME: These dirs used to not be listed, but I needed to add
+ ;; them for the compilation to succeed for me. --Stef
+ "isar" "lego" "twelf" "obsolete/plastic"))
+ (root (file-name-directory
+ (or load-file-name byte-compile-current-file buffer-file-name))))
+ (dolist (dir byte-compile-directories)
+ (add-to-list 'load-path (expand-file-name dir root)))))
+
(provide 'pg-init)
;;; pg-init.el ends here