(vc-process-sentinel): After calling the
previous sentinel, do nothing if the process' buffer is not live.
This commit is contained in:
parent
040f578c57
commit
b49fd377e8
2 changed files with 37 additions and 29 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-01-21 Thien-Thi Nguyen <ttn@gnuvola.org>
|
||||
|
||||
* vc.el (vc-process-sentinel): After calling the previous
|
||||
sentinel, do nothing if the process' buffer is not live.
|
||||
|
||||
2008-01-21 Vinicius Jose Latorre <viniciusjl@ig.com.br>
|
||||
|
||||
* blank-mode.el: Fix a problem of cleaning blank faces when turning off
|
||||
|
|
15
lisp/vc.el
15
lisp/vc.el
|
@ -958,16 +958,19 @@ BUF defaults to \"*vc*\", can be a string and will be created if necessary."
|
|||
(defvar vc-sentinel-movepoint) ;Dynamically scoped.
|
||||
|
||||
(defun vc-process-sentinel (p s)
|
||||
(with-current-buffer (process-buffer p)
|
||||
(let ((previous (process-get p 'vc-previous-sentinel))
|
||||
(buf (process-buffer p)))
|
||||
(if previous (funcall previous p s))
|
||||
;; Impatient users sometime kill "slow" buffers; check liveness
|
||||
;; to avoid "error in process sentinel: Selecting deleted buffer".
|
||||
(when (buffer-live-p buf)
|
||||
(with-current-buffer buf
|
||||
(setq mode-line-process
|
||||
(let ((status (process-status p)))
|
||||
;; Leave mode-line uncluttered, normally.
|
||||
;; (Let known any weirdness in-form-ally. ;-) --ttn
|
||||
(unless (eq 'exit status)
|
||||
(format " (%s)" status)))))
|
||||
(let ((previous (process-get p 'vc-previous-sentinel)))
|
||||
(if previous (funcall previous p s))
|
||||
(with-current-buffer (process-buffer p)
|
||||
(format " (%s)" status))))
|
||||
(let (vc-sentinel-movepoint)
|
||||
;; Normally, we want async code such as sentinels to not move point.
|
||||
(save-excursion
|
||||
|
@ -987,7 +990,7 @@ BUF defaults to \"*vc*\", can be a string and will be created if necessary."
|
|||
(if (not win)
|
||||
(goto-char vc-sentinel-movepoint)
|
||||
(with-selected-window win
|
||||
(goto-char vc-sentinel-movepoint)))))))))
|
||||
(goto-char vc-sentinel-movepoint))))))))))
|
||||
|
||||
(defun vc-exec-after (code)
|
||||
"Eval CODE when the current buffer's process is done.
|
||||
|
|
Loading…
Add table
Reference in a new issue