]> git.eshelyaron.com Git - emacs.git/commitdiff
(comint-strip-ctrl-m): Don't die if
authorKarl Heuer <kwzh@gnu.org>
Thu, 11 Dec 1997 07:25:16 +0000 (07:25 +0000)
committerKarl Heuer <kwzh@gnu.org>
Thu, 11 Dec 1997 07:25:16 +0000 (07:25 +0000)
comint-last-output-start does not point anywhere.

lisp/comint.el

index 39a084f9cf370e059097ba18c882c6f6e05eda7e..8b18dedd30cf3aa8259c5c109eec12f6d73b654e 100644 (file)
@@ -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)