]> git.eshelyaron.com Git - emacs.git/commitdiff
(shell-filter-ctrl-a-ctrl-b): Check if `comint-last-output-start' is
authorJuri Linkov <juri@jurta.org>
Sat, 2 Sep 2006 23:30:21 +0000 (23:30 +0000)
committerJuri Linkov <juri@jurta.org>
Sat, 2 Sep 2006 23:30:21 +0000 (23:30 +0000)
a marker by using `markerp' and check if it has a position by using
`marker-position', and use this position for `goto-char'.

lisp/shell.el

index 6a145ae1569a03cdeb32429fda90decbb7e141c9..d4791821b5bd5a2424942af83d81b0ee80220c13 100644 (file)
@@ -483,7 +483,9 @@ This function can be put on `comint-output-filter-functions'.
 The argument STRING is ignored."
   (let ((pmark (process-mark (get-buffer-process (current-buffer)))))
     (save-excursion
-      (goto-char (or comint-last-output-start (point-min)))
+      (goto-char (or (and (markerp comint-last-output-start)
+                         (marker-position comint-last-output-start))
+                    (point-min)))
       (while (re-search-forward "[\C-a\C-b]" pmark t)
         (replace-match "")))))