From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#6447: 23.1; revert-buffer in *vc-diff* Date: Fri, 25 Jun 2010 00:47:08 +0300 Organization: JURTA Message-ID: <87y6e46r37.fsf@mail.jurta.org> References: <871vc3hyl8.fsf@mail.jurta.org> <87631ekjpw.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1277420059 28886 80.91.229.12 (24 Jun 2010 22:54:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 24 Jun 2010 22:54:19 +0000 (UTC) Cc: Tom Tromey , 6447-done@debbugs.gnu.org To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 25 00:54:17 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ORvJG-0001O1-FA for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Jun 2010 00:54:14 +0200 Original-Received: from localhost ([127.0.0.1]:56808 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ORvJG-00025G-2t for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Jun 2010 18:54:14 -0400 Original-Received: from [140.186.70.92] (port=36025 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ORvJ9-00023x-OM for bug-gnu-emacs@gnu.org; Thu, 24 Jun 2010 18:54:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ORuv8-0008TT-GB for bug-gnu-emacs@gnu.org; Thu, 24 Jun 2010 18:29:19 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48890) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ORuv8-0008TO-Dc for bug-gnu-emacs@gnu.org; Thu, 24 Jun 2010 18:29:18 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1ORuUk-00005D-Up for bug-gnu-emacs@gnu.org; Thu, 24 Jun 2010 18:02:02 -0400 Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Jun 2010 22:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 6447 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 6447@debbugs.gnu.org, juri@jurta.org Original-Received: via spool by 6447-done@debbugs.gnu.org id=D6447.127741691532759 (code D ref 6447); Thu, 24 Jun 2010 22:02:02 +0000 Original-Received: (at 6447-done) by debbugs.gnu.org; 24 Jun 2010 22:01:55 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ORuUc-0008WH-GH for submit@debbugs.gnu.org; Thu, 24 Jun 2010 18:01:54 -0400 Original-Received: from smtp-out2.starman.ee ([85.253.0.4] helo=mx2.starman.ee) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ORuUa-0008W9-JC for 6447-done@debbugs.gnu.org; Thu, 24 Jun 2010 18:01:53 -0400 X-Virus-Scanned: by Amavisd-New at mx2.starman.ee Original-Received: from mail.starman.ee (62.65.209.24.cable.starman.ee [62.65.209.24]) by mx2.starman.ee (Postfix) with ESMTP id E4F8B3F407E; Fri, 25 Jun 2010 01:01:45 +0300 (EEST) In-Reply-To: <87631ekjpw.fsf@stupidchicken.com> (Chong Yidong's message of "Sat, 19 Jun 2010 13:36:43 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 24 Jun 2010 18:02:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:37993 Archived-At: >> Like the command `diff' after calling `diff-mode' sets >> `revert-buffer-function' to lambda with its function arguments, >> `vc-diff-internal' could do the same: >> >> === modified file 'lisp/vc/vc.el' >> --- lisp/vc/vc.el 2010-06-11 19:09:57 +0000 >> +++ lisp/vc/vc.el 2010-06-19 14:51:14 +0000 >> @@ -1547,6 +1547,9 @@ (defun vc-diff-internal (async vc-filese >> (message "%s" (cdr messages)) >> nil) >> (diff-mode) >> + (set (make-local-variable 'revert-buffer-function) >> + `(lambda (ignore-auto noconfirm) >> + (vc-diff-internal ,async ',vc-fileset ,rev1 ,rev2 ,verbose))) >> ;; Make the *vc-diff* buffer read only, the diff-mode key >> ;; bindings are nicer for read only buffers. pcl-cvs does the >> ;; same thing. > > Looks like a fine idea, please go ahead. Done. -- Juri Linkov http://www.jurta.org/emacs/