Fix usage of built-in Python help() helper.
--- a/.emacs-my Tue Feb 16 21:52:27 2016 +0200
+++ b/.emacs-my Thu Feb 18 00:48:04 2016 +0200
@@ -2782,7 +2782,7 @@
(defvar my/python-eldoc-string-code "__PYDOC_get_full_help('''%s''')"
"Python code used to get a string with the documentation of an object.")
-(defvar my/python-eldoc-string-code2 "help('''%s''')"
+(defvar my/python-eldoc-string-code2 "help(%s); pass"
"Python code used to get a string with the documentation of an object.")
;; For built-in python.el
@@ -2827,12 +2827,12 @@
(format "Describe symbol (default %s): " symbol)
"Describe symbol: ")
nil nil symbol))))
- (let ( (python-eldoc-string-code my/python-eldoc-string-code2) )
+ (let ( )
(switch-to-buffer (get-buffer-create "*Python-doc*"))
(read-only-mode -1)
(buffer-disable-undo)
(erase-buffer)
- (insert (python-eldoc--get-doc-at-point symbol))
+ (insert (python-shell-send-string-no-output (format my/python-eldoc-string-code2 symbol) (python-shell-get-process)))
(goto-char (point-min))
(when (re-search-forward "^u?'" (line-end-position) t)
(replace-match ""))