summaryrefslogtreecommitdiff
path: root/elisp/geiser-compile.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2011-02-03 22:33:45 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2011-02-03 22:33:45 +0100
commit1536e3bf322ad27f6f4a4f961efbd8510148a5d6 (patch)
treea2e8e50295b430549c55c2b7607084657728b438 /elisp/geiser-compile.el
parent1eb968ccfdf86ae6d206540f84856d56e2045277 (diff)
downloadgeiser-guile-1536e3bf322ad27f6f4a4f961efbd8510148a5d6.tar.gz
geiser-guile-1536e3bf322ad27f6f4a4f961efbd8510148a5d6.tar.bz2
New geiser-add-to-load-path, just for Guile right now
As per Andy's request. Adding it to Racket (and to the user manual), shouldn't be difficult).
Diffstat (limited to 'elisp/geiser-compile.el')
-rw-r--r--elisp/geiser-compile.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/elisp/geiser-compile.el b/elisp/geiser-compile.el
index bc9aace..911de05 100644
--- a/elisp/geiser-compile.el
+++ b/elisp/geiser-compile.el
@@ -1,6 +1,6 @@
;; geiser-compile.el -- compile/load scheme files
-;; Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010, 2011 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
@@ -67,6 +67,14 @@
(interactive)
(geiser-load-file (buffer-file-name (current-buffer))))
+(defun geiser-add-to-load-path (path)
+ "Add a new directory to running Scheme's load path.
+When called interactively, this function will ask for the path to
+add, defaulting to the current buffer's directory."
+ (interactive "DDirectory to add: ")
+ (let* ((c `(:eval (:ge add-to-load-path ,path)))
+ (r (geiser-eval--send/result c)))
+ (message "%s" (if r "Added" "Failed!"))))
(provide 'geiser-compile)