summaryrefslogtreecommitdiff
path: root/scripts/haunt.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/haunt.in')
-rwxr-xr-xscripts/haunt.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/haunt.in b/scripts/haunt.in
index 7206036..dd25efb 100755
--- a/scripts/haunt.in
+++ b/scripts/haunt.in
@@ -19,6 +19,15 @@
;;; You should have received a copy of the GNU General Public License
;;; along with Haunt. If not, see <http://www.gnu.org/licenses/>.
+(define-syntax-rule (push! elt v) (set! v (cons elt v)))
+
+;; Automatically add Haunt modules to Guile's load path so that users
+;; aren't wondering why Haunt isn't working when the modules aren't
+;; installed to Guile's default module locations.
+(unless (getenv "HAUNT_UNINSTALLED")
+ (push! "@guilemoduledir@" %load-path)
+ (push! "@guileobjectdir@" %load-compiled-path))
+
(use-modules (haunt ui))
(apply haunt-main (command-line))