Skip to content

Commit 5c8f590

Browse files
arichiardibbatsov
authored andcommitted
[Fix #116] Set inf-clojure-buffer REPL type on detect
Now the code sets the inf-clojure-repl-type buffer local var in the inf-clojure-buffer when a REPL type is detected. This solves the weird errors that were happening when working within the REPL buffer because inf-clojure-repl-type is nil.
1 parent ae43e2e commit 5c8f590

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
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): Set inf-clojure-buffer REPL type on detect.
1112
* [#120](https://github.com/clojure-emacs/inf-clojure/pull/120): Send REPL string always, even if empty.
1213

1314
### New Features

inf-clojure.el

+4-3
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,10 @@ See http://blog.jorgenschaefer.de/2014/05/race-conditions-in-emacs-process-filte
292292
(defun inf-clojure--set-repl-type (proc)
293293
"Set the REPL type if has not already been set.
294294
It requires a REPL PROC for inspecting the correct type."
295-
(if (not inf-clojure-repl-type)
296-
(setq inf-clojure-repl-type (inf-clojure--detect-repl-type proc))
297-
inf-clojure-repl-type))
295+
(with-current-buffer inf-clojure-buffer
296+
(if (not inf-clojure-repl-type)
297+
(setq inf-clojure-repl-type (inf-clojure--detect-repl-type proc))
298+
inf-clojure-repl-type)))
298299

299300
(defun inf-clojure--single-linify (string)
300301
"Convert a multi-line STRING in a single-line STRING.

0 commit comments

Comments
 (0)