summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elisp/geiser-connection.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/elisp/geiser-connection.el b/elisp/geiser-connection.el
index 268e123..9dcc869 100644
--- a/elisp/geiser-connection.el
+++ b/elisp/geiser-connection.el
@@ -275,11 +275,12 @@
(error (geiser-con--request-deactivate req))))))
(defun geiser-con--send-string/wait (con str cont &optional timeout sbuf)
- (save-current-buffer
- (let ((proc (and con (geiser-con--connection-process con))))
- (unless proc (error "Geiser connection not active"))
- (let ((req (geiser-con--send-string con str cont sbuf)))
- (geiser-con--wait req timeout)))))
+ (when (and (stringp str) (not (string-blank-p str)))
+ (save-current-buffer
+ (let ((proc (and con (geiser-con--connection-process con))))
+ (unless proc (error "Geiser connection not active"))
+ (let ((req (geiser-con--send-string con str cont sbuf)))
+ (geiser-con--wait req timeout))))))
(provide 'geiser-connection)