]> git.eshelyaron.com Git - emacs.git/commitdiff
* progmodes/python.el (python-shell-output-filter): Handle extra
authorFabián Ezequiel Gallina <fgallina@gnu.org>
Mon, 8 Oct 2012 21:51:02 +0000 (18:51 -0300)
committerFabián Ezequiel Gallina <fgallina@gnu.org>
Mon, 8 Oct 2012 21:51:02 +0000 (18:51 -0300)
carriage return in OSX.

Fixes: debbugs:12409
lisp/ChangeLog
lisp/progmodes/python.el

index 1d7d2af60c70da7897c4aed96f923f7812db00d1..d3275ce3671ee94b3d2d2b8ad90c4f5c63163f11 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-08  Fabián Ezequiel Gallina  <fgallina@cuca>
+
+       * progmodes/python.el (python-shell-output-filter): Handle extra
+       carriage return in OSX (Bug#12409).
+
 2012-10-08  Fabián Ezequiel Gallina  <fgallina@cuca>
 
        Fix shell handling of unbalanced quotes and parens in output.
index d35dbc69a48f5073c9ec02ed98a60c7d1349e630..018d6a7a1f21ae407e68a142781ffad1505065d7 100644 (file)
@@ -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)