From: Slawomir Nowaczyk <slawomir.nowaczyk.847@student.lu.se>
Subject: Patch: Python mode and eldoc "freeze"
Date: Fri, 03 Nov 2006 22:11:02 +0100 [thread overview]
Message-ID: <20061103215330.C1BA.SLAWOMIR.NOWACZYK.847@student.lu.se> (raw)
Hello,
I have sent patch below in response to bug report on emacs-pretest-bug,
but I am resending it here... It changes two things, first it adds eldoc
messages for some (built-in) types like open() or property() which were
missing previously (the bug report was about them).
Second, the patch prevents eldoc from freezing emacs when it tries to
get arglist for some more exotic built-ins ("basestring" being one
example).
While the first part could be seen, arguably, as a new feature, the
other is definitely a bugfix.
Can someone please install it?
**********************************************************************
--- EmacsCVS/etc/emacs.py 2006-10-26 23:25:56.225217600 +0200
+++ Emacs/etc/emacs.py 2006-11-01 00:13:29.307024000 +0100
@@ -50,12 +50,11 @@
if len (parts) > 1:
exec 'import ' + parts[0] # might fail
func = eval (name)
- if inspect.isbuiltin (func):
+ if inspect.isbuiltin (func) or type(func) is type:
doc = func.__doc__
if doc.find (' ->') != -1:
print '_emacs_out', doc.split (' ->')[0]
- elif doc.find ('\n') != -1:
- print '_emacs_out', doc.split ('\n')[0]
+ print '_emacs_out', doc.split ('\n')[0]
return
if inspect.ismethod (func):
func = func.im_func
**********************************************************************
Here is changelog entry:
2006-11-01 Slawomir Nowaczyk <slawek@cs.lth.se>
* emacs.py: (eargs) Provide eldoc message for builtin types.
Make sure eargs always outputs sentinel, to avoid emacs freeze.
**********************************************************************
--
Best wishes,
Slawomir Nowaczyk
( slawomir.nowaczyk.847@student.lu.se )
Power corrupts... absolute power is even more fun.
next reply other threads:[~2006-11-03 21:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-03 21:11 Slawomir Nowaczyk [this message]
2006-11-04 3:35 ` Patch: Python mode and eldoc "freeze" Chong Yidong
2006-11-04 10:55 ` Slawomir Nowaczyk
2006-11-05 17:28 ` Chong Yidong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061103215330.C1BA.SLAWOMIR.NOWACZYK.847@student.lu.se \
--to=slawomir.nowaczyk.847@student.lu.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).