diff options
author | jao <jao@gnu.org> | 2022-10-21 03:38:25 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-10-21 03:38:25 +0100 |
commit | 74e4e87820112ac94bac583ba154dc67bc017a42 (patch) | |
tree | ddb3ab1024cc88fb4e8fcb8f51cc890b65c34952 /elisp/geiser-connection.el | |
parent | 578d112dd959f219d7182ecb184db7aed6d6f7dc (diff) | |
download | geiser-74e4e87820112ac94bac583ba154dc67bc017a42.tar.gz geiser-74e4e87820112ac94bac583ba154dc67bc017a42.tar.bz2 |
nit: skip eval requests of empty strings
Diffstat (limited to 'elisp/geiser-connection.el')
-rw-r--r-- | elisp/geiser-connection.el | 11 |
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) |