aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-05-22 00:51:36 +0000
committerRichard M. Stallman1994-05-22 00:51:36 +0000
commitbb55b64df0e836f7547c47c90377e394f86e59d4 (patch)
treed12a20efca33c5fda24c019f2ca4733df43d2e00
parenta07e7c4a3aae9b287717777ec6476a88cb986a9b (diff)
downloademacs-bb55b64df0e836f7547c47c90377e394f86e59d4.tar.gz
emacs-bb55b64df0e836f7547c47c90377e394f86e59d4.zip
(shell-strip-ctrl-m): Strip multiple ^Ms.
-rw-r--r--lisp/shell.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index c7beee72b99..85db10b4fd7 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -810,12 +810,11 @@ Returns t if successful."
810This function could be in the list `comint-output-filter-functions' or bound to 810This function could be in the list `comint-output-filter-functions' or bound to
811a key." 811a key."
812 (interactive) 812 (interactive)
813 (let ((pmark (process-mark (get-buffer-process (current-buffer)))) 813 (let ((pmark (process-mark (get-buffer-process (current-buffer)))))
814 (ctrl-m (concat (char-to-string 13) "$")))
815 (save-excursion 814 (save-excursion
816 (goto-char 815 (goto-char
817 (if (interactive-p) comint-last-input-end comint-last-output-start)) 816 (if (interactive-p) comint-last-input-end comint-last-output-start))
818 (while (re-search-forward ctrl-m pmark t) 817 (while (re-search-forward "\r+$" pmark t)
819 (replace-match "" t t))))) 818 (replace-match "" t t)))))
820 819
821(provide 'shell) 820(provide 'shell)