emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/inf-clojure 5c8f590 179/313: [Fix #116] Set inf-clojure-bu


From: ELPA Syncer
Subject: [nongnu] elpa/inf-clojure 5c8f590 179/313: [Fix #116] Set inf-clojure-buffer REPL type on detect
Date: Wed, 11 Aug 2021 10:00:12 -0400 (EDT)

branch: elpa/inf-clojure
commit 5c8f590d5c741d28b99129478e136e398643d9a5
Author: Andrea Richiardi <a.richiardi.work@gmail.com>
Commit: Bozhidar Batsov <bozhidar.batsov@gmail.com>

    [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.
---
 CHANGELOG.md   | 1 +
 inf-clojure.el | 7 ++++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1eca521..da62ab5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@
 * [#83](https://github.com/clojure-emacs/inf-clojure/pull/85): No such 
namespace: complete.core in lumo REPL.
 * [#93](https://github.com/clojure-emacs/inf-clojure/pull/93): Slow response 
from inf-clojure (completions, arglists, ...).
 * [#101](https://github.com/clojure-emacs/inf-clojure/pull/101): 
`inf-clojure-set-ns` hangs Emacs.
+* [#119](https://github.com/clojure-emacs/inf-clojure/pull/119): Set 
inf-clojure-buffer REPL type on detect.
 * [#120](https://github.com/clojure-emacs/inf-clojure/pull/120): Send REPL 
string always, even if empty.
 
 ### New Features
diff --git a/inf-clojure.el b/inf-clojure.el
index ed6058e..c16f913 100644
--- a/inf-clojure.el
+++ b/inf-clojure.el
@@ -292,9 +292,10 @@ See 
http://blog.jorgenschaefer.de/2014/05/race-conditions-in-emacs-process-filte
 (defun inf-clojure--set-repl-type (proc)
   "Set the REPL type if has not already been set.
 It requires a REPL PROC for inspecting the correct type."
-  (if (not inf-clojure-repl-type)
-      (setq inf-clojure-repl-type (inf-clojure--detect-repl-type proc))
-    inf-clojure-repl-type))
+  (with-current-buffer inf-clojure-buffer
+    (if (not inf-clojure-repl-type)
+        (setq inf-clojure-repl-type (inf-clojure--detect-repl-type proc))
+      inf-clojure-repl-type)))
 
 (defun inf-clojure--single-linify (string)
   "Convert a multi-line STRING in a single-line STRING.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]