changeset 54886:476bf87a815c

(run-python): Fix use of \n. (python-load-file): Remove `try' from Python fragment. (python-describe-symbol): Fix message.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 14 Apr 2004 20:16:05 +0000
parents fabac80da5ce
children a19fbbfac280
files lisp/progmodes/python.el
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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))