diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-02-20 02:02:56 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-02-20 02:02:56 +0100 |
commit | a295bf5b45e3e1a38516120af0fa60d6594d7083 (patch) | |
tree | 79cf0c37e7985d4b6aed1a5cb3c9231b14d1578f /elisp | |
parent | 327f1431a235a10a0d0a685fcf1fe26bf3973ffa (diff) | |
download | geiser-chez-a295bf5b45e3e1a38516120af0fa60d6594d7083.tar.gz geiser-chez-a295bf5b45e3e1a38516120af0fa60d6594d7083.tar.bz2 |
Allow loading of a initialisation file (akin to ~/.guile, named ~/.guile-geiser by default).
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-repl.el | 19 |
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))) |