Function: smart-python-jedi-to-definition-p
smart-python-jedi-to-definition-p is a byte-compiled function defined
in hmouse-tag.el.
Signature
(smart-python-jedi-to-definition-p)
Documentation
If Jedi Python identifier server is running, use it to jump to the definition.
See https://tkf.github.io/emacs-jedi/latest/.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hmouse-tag.el
(defun smart-python-jedi-to-definition-p ()
"If Jedi Python identifier server is running, use it to jump to the definition.
See https://tkf.github.io/emacs-jedi/latest/."
;; Use functions from jedi-core.el only, not from jedi.el, since
;; company-jedi.el users will have loaded only jedi-core.el.
(when (and (featurep 'jedi-core) jedi-mode)
(let* ((servers (jedi:-get-servers-in-use))
(proc (epc:manager-server-process (car servers))))
(and servers (processp proc)
(eq 'run (process-status (process-buffer proc)))
;; The goto is performed asynchronously.
;; It reports in the minibuffer when a definition is not found.
;; !! TODO: Only works on tag at point, not the tagname passed in as jedi
;; does not accept a tag parameter.
;;
;; jedi:find-file-function is an RSW custom
;; modification that allows display-where to work;
;; otherwise, will just display in another window.
(let ((jedi:find-file-function #'smart-jedi-find-file))
(jedi:goto-definition hpath:display-where)
;; For use as a predicate, always return t if the Jedi server
;; is running so other lookup techniques are not tried.
t)))))