Skip to content

Commit d188986

Browse files
abo-abopapercatlol
authored andcommittedDec 5, 2024
le-lisp.el (lispy--eval-lisp): In case both out and val are empty, print ok
1 parent 7fe0803 commit d188986

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed
 

‎le-lisp.el

+5-6
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,11 @@
5151
(with-current-buffer (process-buffer (lispy--cl-process))
5252
(sly-eval `(slynk:eval-and-grab-output ,str)))
5353
(slime-eval `(swank:eval-and-grab-output ,str)))))
54-
(if (equal (car result) "")
55-
(cadr result)
56-
(concat (propertize (car result)
57-
'face 'font-lock-string-face)
58-
"\n\n"
59-
(cadr result)))))
54+
(pcase result
55+
(`("" "") "(ok)")
56+
(`("" ,val) val)
57+
(`(,out ,val)
58+
(concat (propertize (string-trim-left out) 'face 'font-lock-string-face) "\n\n" val)))))
6059

6160
(defun lispy--cl-process ()
6261
(unless (lispy--use-sly-p)

0 commit comments

Comments
 (0)
Please sign in to comment.