From 74e4e87820112ac94bac583ba154dc67bc017a42 Mon Sep 17 00:00:00 2001 From: jao Date: Fri, 21 Oct 2022 03:38:25 +0100 Subject: 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 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) -- cgit v1.2.3