Commit 9ae5396b authored by Fabián Ezequiel Gallina's avatar Fabián Ezequiel Gallina
Browse files

Eldoc setup code enhancements

Fixes: debbugs:18962

* lisp/progmodes/python.el (python-eldoc-setup-code): Enhance string
type checks, simplify printing.
parent 5fa7b718
2014-11-15 Fabián Ezequiel Gallina <fgallina@gnu.org>
* progmodes/python.el (python-eldoc-setup-code): Enhance string
type checks, simplify printing. (Bug#18962)
2014-11-14 Ivan Andrus <darthandrus@gmail.com>
* progmodes/python.el (python-shell-font-lock-kill-buffer):
......
......@@ -3546,7 +3546,11 @@ See `python-check-command' for the default."
"def __PYDOC_get_help(obj):
try:
import inspect
if hasattr(obj, 'startswith'):
try:
str_type = basestring
except NameError:
str_type = str
if isinstance(obj, str_type):
obj = eval(obj, globals())
doc = inspect.getdoc(obj)
if not doc and callable(obj):
......@@ -3569,10 +3573,7 @@ See `python-check-command' for the default."
doc = doc.splitlines()[0]
except:
doc = ''
try:
exec('print doc')
except SyntaxError:
print(doc)"
print (doc)"
"Python code to setup documentation retrieval."
:type 'string
:group 'python)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment