Skip to content

Commit 22f80c4

Browse files
committed
[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 8c27b06 commit 22f80c4

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
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): Send REPL string always, even if empty.
1112

1213
### New Features
1314

inf-clojure.el

Lines changed: 4 additions & 3 deletions
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)