]> git.eshelyaron.com Git - emacs.git/commitdiff
(eargs) Provide eldoc message for builtin types.
authorChong Yidong <cyd@stupidchicken.com>
Sun, 5 Nov 2006 17:26:45 +0000 (17:26 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Sun, 5 Nov 2006 17:26:45 +0000 (17:26 +0000)
Make sure eargs always outputs sentinel, to avoid emacs freeze.

etc/emacs.py

index 57128e2e184fce0f8d0e795d522ce2e91b79448e..cc72233602fc1d5f902a9e15c16907f26d584e3c 100644 (file)
@@ -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):