Skip to content

Instantly share code, notes, and snippets.


mori-dev/hoge.el Secret

Created Sep 29, 2010
What would you like to do?
(require 'python)
(require 'popup)
(defun py-doc-popup ()
"Get help() for object at point, and display it in a popup."
(when (buffer-live-p (get-buffer "*py-doc-popup*"))
(kill-buffer "*py-doc-popup*"))
(let ((symbol (with-syntax-table python-dotty-syntax-table (current-word)))
(docstr nil))
(if (equal symbol "") (error "No symbol"))
(with-current-buffer (get-buffer-create "*py-doc-popup*")
(format "emacs.ehelp(%S, %s)"
symbol python-imports) "*py-doc-popup*" (python-proc) nil t)
(setq docstr (buffer-substring-no-properties (point-min) (point-max)))) ;取れない
(popup-tip docstr)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment