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