From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Benjamin Rutt Newsgroups: gmane.emacs.devel Subject: Re: [patch] add interactive browse of revisions from vc *Annotate* buffers Date: Thu, 22 Jan 2004 20:54:49 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <1073937837.2822.180.camel@localhost> <1074519239.10692.24.camel@localhost> <87u12rbrlf.fsf@emptyhost.emptydomain.de> <1074814741.13077.214.camel@localhost> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1074823145 27808 80.91.224.253 (23 Jan 2004 01:59:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Jan 2004 01:59:05 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Jan 23 02:58:57 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Ajqb3-0005dc-00 for ; Fri, 23 Jan 2004 02:58:57 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Ajqb3-0000CJ-00 for ; Fri, 23 Jan 2004 02:58:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Ajqam-0004Mp-Nn for emacs-devel@quimby.gnus.org; Thu, 22 Jan 2004 20:58:40 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Ajqa3-0004J4-J0 for emacs-devel@gnu.org; Thu, 22 Jan 2004 20:57:55 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AjqZ8-0003ku-6X for emacs-devel@gnu.org; Thu, 22 Jan 2004 20:57:30 -0500 Original-Received: from [164.107.123.5] (helo=cis.ohio-state.edu) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AjqX5-0002oz-G9; Thu, 22 Jan 2004 20:54:51 -0500 Original-Received: from mu.cis.ohio-state.edu (daemon@mu.cis.ohio-state.edu [164.107.112.41]) by cis.ohio-state.edu (8.11.6p2-20030924/8.11.6) with ESMTP id i0N1snP14505; Thu, 22 Jan 2004 20:54:49 -0500 (EST) Original-Received: (from rutt@localhost) by mu.cis.ohio-state.edu (8.11.6p2-20030924/8.11.6) id i0N1sn718318; Thu, 22 Jan 2004 20:54:49 -0500 (EST) X-Authentication-Warning: mu.cis.ohio-state.edu: rutt set sender to rutt.4@osu.edu using -f Original-To: Andre Spiegel Mail-Followup-To: Andre Spiegel , emacs-devel@gnu.org In-Reply-To: <1074814741.13077.214.camel@localhost> (Andre Spiegel's message of "Fri, 23 Jan 2004 00:39:01 +0100") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (usg-unix-v) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19448 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19448 Andre Spiegel writes: > On Thu, 2004-01-22 at 23:06, Kim F. Storm wrote: > >> I just committed the new code to CVS. This also means that there is now a >> line-at-pos function which return the current line number. > > I've just changed vc.el to use line-at-pos instead of vc-current-line. > Thanks. Thank you for taking care of that for me. Could you also commit the following bugfix to my code? The bug showed up when you have multiple vc-annotate buffers open; I was using `make-local-variable' improperly; that is, it wasn't being evaluated in the buffer that actually needed the buffer-local variable (that being the annotate buffer). Thanks, Benjamin Rutt Index: vc.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/vc.el,v retrieving revision 1.364 diff -c -r1.364 vc.el *** vc.el 22 Jan 2004 23:34:33 -0000 1.364 --- vc.el 23 Jan 2004 01:53:05 -0000 *************** *** 2816,2824 **** (defvar vc-annotate-parent-file nil) (defvar vc-annotate-parent-rev nil) (defvar vc-annotate-parent-display-mode nil) - (make-local-variable 'vc-annotate-parent-file) - (make-local-variable 'vc-annotate-parent-rev) - (make-local-variable 'vc-annotate-parent-display-mode) (defconst vc-annotate-font-lock-keywords ;; The fontification is done by vc-annotate-lines instead of font-lock. --- 2816,2821 ---- *************** *** 3038,3046 **** vc-annotate-version)) (save-excursion (set-buffer temp-buffer-name) ! (setq vc-annotate-parent-file bfn) ! (setq vc-annotate-parent-rev vc-annotate-version) ! (setq vc-annotate-parent-display-mode vc-annotate-display-mode)) ;; Don't use the temp-buffer-name until the buffer is created ;; (only after `with-output-to-temp-buffer'.) --- 3035,3044 ---- vc-annotate-version)) (save-excursion (set-buffer temp-buffer-name) ! (set (make-local-variable 'vc-annotate-parent-file) bfn) ! (set (make-local-variable 'vc-annotate-parent-rev) vc-annotate-version) ! (set (make-local-variable 'vc-annotate-parent-display-mode) ! vc-annotate-display-mode)) ;; Don't use the temp-buffer-name until the buffer is created ;; (only after `with-output-to-temp-buffer'.) Index: ChangeLog =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/ChangeLog,v retrieving revision 1.5619 diff -c -r1.5619 ChangeLog *** ChangeLog 22 Jan 2004 23:37:46 -0000 1.5619 --- ChangeLog 23 Jan 2004 01:53:05 -0000 *************** *** 1,3 **** --- 1,8 ---- + 2004-01-22 Benjamin Rutt + + * vc.el (vc-annotate): Fix improper use of `make-local-variable' + at the top level of vc.el. + 2004-01-23 Andre Spiegel * vc.el (vc-current-line): Function removed. This is now done by