aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2006-07-11 18:39:32 +0000
committerChong Yidong2006-07-11 18:39:32 +0000
commit0f7ea453189db2bf2d61302f2e9c234e5589f432 (patch)
treeb5a0ff3f405d3758d0a1ead04a95360fbd0897f6
parentce4746a36acbc91144f038c96c75f07b4165f403 (diff)
downloademacs-0f7ea453189db2bf2d61302f2e9c234e5589f432.tar.gz
emacs-0f7ea453189db2bf2d61302f2e9c234e5589f432.zip
* vc.el (vc-exec-after): Don't delete process manually.
(vc-print-log): Run log-view-mode in process sentinel inside inhibit-read-only. Don't shrink window due to timing issues.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/vc.el15
2 files changed, 12 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7bf32e705ae..bf2faf44f63 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
12006-07-11 Chong Yidong <cyd@stupidchicken.com> 12006-07-11 Chong Yidong <cyd@stupidchicken.com>
2 2
3 * vc.el (vc-exec-after): Don't delete process manually.
4 (vc-print-log): Run log-view-mode in process sentinel inside
5 inhibit-read-only. Don't shrink window due to timing issues.
6
3 * progmodes/ebrowse.el (ebrowse-display-member-buffer): Avoid 7 * progmodes/ebrowse.el (ebrowse-display-member-buffer): Avoid
4 using with-output-to-temp-buffer, which clobbers local vars. 8 using with-output-to-temp-buffer, which clobbers local vars.
5 9
diff --git a/lisp/vc.el b/lisp/vc.el
index 8290fd5b943..d72ee4c7e4e 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -934,11 +934,12 @@ Else, add CODE to the process' sentinel."
934 (let ((proc (get-buffer-process (current-buffer)))) 934 (let ((proc (get-buffer-process (current-buffer))))
935 (cond 935 (cond
936 ;; If there's no background process, just execute the code. 936 ;; If there's no background process, just execute the code.
937 ((null proc) (eval code)) 937 ;; We used to explicitly call delete-process on exited processes,
938 ;; If the background process has exited, reap it and try again 938 ;; but this led to timing problems causing process output to be
939 ((eq (process-status proc) 'exit) 939 ;; lost. Terminated processes get deleted automatically
940 (delete-process proc) 940 ;; anyway. -- cyd
941 (vc-exec-after code)) 941 ((or (null proc) (eq (process-status proc) 'exit))
942 (eval code))
942 ;; If a process is running, add CODE to the sentinel 943 ;; If a process is running, add CODE to the sentinel
943 ((eq (process-status proc) 'run) 944 ((eq (process-status proc) 'run)
944 (let ((sentinel (process-sentinel proc))) 945 (let ((sentinel (process-sentinel proc)))
@@ -2446,9 +2447,9 @@ If FOCUS-REV is non-nil, leave the point at that revision."
2446 (vc-call print-log file) 2447 (vc-call print-log file)
2447 (set-buffer "*vc*")))) 2448 (set-buffer "*vc*"))))
2448 (pop-to-buffer (current-buffer)) 2449 (pop-to-buffer (current-buffer))
2449 (log-view-mode)
2450 (vc-exec-after 2450 (vc-exec-after
2451 `(let ((inhibit-read-only t)) 2451 `(let ((inhibit-read-only t))
2452 (log-view-mode)
2452 (goto-char (point-max)) (forward-line -1) 2453 (goto-char (point-max)) (forward-line -1)
2453 (while (looking-at "=*\n") 2454 (while (looking-at "=*\n")
2454 (delete-char (- (match-end 0) (match-beginning 0))) 2455 (delete-char (- (match-end 0) (match-beginning 0)))
@@ -2456,7 +2457,7 @@ If FOCUS-REV is non-nil, leave the point at that revision."
2456 (goto-char (point-min)) 2457 (goto-char (point-min))
2457 (if (looking-at "[\b\t\n\v\f\r ]+") 2458 (if (looking-at "[\b\t\n\v\f\r ]+")
2458 (delete-char (- (match-end 0) (match-beginning 0)))) 2459 (delete-char (- (match-end 0) (match-beginning 0))))
2459 (shrink-window-if-larger-than-buffer) 2460 ;; (shrink-window-if-larger-than-buffer)
2460 ;; move point to the log entry for the current version 2461 ;; move point to the log entry for the current version
2461 (vc-call-backend ',(vc-backend file) 2462 (vc-call-backend ',(vc-backend file)
2462 'show-log-entry 2463 'show-log-entry