Skip to content

[Fix #96] Use inf-clojure--send-string instead of comint-proc-query #101

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* [#79](https://github.com/clojure-emacs/inf-clojure/pull/82): Eldoc error when running boot repl.
* [#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.

## 2.0.1 (2017-05-18)

Expand Down
10 changes: 5 additions & 5 deletions inf-clojure.el
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ prefix argument PROMPT-FOR-SYMBOL, it prompts for a symbol name."
(let ((var (if prompt-for-symbol
(car (inf-clojure-symprompt "Var doc" (inf-clojure-symbol-at-point)))
(inf-clojure-symbol-at-point))))
(comint-proc-query (inf-clojure-proc) (format (inf-clojure-var-doc-form) var))))
(inf-clojure--send-string (inf-clojure-proc) (format (inf-clojure-var-doc-form) var))))

(defun inf-clojure-show-var-source (prompt-for-symbol)
"Send a command to the inferior Clojure to give source for VAR.
Expand All @@ -942,7 +942,7 @@ prefix argument PROMPT-FOR-SYMBOL, it prompts for a symbol name."
(let ((var (if prompt-for-symbol
(car (inf-clojure-symprompt "Var source" (inf-clojure-symbol-at-point)))
(inf-clojure-symbol-at-point))))
(comint-proc-query (inf-clojure-proc) (format (inf-clojure-var-source-form) var))))
(inf-clojure--send-string (inf-clojure-proc) (format (inf-clojure-var-source-form) var))))

;;;; Response parsing
;;;; ================
Expand Down Expand Up @@ -1097,7 +1097,7 @@ prefix argument PROMPT-FOR-NS, it prompts for a namespace name."
(let ((ns (if prompt-for-ns
(car (inf-clojure-symprompt "Ns vars" (clojure-find-ns)))
(clojure-find-ns))))
(comint-proc-query (inf-clojure-proc) (format (inf-clojure-ns-vars-form) ns))))
(inf-clojure--send-string (inf-clojure-proc) (format (inf-clojure-ns-vars-form) ns))))

(defun inf-clojure-set-ns (prompt-for-ns)
"Set the ns of the inferior Clojure process to NS.
Expand All @@ -1110,13 +1110,13 @@ PROMPT-FOR-NS, it prompts for a namespace name."
(clojure-find-ns))))
(when (or (not ns) (equal ns ""))
(user-error "No namespace selected"))
(comint-proc-query (inf-clojure-proc) (format (inf-clojure-set-ns-form) ns))))
(inf-clojure--send-string (inf-clojure-proc) (format (inf-clojure-set-ns-form) ns))))

(defun inf-clojure-apropos (var)
"Send a form to the inferior Clojure to give apropos for VAR.
See variable `inf-clojure-apropos-form'."
(interactive (inf-clojure-symprompt "Var apropos" (inf-clojure-symbol-at-point)))
(comint-proc-query (inf-clojure-proc) (format (inf-clojure-apropos-form) var)))
(inf-clojure--send-string (inf-clojure-proc) (format (inf-clojure-apropos-form) var)))

(defun inf-clojure-macroexpand (&optional macro-1)
"Send a form to the inferior Clojure to give apropos for VAR.
Expand Down