# HG changeset patch # User Richard M. Stallman # Date 781146675 0 # Node ID b2440a22efc20c6ff61f470f35f45fe1b32299c4 # Parent 853d760cba83f849223f9d98f657148a4b7aa252 (comint-strip-ctrl-m): Renamed from shell-strip-crtl-m and moved here. (shell-strip-ctrl-m): Add defalias. diff -r 853d760cba83 -r b2440a22efc2 lisp/comint.el --- a/lisp/comint.el Mon Oct 03 01:10:57 1994 +0000 +++ b/lisp/comint.el Mon Oct 03 01:11:15 1994 +0000 @@ -1279,6 +1279,20 @@ nil t)) (set-buffer current)))) +(defun comint-strip-ctrl-m (&optional string) + "Strip trailing `^M' characters from the current output group. + +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))))) + (save-excursion + (goto-char + (if (interactive-p) comint-last-input-end comint-last-output-start)) + (while (re-search-forward "\r+$" pmark t) + (replace-match "" t t))))) +(defalias 'shell-strip-ctrl-m 'comint-strip-ctrl-m) + (defun comint-show-maximum-output () "Put the end of the buffer at the bottom of the window." (interactive)