@@ -1220,25 +1220,25 @@ output from and including the `inf-clojure-prompt`."
1220
1220
(sanitized-command (inf-clojure--sanitize-command command)))
1221
1221
(when (not (string-empty-p sanitized-command))
1222
1222
(inf-clojure--log-string command " ----CMD->" )
1223
- (set- buffer (inf-clojure--get-redirect-buffer) )
1224
- (erase-buffer )
1225
- (comint-redirect-send-command-to-process sanitized-command redirect-buffer-name process nil t )
1223
+ (with-current- buffer (inf-clojure--get-redirect-buffer)
1224
+ (erase-buffer )
1225
+ (comint-redirect-send-command-to-process sanitized-command redirect-buffer-name process nil t ) )
1226
1226
; ; Wait for the process to complete
1227
- (set- buffer (process-buffer process) )
1228
- (while (and (null comint-redirect-completed)
1229
- (accept-process-output process 1 0 t ))
1230
- (sleep-for 0.01 ))
1227
+ (with-current- buffer (process-buffer process)
1228
+ (while (and (null comint-redirect-completed)
1229
+ (accept-process-output process 1 0 t ))
1230
+ (sleep-for 0.01 ) ))
1231
1231
; ; Collect the output
1232
- (set- buffer redirect-buffer-name)
1233
- (goto-char (point-min ))
1234
- (let* ((buffer-string (buffer-substring-no-properties (point-min ) (point-max )))
1235
- (boundaries (inf-clojure--string-boundaries buffer-string inf-clojure-prompt beg-regexp end-regexp))
1236
- (beg-pos (car boundaries))
1237
- (end-pos (car (cdr boundaries)))
1238
- (prompt-pos (car (cdr (cdr boundaries))))
1239
- (response-string (substring buffer-string beg-pos (min end-pos prompt-pos))))
1240
- (inf-clojure--log-string buffer-string " <-RES----" )
1241
- response-string))))
1232
+ (with-current- buffer redirect-buffer-name
1233
+ (goto-char (point-min ))
1234
+ (let* ((buffer-string (buffer-substring-no-properties (point-min ) (point-max )))
1235
+ (boundaries (inf-clojure--string-boundaries buffer-string inf-clojure-prompt beg-regexp end-regexp))
1236
+ (beg-pos (car boundaries))
1237
+ (end-pos (car (cdr boundaries)))
1238
+ (prompt-pos (car (cdr (cdr boundaries))))
1239
+ (response-string (substring buffer-string beg-pos (min end-pos prompt-pos))))
1240
+ (inf-clojure--log-string buffer-string " <-RES----" )
1241
+ response-string) ))))
1242
1242
1243
1243
(defun inf-clojure--nil-string-match-p (string )
1244
1244
" Return true iff STRING is not nil.
0 commit comments