1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00

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

This commit is contained in:
Richard M. Stallman 1994-05-22 00:51:36 +00:00
parent a07e7c4a3a
commit bb55b64df0

View File

@ -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)