diff options
| author | Chong Yidong | 2006-11-05 17:26:45 +0000 |
|---|---|---|
| committer | Chong Yidong | 2006-11-05 17:26:45 +0000 |
| commit | 454d572cb79cb7119844a3fb30818a65257e7c7b (patch) | |
| tree | 062985419c7ae388f7d42573c9bc20aa39803fa9 | |
| parent | 0b0cccd5ef869455d6c2c6cc7573552994db37b9 (diff) | |
| download | emacs-454d572cb79cb7119844a3fb30818a65257e7c7b.tar.gz emacs-454d572cb79cb7119844a3fb30818a65257e7c7b.zip | |
(eargs) Provide eldoc message for builtin types.
Make sure eargs always outputs sentinel, to avoid emacs freeze.
| -rw-r--r-- | etc/emacs.py | 4 |
1 files 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): | |||
| 50 | if len (parts) > 1: | 50 | if len (parts) > 1: |
| 51 | exec 'import ' + parts[0] # might fail | 51 | exec 'import ' + parts[0] # might fail |
| 52 | func = eval (name) | 52 | func = eval (name) |
| 53 | if inspect.isbuiltin (func): | 53 | if inspect.isbuiltin (func) or type(func) is type: |
| 54 | doc = func.__doc__ | 54 | doc = func.__doc__ |
| 55 | if doc.find (' ->') != -1: | 55 | if doc.find (' ->') != -1: |
| 56 | print '_emacs_out', doc.split (' ->')[0] | 56 | print '_emacs_out', doc.split (' ->')[0] |
| 57 | elif doc.find ('\n') != -1: | 57 | else: |
| 58 | print '_emacs_out', doc.split ('\n')[0] | 58 | print '_emacs_out', doc.split ('\n')[0] |
| 59 | return | 59 | return |
| 60 | if inspect.ismethod (func): | 60 | if inspect.ismethod (func): |