From: Fabián Ezequiel Gallina Date: Mon, 8 Oct 2012 21:51:02 +0000 (-0300) Subject: * progmodes/python.el (python-shell-output-filter): Handle extra X-Git-Tag: emacs-24.2.90~237^2~32 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=51867ae22506264c0893b5e1a9ec7967157b6d96;p=emacs.git * progmodes/python.el (python-shell-output-filter): Handle extra carriage return in OSX. Fixes: debbugs:12409 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1d7d2af60c7..d3275ce3671 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-10-08 Fabián Ezequiel Gallina + + * progmodes/python.el (python-shell-output-filter): Handle extra + carriage return in OSX (Bug#12409). + 2012-10-08 Fabián Ezequiel Gallina Fix shell handling of unbalanced quotes and parens in output. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index d35dbc69a48..018d6a7a1f2 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1866,7 +1866,9 @@ detecting a prompt at the end of the buffer." python-shell-output-filter-buffer (concat python-shell-output-filter-buffer string)) (when (string-match - (format "\n\\(?:%s\\|%s\\|%s\\)$" + ;; XXX: It seems on OSX an extra carriage return is attached + ;; at the end of output, this handles that too. + (format "\r?\n\\(?:%s\\|%s\\|%s\\)$" python-shell-prompt-regexp python-shell-prompt-block-regexp python-shell-prompt-pdb-regexp)