From: Karl Heuer Date: Thu, 11 Dec 1997 07:25:16 +0000 (+0000) Subject: (comint-strip-ctrl-m): Don't die if X-Git-Tag: emacs-20.3~2616 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=71a895c6096c20ae21322fb4e0fc5b2efae2039f;p=emacs.git (comint-strip-ctrl-m): Don't die if comint-last-output-start does not point anywhere. --- diff --git a/lisp/comint.el b/lisp/comint.el index 39a084f9cf3..8b18dedd30c 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1386,8 +1386,10 @@ This function could be on `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)) + (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)