Mercurial > emacs
comparison lisp/shell.el @ 72621:82f0fddf878e
(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'.
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Sat, 02 Sep 2006 23:30:21 +0000 |
parents | dd41b3cb7611 |
children | 2b23d84b802a c358d0861b16 |
comparison
equal
deleted
inserted
replaced
72620:70dd4b1e1daf | 72621:82f0fddf878e |
---|---|
481 | 481 |
482 This function can be put on `comint-output-filter-functions'. | 482 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 |
490 (defun shell-write-history-on-exit (process event) | 492 (defun shell-write-history-on-exit (process event) |
491 "Called when the shell process is stopped. | 493 "Called when the shell process is stopped. |