aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2006-10-22 14:04:02 +0000
committerChong Yidong2006-10-22 14:04:02 +0000
commit57d8692df7ccdf19339b4244edda29c309c65255 (patch)
treeb407ef20045ad39c9db7743e2668ba75570a3257
parenteb036ad0e2d3ec97b482f402c4fac31f4f8f8e39 (diff)
downloademacs-57d8692df7ccdf19339b4244edda29c309c65255.tar.gz
emacs-57d8692df7ccdf19339b4244edda29c309c65255.zip
* emacs.py (eargs): Return expected _emacs_out string even if
errors occur.
-rw-r--r--etc/emacs.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/etc/emacs.py b/etc/emacs.py
index 7614f0927df..57128e2e184 100644
--- a/etc/emacs.py
+++ b/etc/emacs.py
@@ -59,13 +59,16 @@ def eargs (name, imports):
59 return 59 return
60 if inspect.ismethod (func): 60 if inspect.ismethod (func):
61 func = func.im_func 61 func = func.im_func
62 if not inspect.isfunction (func): return 62 if not inspect.isfunction (func):
63 print '_emacs_out '
64 return
63 (args, varargs, varkw, defaults) = inspect.getargspec (func) 65 (args, varargs, varkw, defaults) = inspect.getargspec (func)
64 # No space between name and arglist for consistency with builtins. 66 # No space between name and arglist for consistency with builtins.
65 print '_emacs_out', \ 67 print '_emacs_out', \
66 func.__name__ + inspect.formatargspec (args, varargs, varkw, 68 func.__name__ + inspect.formatargspec (args, varargs, varkw,
67 defaults) 69 defaults)
68 except: pass 70 except:
71 print "_emacs_out "
69 72
70def all_names (object): 73def all_names (object):
71 """Return (an approximation to) a list of all possible attribute 74 """Return (an approximation to) a list of all possible attribute