mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-12 09:00:40 -08:00
Make `python-shell-send-string-no-output' delete trailing newlines from output.
This commit is contained in:
parent
291e2b939b
commit
c7815c384b
1 changed files with 8 additions and 10 deletions
|
|
@ -1467,16 +1467,14 @@ the output."
|
|||
"")))))
|
||||
(python-shell-send-string string process msg)
|
||||
(accept-process-output process)
|
||||
(mapconcat
|
||||
(lambda (string) string)
|
||||
(split-string
|
||||
output-buffer
|
||||
(if (> (length python-shell-prompt-output-regexp) 0)
|
||||
(format "\n*%s$\\|^%s"
|
||||
python-shell-prompt-regexp
|
||||
(or python-shell-prompt-output-regexp ""))
|
||||
(format "\n$\\|^%s"
|
||||
python-shell-prompt-regexp)) t) "\n")))
|
||||
(replace-regexp-in-string
|
||||
(if (> (length python-shell-prompt-output-regexp) 0)
|
||||
(format "\n*%s$\\|^%s\\|\n$"
|
||||
python-shell-prompt-regexp
|
||||
(or python-shell-prompt-output-regexp ""))
|
||||
(format "\n*$\\|^%s\\|\n$"
|
||||
python-shell-prompt-regexp))
|
||||
"" output-buffer)))
|
||||
|
||||
(defun python-shell-internal-send-string (string)
|
||||
"Send STRING to the Internal Python interpreter.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue