mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-24 14:30:43 -08:00
Eldoc integration is now compatible with python 3
This commit is contained in:
parent
ed0eb59464
commit
9e6629387d
1 changed files with 9 additions and 4 deletions
|
|
@ -1413,14 +1413,19 @@ Optional argument JUSTIFY defines if the paragraph should be justified."
|
|||
"def __PYDOC_get_help(obj):
|
||||
try:
|
||||
import pydoc
|
||||
obj = eval(obj, globals())
|
||||
return pydoc.getdoc(obj)
|
||||
if hasattr(obj, 'startswith'):
|
||||
obj = eval(obj, globals())
|
||||
doc = pydoc.getdoc(obj)
|
||||
except:
|
||||
return ''"
|
||||
doc = ''
|
||||
try:
|
||||
exec('print doc')
|
||||
except SyntaxError:
|
||||
print(doc)"
|
||||
"Python code to setup documentation retrieval.")
|
||||
|
||||
(defvar python-eldoc-string-code
|
||||
"print __PYDOC_get_help('''%s''')\n"
|
||||
"__PYDOC_get_help('''%s''')\n"
|
||||
"Python code used to get a string with the documentation of an object.")
|
||||
|
||||
(defun python-eldoc-setup ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue