[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-guile 8552404 176/284: Guile: using meta-commands t
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-guile 8552404 176/284: Guile: using meta-commands to talk with Guile |
Date: |
Sun, 1 Aug 2021 18:29:40 -0400 (EDT) |
branch: elpa/geiser-guile
commit 855240471c4d479c7770db599db8cbe7d225de3a
Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>
Guile: using meta-commands to talk with Guile
---
elisp/geiser-guile.el | 31 ++++++++++++++++++++-----------
1 file changed, 20 insertions(+), 11 deletions(-)
diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el
index 3e1c03f..e07fb1b 100644
--- a/elisp/geiser-guile.el
+++ b/elisp/geiser-guile.el
@@ -113,17 +113,25 @@ This function uses `geiser-guile-init-file' if it exists."
;;; Evaluation support:
+(defun geiser-guile--linearize (str)
+ (if (string-match "\n" str)
+ (with-temp-buffer
+ (insert str)
+ (subst-char-in-region (point-min) (point-max) ?\n ? t)
+ (buffer-string))
+ str))
+
+(defsubst geiser-guile--linearize-args (args)
+ (mapconcat 'geiser-guile--linearize args " "))
(defun geiser-guile--geiser-procedure (proc &rest args)
(case proc
- ((eval compile) (format "((@ (geiser emacs) ge:compile) '%s '%s)"
- (mapconcat 'identity (cdr args) " ")
- (or (car args) "#f")))
- ((load-file compile-file)
- (format "((@ (geiser emacs) ge:%s) %s)" proc (car args)))
- ((no-values) "((@ (guile) values))")
- (t (format "(apply (@ (geiser emacs) ge:%s) (list %s))"
- proc (mapconcat 'identity args "")))))
+ ((eval compile) (format ",geiser-eval %s %s"
+ (or (car args) "#f")
+ (geiser-guile--linearize-args (cdr args))))
+ ((load-file compile-file) (format ",geiser-load-file %s" (car args)))
+ ((no-values) ",geiser-no-values")
+ (t (format "ge:%s %s" proc (geiser-guile--linearize-args args)))))
(defconst geiser-guile--module-re
"(define-module +\\(([^)]+)\\)")
@@ -247,9 +255,10 @@ it spawn a server thread."
(font-lock-add-keywords nil
`((,geiser-guile--path-rx 1
compilation-error-face)))
- (geiser-eval--send/result
- `(:scm ,(format "(set! %%load-path (cons %S %%load-path))"
- (expand-file-name "guile/" geiser-scheme-dir))))
+ (geiser-eval--send/wait
+ (format "(set! %%load-path (cons %S %%load-path))"
+ (expand-file-name "guile/" geiser-scheme-dir)))
+ (geiser-eval--send/wait ",use (geiser emacs)")
(geiser-guile-update-warning-level))
- [nongnu] elpa/geiser-guile 11c2d58 138/284: Guile: excluding anonymous module names from completion., (continued)
- [nongnu] elpa/geiser-guile 11c2d58 138/284: Guile: excluding anonymous module names from completion., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 1c9457a 116/284: Guile: heuristically resolving relative paths in REPL errors., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile f1ac35f 140/284: Guile: filtering gensym names in autodoc display., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 6baa7d3 124/284: Guile: better stack trace limits during evaluation., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 14c1689 132/284: Guile: no more module loading under the rug., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile e43cfa8 121/284: Guile: evaluation fixes (current git head)., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile d41ac93 123/284: Debugging leftover., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 6907aea 145/284: Guile: geiser commands working at the debugging prompt., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 1178462 155/284: Guile: show error message upon entering the debugger, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile d1d05b7 175/284: Guile: using the new syntax for sending eval requests, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 8552404 176/284: Guile: using meta-commands to talk with Guile,
Philip Kaludercic <=
- [nongnu] elpa/geiser-guile 1a35206 150/284: More docs., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile e2e3a0d 151/284: Redisplaying the prompt after empty lines on the REPL., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 640e9bc 125/284: Guile: fix for macroexpand., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 855f6f2 153/284: Guile: fix for import module REPL command, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 19ed2c0 157/284: Guile: don't create empty modules before loading them, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 480767e 162/284: Guile: geiser-guile-jump-on-debug-p, geiser-guile-show-debug-help-p, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile b95b487 165/284: Guile: fix bug in error display, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 30c656f 061/284: Support for multiple Scheme implementations, Chapter 1., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 28722c0 068/284: Bug fix: really remove killed buffers from the list of closed repls., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 1c50bcb 072/284: Improvements to module name support (using prefixes) and Guile support., Philip Kaludercic, 2021/08/01