diff options
author | Karl Heuer <kwzh@gnu.org> | 1997-12-11 07:25:16 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1997-12-11 07:25:16 +0000 |
commit | 76779944c7d886cec932a5e9e6c17fbeefe333ba (patch) | |
tree | 8b2200c6cace1f3f1f5a250e777d56f490f403aa /lisp/comint.el | |
parent | 1b64c24409bfc71ff80494fa3510b4799910987c (diff) | |
download | emacs-76779944c7d886cec932a5e9e6c17fbeefe333ba.tar.gz |
(comint-strip-ctrl-m): Don't die if
comint-last-output-start does not point anywhere.
Diffstat (limited to 'lisp/comint.el')
-rw-r--r-- | lisp/comint.el | 6 |
1 files changed, 4 insertions, 2 deletions
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) |