From: Sam Steingold Date: Wed, 18 May 2016 13:56:17 +0000 (-0400) Subject: python-describe-at-point: add and bind X-Git-Tag: emacs-26.0.90~1930 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=de45d9145db9983c27e0a0c44540c28ebeab5946;p=emacs.git python-describe-at-point: add and bind --- diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 1e7a15d382a..343023f7a09 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -330,6 +330,7 @@ ;; Some util commands (define-key map "\C-c\C-v" 'python-check) (define-key map "\C-c\C-f" 'python-eldoc-at-point) + (define-key map "\C-c\C-d" 'python-describe-at-point) ;; Utilities (substitute-key-definition 'complete-symbol 'completion-at-point map global-map) @@ -4331,6 +4332,11 @@ Interactively, prompt for symbol." nil nil symbol)))) (message (python-eldoc--get-doc-at-point symbol))) +(defun python-describe-at-point (symbol process) + (interactive (list (python-info-current-symbol) + (python-shell-get-process))) + (comint-send-string process (concat "help('" symbol "')\n"))) + ;;; Hideshow