@@ -968,18 +968,15 @@ the `inf-clojure-prompt`."
968
968
; ; Collect the output
969
969
(set-buffer work-buffer)
970
970
(goto-char (point-min ))
971
- ; ; Skip past the command, if it was echoed
972
- (and (looking-at command)
973
- (forward-line ))
974
- (let* ((beg (if beg-string
975
- (progn (search-forward beg-string nil t ) (match-beginning 0 ))
976
- (point )))
977
- (end (if end-string
978
- (search-forward end-string nil t )
979
- (point-max )))
980
- (buffer-string (buffer-substring-no-properties beg end)))
981
- (when (and buffer-string (string-match inf-clojure-prompt buffer-string))
982
- (substring buffer-string 0 (match-beginning 0 )))))))
971
+ (let* ((beg (or (when (and beg-string (search-forward beg-string nil t ))
972
+ (match-beginning 0 ))
973
+ (point-min )))
974
+ (end (or (when end-string
975
+ (search-forward end-string nil t ))
976
+ (point-max )))
977
+ (prompt (when (search-forward inf-clojure-prompt nil t )
978
+ (match-beginning 0 ))))
979
+ (buffer-substring-no-properties beg (or prompt end))))))
983
980
984
981
(defun inf-clojure--nil-string-match-p (string )
985
982
" Return true iff STRING is not nil.
@@ -1028,7 +1025,7 @@ for evaluation, therefore FORM should not include it."
1028
1025
See variable `inf-clojure-arglists-form' ."
1029
1026
(thread-first
1030
1027
(format (inf-clojure-arglists-form) fn)
1031
- (inf-clojure--process-response (inf-clojure-proc))
1028
+ (inf-clojure--process-response (inf-clojure-proc) " ( " " ) " )
1032
1029
(inf-clojure--read-or-nil)
1033
1030
(inf-clojure--list-or-nil)))
1034
1031
@@ -1101,7 +1098,7 @@ See variable `inf-clojure-buffer'."
1101
1098
(when (not (string-blank-p expr))
1102
1099
(thread-first
1103
1100
(format (inf-clojure-completion-form) (substring-no-properties expr))
1104
- (inf-clojure--process-response (inf-clojure-proc))
1101
+ (inf-clojure--process-response (inf-clojure-proc) " ( " " ) " )
1105
1102
(inf-clojure--read-or-nil)
1106
1103
(inf-clojure--list-or-nil))))
1107
1104
0 commit comments