changeset 20458:ad0d2c5040a0

(comint-strip-ctrl-m): Don't die if comint-last-output-start does not point anywhere.
author Karl Heuer <kwzh@gnu.org>
date Thu, 11 Dec 1997 07:25:16 +0000
parents 05d34da4c50c
children 90f306f86f5d
files lisp/comint.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/comint.el	Thu Dec 11 07:24:47 1997 +0000
+++ b/lisp/comint.el	Thu Dec 11 07:25:16 1997 +0000
@@ -1386,8 +1386,10 @@
   (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))
+      (condition-case nil
+	  (goto-char
+	   (if (interactive-p) comint-last-input-end comint-last-output-start))
+	(error nil))
       (while (re-search-forward "\r+$" pmark t)
 	(replace-match "" t t)))))
 (defalias 'shell-strip-ctrl-m 'comint-strip-ctrl-m)