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

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

[nongnu] elpa/inf-clojure 1392907 015/313: Add command clojure-show-ns-v


From: ELPA Syncer
Subject: [nongnu] elpa/inf-clojure 1392907 015/313: Add command clojure-show-ns-vars
Date: Wed, 11 Aug 2021 09:59:37 -0400 (EDT)

branch: elpa/inf-clojure
commit 13929077b74aa3d78c488fbdb722ca28f7bf3c63
Author: Bozhidar Batsov <bozhidar@batsov.com>
Commit: Bozhidar Batsov <bozhidar@batsov.com>

    Add command clojure-show-ns-vars
---
 inf-clojure.el | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/inf-clojure.el b/inf-clojure.el
index a6e5841..cfe7c4a 100644
--- a/inf-clojure.el
+++ b/inf-clojure.el
@@ -99,6 +99,7 @@ mode.  Default is whitespace followed by 0 or 1 single-letter 
colon-keyword
     (define-key map "\C-c\C-a" 'clojure-show-arglist)
     (define-key map "\C-c\C-v" 'clojure-show-var-documentation)
     (define-key map "\C-c\C-s" 'clojure-show-var-source)
+    (define-key map "\C-c\C-i" 'clojure-show-ns-vars)
     map))
 
 ;;;###autoload
@@ -396,6 +397,10 @@ Used by this command to determine defaults."
   "(complete.core/completions \"%s\")\n"
   "Command to query inferior Clojure for completion candidates.")
 
+(defvar clojure-ns-vars-command
+  "(clojure.repl/dir %s)\n"
+  "Command to show the public vars in a namespace.")
+
 ;;; Ancillary functions
 ;;; ===================
 
@@ -455,6 +460,12 @@ See variable `clojure-arglist-command'."
   (interactive (clojure-symprompt "Arglist" (clojure-fn-called-at-pt)))
   (comint-proc-query (inf-clojure-proc) (format clojure-arglist-command fn)))
 
+(defun clojure-show-ns-vars (ns)
+  "Send a query to the inferior Clojure for the public vars in NS.
+See variable `clojure-ns-vars-command'."
+  (interactive (clojure-symprompt "Ns vars" (clojure-find-ns)))
+  (comint-proc-query (inf-clojure-proc) (format clojure-ns-vars-command ns)))
+
 
 ;;  "Returns the current inferior Clojure process.
 ;; See variable `inf-clojure-buffer'."



reply via email to

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