]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/python.el
python-describe-at-point: add and bind
[gnu-emacs] / lisp / progmodes / python.el
index 1e7a15d382a15c5ab635b95b85b71d6b428d7456..343023f7a09fb05504b32c7f38e279f290598565 100644 (file)
     ;; 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")))
+
 \f
 ;;; Hideshow