Skip to content

Commit d18dd8d

Browse files
committed
[Fix #116] Set *inf-clojure* REPL type on detect
Now the code sets both buffer (the source and the REPL), when a REPL type is detected. This solves the weird errors that were happening when working off of the REPL buffer because inf-clojure-repl-type was always nil.
1 parent 8c27b06 commit d18dd8d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* [#83](https://github.com/clojure-emacs/inf-clojure/pull/85): No such namespace: complete.core in lumo REPL.
99
* [#93](https://github.com/clojure-emacs/inf-clojure/pull/93): Slow response from inf-clojure (completions, arglists, ...).
1010
* [#101](https://github.com/clojure-emacs/inf-clojure/pull/101): `inf-clojure-set-ns` hangs Emacs.
11+
* [#119](https://github.com/clojure-emacs/inf-clojure/pull/119): Repl buffer sometimes has different `inf-clojure-repl-type`.
1112

1213
### New Features
1314

inf-clojure.el

+4-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,10 @@ See http://blog.jorgenschaefer.de/2014/05/race-conditions-in-emacs-process-filte
293293
"Set the REPL type if has not already been set.
294294
It requires a REPL PROC for inspecting the correct type."
295295
(if (not inf-clojure-repl-type)
296-
(setq inf-clojure-repl-type (inf-clojure--detect-repl-type proc))
296+
(let ((detected-type (inf-clojure--detect-repl-type proc)))
297+
(with-current-buffer inf-clojure-buffer
298+
(setq inf-clojure-repl-type detected-type))
299+
(setq inf-clojure-repl-type detected-type))
297300
inf-clojure-repl-type))
298301

299302
(defun inf-clojure--single-linify (string)

0 commit comments

Comments
 (0)