all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#6870: Make vc-root-diff work in more modes
@ 2010-08-17  1:55 rogers-emacs
  2011-07-04 15:18 ` Lars Magne Ingebrigtsen
  2020-08-25 13:38 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 7+ messages in thread
From: rogers-emacs @ 2010-08-17  1:55 UTC (permalink / raw)
  To: 6870

   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"))





^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-08-25 13:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-17  1:55 bug#6870: Make vc-root-diff work in more modes rogers-emacs
2011-07-04 15:18 ` Lars Magne Ingebrigtsen
2011-07-04 18:13   ` Stefan Monnier
2011-07-05 13:32     ` Lars Magne Ingebrigtsen
2011-07-05 19:04       ` Stefan Monnier
2011-07-05 20:58         ` Chong Yidong
2020-08-25 13:38 ` Lars Ingebrigtsen

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.