File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -1175,15 +1175,24 @@ SOURCE."
11751175; ;;; Inspection
11761176
11771177; ; TODO: How to add hover documentation support
1178- (defun jupyter-inspect-at-point (&optional buffer detail )
1178+ (defun jupyter-inspect-at-point (&optional buffer detail interactive )
11791179 " Inspect the code at point.
11801180Call `jupyter-inspect' for the `jupyter-code-context' at point.
1181-
1182- BUFFER and DETAIL have the same meaning as in `jupyter-inspect' ."
1183- (interactive (list nil 0 ))
1184- (cl-destructuring-bind (code pos)
1185- (jupyter-code-context 'inspect )
1186- (jupyter-inspect code pos buffer detail)))
1181+ When called interactively with a non-nil prefix argument, read an
1182+ expression to inspect from the minibuffer instead.
1183+
1184+ BUFFER and DETAIL have the same meaning as in `jupyter-inspect' .
1185+ INTERACTIVE is an internal argument set when this function is
1186+ called interactively."
1187+ (interactive (list nil 0 t ))
1188+ (pcase
1189+ (if (and interactive current-prefix-arg)
1190+ (let ((code (jupyter-read-expression
1191+ (format " Inspect (%s ): " (jupyter-kernel-language)))))
1192+ (list code (length code)))
1193+ (jupyter-code-context 'inspect ))
1194+ (`(, code , pos )
1195+ (jupyter-inspect code pos buffer detail))))
11871196
11881197(cl-defgeneric jupyter-inspect (code &optional pos buffer detail)
11891198 " Inspect CODE.
You can’t perform that action at this time.
0 commit comments