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

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

[nongnu] elpa/geiser 74e4e87820 4/4: nit: skip eval requests of empty st


From: ELPA Syncer
Subject: [nongnu] elpa/geiser 74e4e87820 4/4: nit: skip eval requests of empty strings
Date: Thu, 20 Oct 2022 22:58:37 -0400 (EDT)

branch: elpa/geiser
commit 74e4e87820112ac94bac583ba154dc67bc017a42
Author: jao <jao@gnu.org>
Commit: jao <jao@gnu.org>

    nit: skip eval requests of empty strings
---
 elisp/geiser-connection.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/elisp/geiser-connection.el b/elisp/geiser-connection.el
index 268e123d8a..9dcc869957 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)



reply via email to

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