[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
python-describe-symbol fix for python.el and emacs.py
From: |
Steven Huwig |
Subject: |
python-describe-symbol fix for python.el and emacs.py |
Date: |
Wed, 21 Sep 2005 20:46:13 -0400 |
Hello,
Using the copy of emacs.py I just pulled from CVS, the following
behavior occurs:
>>> from Tkinter import *
>>> emacs.ehelp("Frame")
no Python documentation found for 'Frame'
None
>>>
If you add the optional globals and locals parameters to the eval
call in emacs.ehelp(), and to the invoking python-describe-symbol
function in python.el, emacs.ehelp() will find the help in these cases.
Thanks,
Steven Huwig
--- python.el 27 Aug 2005 14:38:21 -0000 1.32
+++ python.el 12 Sep 2005 00:47:44 -0000
@@ -1341,7 +1341,7 @@
nil nil symbol))))
(if (equal symbol "") (error "No symbol"))
(let* ((func `(lambda ()
- (comint-redirect-send-command (format "emacs.ehelp(%
S)\n"
+ (comint-redirect-send-command (format "emacs.ehelp(%
S, globals(), locals())\n"
,symbol)
"*Help*" nil))))
;; Ensure we have a suitable help buffer.
--- emacs.py 24 Aug 2005 11:32:07 -0000 1.4
+++ emacs.py 12 Sep 2005 00:48:42 -0000
@@ -82,11 +82,11 @@
except:
print '_emacs_out ()'
-def ehelp (name):
+def ehelp (name, g, l):
"""Get help on string NAME.
First try to eval name for, e.g. user definitions where we need
the object. Otherwise try the string form."""
- try: help (eval (name))
+ try: help (eval (name, g, l))
except: help (name)
def eimport (mod, dir):
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- python-describe-symbol fix for python.el and emacs.py,
Steven Huwig <=