aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-10-03 01:11:15 +0000
committerRichard M. Stallman1994-10-03 01:11:15 +0000
commitefcec33fd0f8c018229cf17dcacd5ab7857dcad6 (patch)
treeafbc9859050141f20567fac62ea879708231f8f0
parentd87146724c2444bfd9c2e7fdfb8c949e89e3c517 (diff)
downloademacs-efcec33fd0f8c018229cf17dcacd5ab7857dcad6.tar.gz
emacs-efcec33fd0f8c018229cf17dcacd5ab7857dcad6.zip
(comint-strip-ctrl-m): Renamed from shell-strip-crtl-m and moved here.
(shell-strip-ctrl-m): Add defalias.
-rw-r--r--lisp/comint.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index 44b885593e2..e3572ba4003 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1279,6 +1279,20 @@ This function should be in the list `comint-output-filter-functions'."
1279 nil t)) 1279 nil t))
1280 (set-buffer current)))) 1280 (set-buffer current))))
1281 1281
1282(defun comint-strip-ctrl-m (&optional string)
1283 "Strip trailing `^M' characters from the current output group.
1284
1285This function could be in the list `comint-output-filter-functions' or bound to
1286a key."
1287 (interactive)
1288 (let ((pmark (process-mark (get-buffer-process (current-buffer)))))
1289 (save-excursion
1290 (goto-char
1291 (if (interactive-p) comint-last-input-end comint-last-output-start))
1292 (while (re-search-forward "\r+$" pmark t)
1293 (replace-match "" t t)))))
1294(defalias 'shell-strip-ctrl-m 'comint-strip-ctrl-m)
1295
1282(defun comint-show-maximum-output () 1296(defun comint-show-maximum-output ()
1283 "Put the end of the buffer at the bottom of the window." 1297 "Put the end of the buffer at the bottom of the window."
1284 (interactive) 1298 (interactive)