diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2004-04-14 20:16:05 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2004-04-14 20:16:05 +0000 |
commit | 32efc702b311abc93b94630c4f48a38221413aef (patch) | |
tree | 8cabd025a15800ac10f106ead1fc01aa43b03122 | |
parent | f8295bfb6c87b708b970ad1064b181e83f9ccd9f (diff) | |
download | emacs-32efc702b311abc93b94630c4f48a38221413aef.tar.gz |
(run-python): Fix use of \n.
(python-load-file): Remove `try' from Python fragment.
(python-describe-symbol): Fix message.
-rw-r--r-- | lisp/progmodes/python.el | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 5ca1277a994..f0e9fe8ed6e 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1117,8 +1117,8 @@ def _emacs_args (name): # get arglist of name for eldoc &c 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 @@ module-qualified names." (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 @@ Interactively, prompt for symbol." (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)) |