summary refs log tree commit diff
path: root/emacs/guix-geiser.el
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2015-07-24 18:00:54 +0300
committerAlex Kost <alezost@gmail.com>2015-09-22 22:05:10 +0300
commitf80a7a6c58539bfdc73a45677fb414e0cae0faef (patch)
tree3435e66aeaa9eb6ae7f040c37b1ddbf25dd04cdd /emacs/guix-geiser.el
parentf029f8a759da6ad3624cfb6acee814e44534e3d4 (diff)
downloadguix-f80a7a6c58539bfdc73a45677fb414e0cae0faef.tar.gz
emacs: Add code to call guile procedures.
* emacs/guix-guile.el (guix-guile-make-call-expression): New function.
* emacs/guix-geiser.el: Require 'guix-guile'.
  (guix-geiser-call, guix-geiser-call-in-repl): New functions.
Diffstat (limited to 'emacs/guix-geiser.el')
-rw-r--r--emacs/guix-geiser.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/emacs/guix-geiser.el b/emacs/guix-geiser.el
index de139b72ff..eb449bcdb1 100644
--- a/emacs/guix-geiser.el
+++ b/emacs/guix-geiser.el
@@ -24,6 +24,7 @@
 ;;; Code:
 
 (require 'geiser-mode)
+(require 'guix-guile)
 
 (defun guix-geiser-repl ()
   "Return the current Geiser REPL."
@@ -79,6 +80,18 @@ If NO-DISPLAY is non-nil, do not switch to the REPL buffer."
     (unless no-display
       (geiser-repl--switch-to-buffer repl))))
 
+(defun guix-geiser-call (proc &rest args)
+  "Call (PROC ARGS ...) synchronously using the current Geiser REPL.
+PROC and ARGS should be strings."
+  (guix-geiser-eval
+   (apply #'guix-guile-make-call-expression proc args)))
+
+(defun guix-geiser-call-in-repl (proc &rest args)
+  "Call (PROC ARGS ...) in the current Geiser REPL.
+PROC and ARGS should be strings."
+  (guix-geiser-eval-in-repl
+   (apply #'guix-guile-make-call-expression proc args)))
+
 (provide 'guix-geiser)
 
 ;;; guix-geiser.el ends here