all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Tom Tromey <tromey@redhat.com>
Cc: 6447@debbugs.gnu.org
Subject: bug#6447: 23.1; revert-buffer in *vc-diff*
Date: Sat, 19 Jun 2010 17:52:47 +0300	[thread overview]
Message-ID: <871vc3hyl8.fsf@mail.jurta.org> (raw)
In-Reply-To: <m3wrtxponf.fsf@fleche.redhat.com> (Tom Tromey's message of "Thu,  17 Jun 2010 11:14:28 -0600")

> I typed '=' in a *vc-dir* buffer to get a diff.
> It would be nice if revert-buffer in the *vc-diff* buffer re-ran the
> same diff command.

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.

-- 
Juri Linkov
http://www.jurta.org/emacs/





  reply	other threads:[~2010-06-19 14:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-17 17:14 bug#6447: 23.1; revert-buffer in *vc-diff* Tom Tromey
2010-06-19 14:52 ` Juri Linkov [this message]
2010-06-19 17:36   ` Chong Yidong
2010-06-24 21:47     ` Juri Linkov
2010-06-24 23:16       ` Dan Nicolaescu
2010-06-25 20:32         ` Juri Linkov
2010-06-25 21:12           ` Dan Nicolaescu
2010-08-06  4:04         ` Dan Nicolaescu
2010-07-09 20:51       ` Dan Nicolaescu
2010-08-02  9:26         ` Stefan Monnier
2010-08-06  4:03           ` Dan Nicolaescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871vc3hyl8.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=6447@debbugs.gnu.org \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.