GNU bug report logs - #6870
Make vc-root-diff work in more modes

Previous Next

Package: emacs;

Reported by: rogers-emacs <at> rgrjr.dyndns.org

Date: Tue, 17 Aug 2010 01:55:02 UTC

Severity: minor

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 6870 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: rogers-emacs <at> rgrjr.dyndns.org
Cc: 6870 <at> debbugs.gnu.org
Subject: Re: Make vc-root-diff work in more modes
Date: Mon, 04 Jul 2011 17:18:36 +0200
rogers-emacs <at> rgrjr.dyndns.org writes:

>    It makes sense to me that vc-root-diff uses "(vc-responsible-backend
> default-directory)" when in a dired-mode buffer.  But since vc-root-diff
> is not at all about the current buffer, why not also make that the
> default for shell-mode, diff-mode, or any of the other modes for
> non-version-controlled buffers that may be generated in a working copy?
>
> 					-- Bob Rogers
> 					   http://www.rgrjr.com/
>
> ------------------------------------------------------------------------
> diff --git a/lisp/vc.el b/lisp/vc.el
> index 1e52a3c..abba202 100644
> --- a/lisp/vc.el
> +++ b/lisp/vc.el
> @@ -1655,8 +1655,8 @@ saving the buffer."
>      (when buffer-file-name (vc-buffer-sync not-urgent))
>      (let ((backend
>  	   (cond ((derived-mode-p 'vc-dir-mode)  vc-dir-backend)
> -		 ((derived-mode-p 'dired-mode) (vc-responsible-backend default-directory))
> -		 (vc-mode (vc-backend buffer-file-name))))
> +		 (vc-mode (vc-backend buffer-file-name))
> +		 (t (vc-responsible-backend default-directory))))
>  	  rootdir working-revision)
>        (unless backend
>  	(error "Buffer is not version controlled"))

This looks very reasonable to me, but I'm not all that familiar with
vc.el internals.  Does anybody else have any opinions on this?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




This bug report was last modified 4 years and 269 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.