From de45d9145db9983c27e0a0c44540c28ebeab5946 Mon Sep 17 00:00:00 2001 From: Sam Steingold Date: Wed, 18 May 2016 09:56:17 -0400 Subject: [PATCH] python-describe-at-point: add and bind --- lisp/progmodes/python.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 1e7a15d382..343023f7a0 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 -- 2.39.2