emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/geiser-guile a6dccbe 223/284: Guile: new option for loadin


From: Philip Kaludercic
Subject: [nongnu] elpa/geiser-guile a6dccbe 223/284: Guile: new option for loading ~/.guile (see issue #32681)
Date: Sun, 1 Aug 2021 18:29:49 -0400 (EDT)

branch: elpa/geiser-guile
commit a6dccbebde0fbc28f7fc0c2712467978dbc07857
Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>

    Guile: new option for loading ~/.guile (see issue #32681)
    
    The new custom variable, geiser-guile-load-init-file-p, will be gone
    once Guile adquires the ability to specify the path to its init file.
---
 elisp/geiser-guile.el | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el
index 4d7727c..169ac30 100644
--- a/elisp/geiser-guile.el
+++ b/elisp/geiser-guile.el
@@ -45,10 +45,20 @@ started."
   :group 'geiser-guile)
 
 (geiser-custom--defcustom geiser-guile-init-file "~/.guile-geiser"
-  "Initialization file with user code for the Guile REPL."
+  "Initialization file with user code for the Guile REPL.
+If all you want is to load ~/.guile, set
+`geiser-guile-load-init-file-p' instead."
   :type 'string
   :group 'geiser-guile)
 
+(geiser-custom--defcustom geiser-guile-load-init-file-p nil
+  "Whether to load ~/.guile when starting Guile.
+Note that, due to peculiarities in the way Guile loads its init
+file, using `geiser-guile-init-file' is not equivalent to setting
+this variable to t."
+  :type 'boolean
+  :group 'geiser-guile)
+
 (geiser-custom--defcustom geiser-guile-debug-show-bt-p nil
   "Whether to autmatically show a full backtrace when entering the debugger.
 If `nil', only the last frame is shown."
@@ -111,10 +121,12 @@ effect on new REPLs. For existing ones, use the command
   "Return a list with all parameters needed to start Guile.
 This function uses `geiser-guile-init-file' if it exists."
   (let ((init-file (and (stringp geiser-guile-init-file)
-                        (expand-file-name geiser-guile-init-file))))
+                        (expand-file-name geiser-guile-init-file)))
+        (q-flags (or geiser-guile-load-init-file-p '("-q"))))
   `(,@(and (listp geiser-guile-binary) (cdr geiser-guile-binary))
-    "-q" "-L" ,(expand-file-name "guile/" geiser-scheme-dir)
-    ,@(apply 'append (mapcar (lambda (p) (list "-L" p)) 
geiser-guile-load-path))
+    ,@q-flags "-L" ,(expand-file-name "guile/" geiser-scheme-dir)
+    ,@(apply 'append (mapcar (lambda (p) (list "-L" p))
+                             geiser-guile-load-path))
     ,@(and init-file (file-readable-p init-file) (list "-l" init-file)))))
 
 ;;(defconst geiser-guile--prompt-regexp "^[^() \n]+@([^)]*?)> ")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]