From: Chong Yidong Date: Sun, 5 Nov 2006 17:26:45 +0000 (+0000) Subject: (eargs) Provide eldoc message for builtin types. X-Git-Tag: emacs-pretest-22.0.91~318 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=454d572cb79cb7119844a3fb30818a65257e7c7b;p=emacs.git (eargs) Provide eldoc message for builtin types. Make sure eargs always outputs sentinel, to avoid emacs freeze. --- diff --git a/etc/emacs.py b/etc/emacs.py index 57128e2e184..cc72233602f 100644 --- a/etc/emacs.py +++ b/etc/emacs.py @@ -50,11 +50,11 @@ def eargs (name, imports): 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: + else: print '_emacs_out', doc.split ('\n')[0] return if inspect.ismethod (func):