summaryrefslogtreecommitdiff
path: root/elisp/geiser-repl.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-20 02:02:56 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-20 02:02:56 +0100
commit850964a87d826954aeb128a5c6f4d78e6bd78841 (patch)
tree1c563a0fc7b9f497b15ada23edaf8d911ba85992 /elisp/geiser-repl.el
parenta5426c20098fe4cf0f0914486bbcb8dad6723a6e (diff)
downloadgeiser-850964a87d826954aeb128a5c6f4d78e6bd78841.tar.gz
geiser-850964a87d826954aeb128a5c6f4d78e6bd78841.tar.bz2
Allow loading of a initialisation file (akin to ~/.guile, named ~/.guile-geiser by default).
Diffstat (limited to 'elisp/geiser-repl.el')
-rw-r--r--elisp/geiser-repl.el19
1 files changed, 13 insertions, 6 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index ea424e3..45cc164 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -49,6 +49,11 @@
:type 'string
:group 'geiser-repl)
+(defcustom geiser-repl-guile-init-file "~/.guile-geiser"
+ "Initialization file with user code for the Guile REPL."
+ :type 'string
+ :group 'geiser-repl)
+
(defcustom geiser-repl-use-other-window t
"Whether to Use a window other than the current buffer's when
switching to the Geiser REPL buffer."
@@ -76,14 +81,16 @@ REPL buffer."
(setq geiser-repl--buffer (current-buffer)))))
(defun geiser-repl--start-process ()
- (let ((guile geiser-repl-guile-binary))
+ (let* ((guile geiser-repl-guile-binary)
+ (args `("-q" "-L" ,(concat geiser-scheme-dir "/guile/")))
+ (init-file (and geiser-repl-guile-init-file
+ (expand-file-name geiser-repl-guile-init-file)))
+ (args (if (and init-file (file-readable-p init-file))
+ `(,@args "-l" ,init-file)
+ args)))
(message "Starting Geiser REPL ...")
(pop-to-buffer (geiser-repl--buffer))
- (make-comint-in-buffer "Geiser REPL"
- (current-buffer)
- guile
- nil
- "-L" (concat geiser-scheme-dir "/guile/") "-q")
+ (apply 'make-comint-in-buffer `("Geiser REPL" ,(current-buffer) ,guile nil ,@args))
(geiser-repl--wait-for-prompt 10000)
(geiser-con--setup-connection (current-buffer) geiser-repl--prompt-regex)))