diff options
author | Luis Osa <luis.osa.gdc@gmail.com> | 2019-02-07 22:47:44 +0100 |
---|---|---|
committer | Luis Osa <luis.osa.gdc@gmail.com> | 2019-02-07 22:47:44 +0100 |
commit | a70a0c121b8f154c8d9421789bbbe12a4f5ea738 (patch) | |
tree | af3b078c8694e1c459854df91dd831d77a5b848e | |
parent | 4050ee010f1117051936f274d6dff6ca0a4dc5db (diff) | |
download | geiser-guile-a70a0c121b8f154c8d9421789bbbe12a4f5ea738.tar.gz geiser-guile-a70a0c121b8f154c8d9421789bbbe12a4f5ea738.tar.bz2 |
Add geiser-chez-init-file
Add a new customization variable for an init file to be read on startup of a
Chez REPL, where user code can be defined. The usage is copied from the
equivalent Racket init file, to avoid an error if the file has not been created.
-rw-r--r-- | elisp/geiser-chez.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/elisp/geiser-chez.el b/elisp/geiser-chez.el index ff75e5a..c6f7130 100644 --- a/elisp/geiser-chez.el +++ b/elisp/geiser-chez.el @@ -32,6 +32,11 @@ :type '(choice string (repeat string)) :group 'geiser-chez) +(geiser-custom--defcustom geiser-chez-init-file "~/.chez-geiser" + "Initialization file with user code for the Chez REPL." + :type 'string + :group 'geiser-chez) + ;;; REPL support: @@ -43,7 +48,10 @@ (defun geiser-chez--parameters () "Return a list with all parameters needed to start Chez Scheme. This function uses `geiser-chez-init-file' if it exists." - `(,(expand-file-name "chez/geiser/geiser.ss" geiser-scheme-dir)) + (let ((init-file) (and (stringp geiser-chez-init-file) + (expand-file-name geiser-chez-init-file))) + `(,@(and init-file (file-readable-p init-file) (list init-file)) + ,(expand-file-name "chez/geiser/geiser.ss" geiser-scheme-dir))) ) (defconst geiser-chez--prompt-regexp "> ") |