diff options
| author | Juri Linkov | 2006-09-02 23:30:21 +0000 |
|---|---|---|
| committer | Juri Linkov | 2006-09-02 23:30:21 +0000 |
| commit | cc6e650ef588019f55df553efeae6b29de1fa9d8 (patch) | |
| tree | 6919992e8f60bcf9da62ccf2dd0c52f444661ae2 | |
| parent | 607acb9407127ed867f9bbb22706a9183766de24 (diff) | |
| download | emacs-cc6e650ef588019f55df553efeae6b29de1fa9d8.tar.gz emacs-cc6e650ef588019f55df553efeae6b29de1fa9d8.zip | |
(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.el | 4 |
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'. | |||
| 483 | The argument STRING is ignored." | 483 | The argument STRING is ignored." |
| 484 | (let ((pmark (process-mark (get-buffer-process (current-buffer))))) | 484 | (let ((pmark (process-mark (get-buffer-process (current-buffer))))) |
| 485 | (save-excursion | 485 | (save-excursion |
| 486 | (goto-char (or comint-last-output-start (point-min))) | 486 | (goto-char (or (and (markerp comint-last-output-start) |
| 487 | (marker-position comint-last-output-start)) | ||
| 488 | (point-min))) | ||
| 487 | (while (re-search-forward "[\C-a\C-b]" pmark t) | 489 | (while (re-search-forward "[\C-a\C-b]" pmark t) |
| 488 | (replace-match ""))))) | 490 | (replace-match ""))))) |
| 489 | 491 | ||