-
-
Notifications
You must be signed in to change notification settings - Fork 45
Display message after setting repl #208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -283,12 +283,15 @@ buffers after they are created with `rename-buffer'." | |
(interactive "P") | ||
(if (and (not always-ask) | ||
(inf-clojure-repl-p)) | ||
(setq inf-clojure-buffer (current-buffer)) | ||
(progn | ||
(setq inf-clojure-buffer (current-buffer)) | ||
(message "Current inf-clojure REPL set to %s" inf-clojure-buffer)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To reduce this message duplication you can just return the new-repl buffer at the end and set it outside the |
||
(let ((repl-buffers (inf-clojure-repls))) | ||
(if (> (length repl-buffers) 0) | ||
(when-let ((repl-buffer (completing-read "Select default REPL: " repl-buffers nil t))) | ||
(setq inf-clojure-buffer (get-buffer repl-buffer))) | ||
(user-error "No buffers have an inf-clojure process"))))) | ||
(if (> (length repl-buffers) 0) | ||
(when-let ((repl-buffer (completing-read "Select default REPL: " repl-buffers nil t))) | ||
(setq inf-clojure-buffer (get-buffer repl-buffer)) | ||
(message "Current inf-clojure REPL set to %s" inf-clojure-buffer)) | ||
(user-error "No buffers have an inf-clojure process"))))) | ||
|
||
(defvar inf-clojure--repl-type-lock nil | ||
"Global lock for protecting against proc filter race conditions. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The nest ifs make it a bit hard to follow the code, so some comments at the beginning of each branch might be useful.