# HG changeset patch # User Stefan Monnier # Date 1081973765 0 # Node ID 476bf87a815cdc3b40a5ade9df5ee0433e48d052 # Parent fabac80da5cead61815e1606e067d6d174444a21 (run-python): Fix use of \n. (python-load-file): Remove `try' from Python fragment. (python-describe-symbol): Fix message. diff -r fabac80da5ce -r 476bf87a815c lisp/progmodes/python.el --- a/lisp/progmodes/python.el Wed Apr 14 20:06:29 2004 +0000 +++ b/lisp/progmodes/python.el Wed Apr 14 20:16:05 2004 +0000 @@ -1117,8 +1117,8 @@ doc = func.__doc__ if doc.find (' ->') != -1: print '_emacs_out', doc.split (' ->')[0] - elif doc.find ('\n') != -1: - print '_emacs_out', doc.split ('\n')[0] + elif doc.find ('\\n') != -1: + print '_emacs_out', doc.split ('\\n')[0] return None if inspect.ismethod (func): func = func.im_func if not inspect.isfunction (func): @@ -1247,10 +1247,8 @@ (set (make-local-variable 'python-orig-file) nil) (set (make-local-variable 'python-orig-start-line) nil) (format "\ -try: - if globals().has_key(%S): reload(%s) - else: import %s -except: None +if globals().has_key(%S): reload(%s) +else: import %s " module module module)) (set (make-local-variable 'python-orig-file) file-name) (set (make-local-variable 'python-orig-start-line) 1) @@ -1289,7 +1287,7 @@ (enable-recursive-minibuffers t) val) (setq val (read-string (if symbol - (format "Describe variable (default %s): " + (format "Describe symbol (default %s): " symbol) "Describe symbol: ") nil nil symbol))