aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThien-Thi Nguyen2008-01-20 20:29:47 +0000
committerThien-Thi Nguyen2008-01-20 20:29:47 +0000
commit3c2e52cde9960da063b34e7c7abdd08969623f2f (patch)
treed7f53f18aabf085a27d69d682b497f91ccc3579b
parent5d7ba920f32752273262e7cdb521ba71aaf3d81e (diff)
downloademacs-3c2e52cde9960da063b34e7c7abdd08969623f2f.tar.gz
emacs-3c2e52cde9960da063b34e7c7abdd08969623f2f.zip
(vc-process-sentinel): Fix bug introduced in last change:
Set mode-line-process with P's buffer made temporarily current.
-rw-r--r--lisp/vc.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/vc.el b/lisp/vc.el
index 26cf32999b6..497ba1e0df4 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -958,13 +958,14 @@ BUF defaults to \"*vc*\", can be a string and will be created if necessary."
958(defvar vc-sentinel-movepoint) ;Dynamically scoped. 958(defvar vc-sentinel-movepoint) ;Dynamically scoped.
959 959
960(defun vc-process-sentinel (p s) 960(defun vc-process-sentinel (p s)
961 (let ((previous (process-get p 'vc-previous-sentinel))) 961 (with-current-buffer (process-buffer p)
962 (setq mode-line-process 962 (setq mode-line-process
963 (let ((status (process-status p))) 963 (let ((status (process-status p)))
964 ;; Leave mode-line uncluttered, normally. 964 ;; Leave mode-line uncluttered, normally.
965 ;; (Let known any weirdness in-form-ally. ;-) --ttn 965 ;; (Let known any weirdness in-form-ally. ;-) --ttn
966 (unless (eq 'exit status) 966 (unless (eq 'exit status)
967 (format " (%s)" status)))) 967 (format " (%s)" status)))))
968 (let ((previous (process-get p 'vc-previous-sentinel)))
968 (if previous (funcall previous p s)) 969 (if previous (funcall previous p s))
969 (with-current-buffer (process-buffer p) 970 (with-current-buffer (process-buffer p)
970 (let (vc-sentinel-movepoint) 971 (let (vc-sentinel-movepoint)