[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

VC's handling of windows, esp. w.r.t annotate

From: Stefan Monnier
Subject: VC's handling of windows, esp. w.r.t annotate
Date: Tue, 11 Apr 2006 16:39:33 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Any objection to the patch below?

One of the reasons for the first change is that when you use
vc-annotate-warp-version, you don't want it to pop up the original
unannotated source buffer, not even temporarily.


2006-04-11  Stefan Monnier  <address@hidden>

        * vc.el (vc-ensure-vc-buffer): Only change current-buffer, not the
        window configuration.
        (vc-annotate-display-select): Select the buffer so that current-buffer
        (and selected-window) is the output buffer at the end of vc-annotate.

Index: lisp/vc.el
RCS file: /sources/emacs/emacs/lisp/vc.el,v
retrieving revision 1.414
diff -u -r1.414 vc.el
--- lisp/vc.el  7 Feb 2006 16:59:01 -0000       1.414
+++ lisp/vc.el  11 Apr 2006 20:37:29 -0000
@@ -852,7 +852,7 @@
   (if vc-dired-mode
       (set-buffer (find-file-noselect (dired-get-filename)))
     (while vc-parent-buffer
-      (pop-to-buffer vc-parent-buffer))
+      (set-buffer vc-parent-buffer))
     (if (not buffer-file-name)
        (error "Buffer %s is not associated with a file" (buffer-name))
       (if (not (vc-backend buffer-file-name))
@@ -3013,9 +3013,7 @@
 use; you may override this using the second optional arg MODE."
   (if mode (setq vc-annotate-display-mode mode))
-  (when buffer
-    (set-buffer buffer)
-    (display-buffer buffer))
+  (pop-to-buffer (or buffer (current-buffer)))
   (if (not vc-annotate-parent-rev)
   (cond ((null vc-annotate-display-mode)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]