From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: VC's handling of windows, esp. w.r.t annotate Date: Tue, 11 Apr 2006 16:39:33 -0400 Message-ID: <87u08z4zpp.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1144788195 7466 80.91.229.2 (11 Apr 2006 20:43:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 Apr 2006 20:43:15 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 11 22:43:11 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FTPhO-0000JF-SR for ged-emacs-devel@m.gmane.org; Tue, 11 Apr 2006 22:42:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FTPhO-0006ms-39 for ged-emacs-devel@m.gmane.org; Tue, 11 Apr 2006 16:42:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FTPfp-00058q-Ha for emacs-devel@gnu.org; Tue, 11 Apr 2006 16:41:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FTPfn-00056B-BY for emacs-devel@gnu.org; Tue, 11 Apr 2006 16:41:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FTPfn-00055t-4l for emacs-devel@gnu.org; Tue, 11 Apr 2006 16:41:15 -0400 Original-Received: from [209.226.175.74] (helo=tomts20-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FTPkg-0004QN-LB; Tue, 11 Apr 2006 16:46:18 -0400 Original-Received: from alfajor ([70.55.147.51]) by tomts20-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060411204111.PFAH16051.tomts20-srv.bellnexxia.net@alfajor>; Tue, 11 Apr 2006 16:41:11 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id 786282FDA3; Tue, 11 Apr 2006 16:39:33 -0400 (EDT) Original-To: spiegel@gnu.org User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:52721 Archived-At: 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. Stefan 2006-04-11 Stefan Monnier * 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." (interactive) (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) (vc-annotate-mode)) (cond ((null vc-annotate-display-mode)