# HG changeset patch # User Karl Heuer # Date 881825116 0 # Node ID ad0d2c5040a014cabcd39088bae2bf23874ab5b1 # Parent 05d34da4c50cf4e92a44721e19057b9b3a3a459d (comint-strip-ctrl-m): Don't die if comint-last-output-start does not point anywhere. diff -r 05d34da4c50c -r ad0d2c5040a0 lisp/comint.el --- 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)