branch: elpa/inf-clojure
commit c71af21ae8e34e08640f02f95271bb37e054cce6
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>

    [Fix #143] Show arglists in the REPL buffer instead of minibuffer
    
    Make inf-clojure-show-arglists consistent with the other show-*
    commands by sending the arglists form to the REPL process.
---
 CHANGELOG.md   |  1 +
 inf-clojure.el | 15 +++++++--------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index c0da7862d9..53d5d6f75f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@
 
 - Unify `reload` and `reload-all` forms with `inf-clojure-repl-features`, 
enabling per-REPL-type dispatch. The standalone `inf-clojure-reload-form` and 
`inf-clojure-reload-all-form` defcustoms have been removed.
 - Deduplicate Clojure-family REPL feature definitions via a shared base alist.
+- [#143](https://github.com/clojure-emacs/inf-clojure/issues/143): 
`inf-clojure-show-arglists` now displays results in the REPL buffer instead of 
the minibuffer.
 
 ### Bugs fixed
 
diff --git a/inf-clojure.el b/inf-clojure.el
index 1fb83bec6d..2cc6a06364 100644
--- a/inf-clojure.el
+++ b/inf-clojure.el
@@ -1335,17 +1335,16 @@ See variable `inf-clojure-arglists-form'."
                   (inf-clojure--some))))
 
 (defun inf-clojure-show-arglists (prompt-for-symbol)
-  "Show the arglists for function FN in the mini-buffer.
-See variable `inf-clojure-arglists-form'.  When invoked with a
-prefix argument PROMPT-FOR-SYMBOL, it prompts for a symbol name."
+  "Send a command to the inferior Clojure to show arglists for FN.
+When invoked with a prefix argument PROMPT-FOR-SYMBOL, it prompts
+for a symbol name."
   (interactive "P")
-  (let* ((fn (if prompt-for-symbol
+  (let* ((proc (inf-clojure-proc))
+         (fn (if prompt-for-symbol
                  (car (inf-clojure-symprompt "Arglists" 
(inf-clojure-fn-called-at-pt)))
                (inf-clojure-fn-called-at-pt)))
-         (eldoc (inf-clojure-arglists fn)))
-    (if eldoc
-        (message "%s: %s" fn eldoc)
-      (message "Arglists not supported for this repl"))))
+         (arglists-form (inf-clojure-get-feature proc 'arglists)))
+    (inf-clojure--send-string proc (format arglists-form fn))))
 
 (defun inf-clojure-show-ns-vars (prompt-for-ns)
   "Send a query to the inferior Clojure for the public vars in NS.

Reply via email to