diff options
| author | Fabián Ezequiel Gallina | 2012-05-17 00:03:30 -0300 |
|---|---|---|
| committer | Fabián Ezequiel Gallina | 2012-05-17 00:03:30 -0300 |
| commit | c7815c384be68b5ec6fbf3207ec59eb45cb21896 (patch) | |
| tree | 6419b7a388e4a00cdc51437dd6b4dbcfc02d009c /lisp/progmodes/python.el | |
| parent | 291e2b939b2240a748a33f298cb6188de4c79f3b (diff) | |
| download | emacs-c7815c384be68b5ec6fbf3207ec59eb45cb21896.tar.gz emacs-c7815c384be68b5ec6fbf3207ec59eb45cb21896.zip | |
Make `python-shell-send-string-no-output' delete trailing newlines from output.
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index a2f1ed4e809..f75b5cb51ae 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -1467,16 +1467,14 @@ the output." | |||
| 1467 | ""))))) | 1467 | ""))))) |
| 1468 | (python-shell-send-string string process msg) | 1468 | (python-shell-send-string string process msg) |
| 1469 | (accept-process-output process) | 1469 | (accept-process-output process) |
| 1470 | (mapconcat | 1470 | (replace-regexp-in-string |
| 1471 | (lambda (string) string) | 1471 | (if (> (length python-shell-prompt-output-regexp) 0) |
| 1472 | (split-string | 1472 | (format "\n*%s$\\|^%s\\|\n$" |
| 1473 | output-buffer | 1473 | python-shell-prompt-regexp |
| 1474 | (if (> (length python-shell-prompt-output-regexp) 0) | 1474 | (or python-shell-prompt-output-regexp "")) |
| 1475 | (format "\n*%s$\\|^%s" | 1475 | (format "\n*$\\|^%s\\|\n$" |
| 1476 | python-shell-prompt-regexp | 1476 | python-shell-prompt-regexp)) |
| 1477 | (or python-shell-prompt-output-regexp "")) | 1477 | "" output-buffer))) |
| 1478 | (format "\n$\\|^%s" | ||
| 1479 | python-shell-prompt-regexp)) t) "\n"))) | ||
| 1480 | 1478 | ||
| 1481 | (defun python-shell-internal-send-string (string) | 1479 | (defun python-shell-internal-send-string (string) |
| 1482 | "Send STRING to the Internal Python interpreter. | 1480 | "Send STRING to the Internal Python interpreter. |