Skip to content

Commit 4ab7851

Browse files
jjttjjbbatsov
authored andcommitted
Display message after setting repl
1 parent e5ce383 commit 4ab7851

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## master (unreleased)
44
* [#202](https://github.com/clojure-emacs/inf-clojure/issues/202): Add ClojureCLR support.
55
* [#204](https://github.com/clojure-emacs/inf-clojure/issues/204): Scroll repl buffer on insert commands
6+
* [#208](https://github.com/clojure-emacs/inf-clojure/pull/208) Display message after setting repl.
67

78

89
## 3.2.1 (2022-07-22)

inf-clojure.el

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -281,14 +281,17 @@ ALWAYS-ASK). Otherwise get a list of all active inf-clojure
281281
REPLS and offer a choice. It's recommended to rename REPL
282282
buffers after they are created with `rename-buffer'."
283283
(interactive "P")
284-
(if (and (not always-ask)
285-
(inf-clojure-repl-p))
286-
(setq inf-clojure-buffer (current-buffer))
287-
(let ((repl-buffers (inf-clojure-repls)))
288-
(if (> (length repl-buffers) 0)
289-
(when-let ((repl-buffer (completing-read "Select default REPL: " repl-buffers nil t)))
290-
(setq inf-clojure-buffer (get-buffer repl-buffer)))
291-
(user-error "No buffers have an inf-clojure process")))))
284+
(let ((new-repl-buffer
285+
(if (and (not always-ask)
286+
(inf-clojure-repl-p))
287+
(setq inf-clojure-buffer (current-buffer))
288+
(let ((repl-buffers (inf-clojure-repls)))
289+
(if (> (length repl-buffers) 0)
290+
(when-let ((repl-buffer (completing-read "Select default REPL: " repl-buffers nil t)))
291+
(setq inf-clojure-buffer (get-buffer repl-buffer)))
292+
(user-error "No buffers have an inf-clojure process"))))))
293+
(when new-repl-buffer
294+
(message "Current inf-clojure REPL set to %s" new-repl-buffer))))
292295

293296
(defvar inf-clojure--repl-type-lock nil
294297
"Global lock for protecting against proc filter race conditions.

0 commit comments

Comments
 (0)