File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,14 @@ The page size can be also changed interactively within the inspector."
9696 (interactive )
9797 (cider-inspect-expr (cider-defun-at-point) (cider-current-ns)))
9898
99+ ;;;### autoload
100+ (defun cider-inspect-read-and-inspect ()
101+ " Read an expression from the minibuffer and inspect its result."
102+ (interactive )
103+ (when-let ((expression (cider-read-from-minibuffer " Inspect expression: "
104+ (cider-sexp-at-point))))
105+ (cider-inspect-expr expression (cider-current-ns))))
106+
99107;;;### autoload
100108(defun cider-inspect (&optional arg )
101109 " Inspect the result of the preceding sexp.
@@ -106,9 +114,7 @@ With a second prefix argument it prompts for an expression to eval and inspect."
106114 (pcase arg
107115 (1 (cider-inspect-last-sexp))
108116 (4 (cider-inspect-defun-at-point))
109- (16 (when-let ((expression (cider-read-from-minibuffer " Inspect expression: "
110- (cider-sexp-at-point))))
111- (cider-inspect-expr expression (cider-current-ns))))))
117+ (16 (cider-inspect-read-and-inspect))))
112118
113119; ; Operations
114120(defun cider-inspector--value-handler (_buffer value )
You can’t perform that action at this time.
0 commit comments