summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuri Linkov <juri@jurta.org>2006-09-02 23:30:21 +0000
committerJuri Linkov <juri@jurta.org>2006-09-02 23:30:21 +0000
commit12fbde3dcfc09ee97bcde50fdefceb49da3dcee8 (patch)
tree3b18064bcb5a3dc0a3d7f8ae6c941fcff5a1de80
parent4ed9ce33d262390340fb5d5df903f585746723e0 (diff)
downloademacs-12fbde3dcfc09ee97bcde50fdefceb49da3dcee8.tar.gz
(shell-filter-ctrl-a-ctrl-b): Check if `comint-last-output-start' is
a marker by using `markerp' and check if it has a position by using `marker-position', and use this position for `goto-char'.
-rw-r--r--lisp/shell.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index 6a145ae1569..d4791821b5b 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -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 "")))))