Skip to content

Commit 896edd1

Browse files
arichiardibbatsov
authored andcommitted
Handle inf-clojure-arglists corner cases
1 parent db9e985 commit 896edd1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

inf-clojure.el

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -929,8 +929,12 @@ the results buffer. It cuts out the output from
929929
(defun inf-clojure-arglists (fn)
930930
"Send a query to the inferior Clojure for the arglists for function FN.
931931
See variable `inf-clojure-arglists-form'."
932-
(let ((eldoc-snippet (format (inf-clojure-arglists-form) fn)))
933-
(inf-clojure-results-from-process (inf-clojure-proc) eldoc-snippet)))
932+
(let* ((arglists-snippet (format (inf-clojure-arglists-form) fn))
933+
(arglists-result (inf-clojure-results-from-process (inf-clojure-proc) arglists-snippet))
934+
(arglists-data (read arglists-result)))
935+
(cond
936+
((null arglists-data) nil)
937+
((listp arglists-data) (string-trim (inf-clojure--single-linify arglists-result))))))
934938

935939
(defun inf-clojure-show-arglists (prompt-for-symbol)
936940
"Show the arglists for function FN in the mini-buffer.

0 commit comments

Comments
 (0)