changeset 73456:8ac53fe6c9dc

* emacs.py (eargs): Return expected _emacs_out string even if errors occur.
author Chong Yidong <cyd@stupidchicken.com>
date Sun, 22 Oct 2006 14:04:02 +0000
parents 12bc7c50359c
children 0c01ec806f3e
files etc/emacs.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/etc/emacs.py	Sun Oct 22 05:40:08 2006 +0000
+++ b/etc/emacs.py	Sun Oct 22 14:04:02 2006 +0000
@@ -59,13 +59,16 @@
 	    return
 	if inspect.ismethod (func):
 	    func = func.im_func
-	if not inspect.isfunction (func): return
+	if not inspect.isfunction (func):
+            print '_emacs_out '
+            return
 	(args, varargs, varkw, defaults) = inspect.getargspec (func)
 	# No space between name and arglist for consistency with builtins.
 	print '_emacs_out', \
 	    func.__name__ + inspect.formatargspec (args, varargs, varkw,
 						   defaults)
-    except: pass
+    except:
+	print "_emacs_out "
 
 def all_names (object):
     """Return (an approximation to) a list of all possible attribute