From 454d572cb79cb7119844a3fb30818a65257e7c7b Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 5 Nov 2006 17:26:45 +0000 Subject: [PATCH] (eargs) Provide eldoc message for builtin types. Make sure eargs always outputs sentinel, to avoid emacs freeze. --- etc/emacs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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): -- 2.39.2