summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-05-22 00:51:36 +0000
committerRichard M. Stallman <rms@gnu.org>1994-05-22 00:51:36 +0000
commitbb55b64df0e836f7547c47c90377e394f86e59d4 (patch)
treed12a20efca33c5fda24c019f2ca4733df43d2e00 /lisp
parenta07e7c4a3aae9b287717777ec6476a88cb986a9b (diff)
downloademacs-bb55b64df0e836f7547c47c90377e394f86e59d4.tar.gz
(shell-strip-ctrl-m): Strip multiple ^Ms.
Diffstat (limited to 'lisp')
-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."
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)