From: Slawomir Nowaczyk <slawomir.nowaczyk.847@student.lu.se>
Subject: Re: Patch: Python mode and eldoc "freeze"
Date: Sat, 04 Nov 2006 11:55:05 +0100 [thread overview]
Message-ID: <20061104113803.C1C4.SLAWOMIR.NOWACZYK.847@student.lu.se> (raw)
In-Reply-To: <87bqnn28be.fsf@stupidchicken.com>
On Fri, 03 Nov 2006 22:35:01 -0500
Chong Yidong <cyd@stupidchicken.com> wrote:
#> Slawomir Nowaczyk <slawomir.nowaczyk.847@student.lu.se> writes:
#>
#> > 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
#>
#> Won't this print _emacs_out twice?
Oops, sorry, it obviously will... thanks for noticing it. It's not a big
deal since code in python.el deals with it OK, but the patch below is
clearly better.
**********************************************************************
--- EmacsCVS/etc/emacs.py 2006-10-26 23:25:56.225217600 +0200
+++ Emacs/etc/emacs.py 2006-11-04 11:40:26.337289600 +0100
@@ -50,12 +50,12 @@
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]
+ else:
+ print '_emacs_out', doc.split ('\n')[0]
return
if inspect.ismethod (func):
func = func.im_func
**********************************************************************
Here is changelog entry:
2006-11-04 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 )
Lord, make my words as sweet as honey, for one day I may have to eat them.
next prev parent reply other threads:[~2006-11-04 10:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-03 21:11 Patch: Python mode and eldoc "freeze" Slawomir Nowaczyk
2006-11-04 3:35 ` Chong Yidong
2006-11-04 10:55 ` Slawomir Nowaczyk [this message]
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=20061104113803.C1C4.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).