Commit bb55b64d authored by Richard M. Stallman's avatar Richard M. Stallman

(shell-strip-ctrl-m): Strip multiple ^Ms.

parent a07e7c4a
......@@ -810,12 +810,11 @@ Returns t if successful."
This function could be in the list `comint-output-filter-functions' or bound to
a key."
(interactive)
(let ((pmark (process-mark (get-buffer-process (current-buffer))))
(ctrl-m (concat (char-to-string 13) "$")))
(let ((pmark (process-mark (get-buffer-process (current-buffer)))))
(save-excursion
(goto-char
(if (interactive-p) comint-last-input-end comint-last-output-start))
(while (re-search-forward ctrl-m pmark t)
(while (re-search-forward "\r+$" pmark t)
(replace-match "" t t)))))
(provide 'shell)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment