changeset 111517:275f265c56c5

* lisp/vc/vc.el (vc-deduce-backend): Use default-directory in shell-mode and compilation-mode.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 12 Nov 2010 08:44:46 -0500
parents 80d61d4081a0
children adbfcf85c8eb
files lisp/ChangeLog lisp/vc/vc.el
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Nov 12 08:35:36 2010 -0500
+++ b/lisp/ChangeLog	Fri Nov 12 08:44:46 2010 -0500
@@ -1,5 +1,8 @@
 2010-11-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+	* vc/vc.el (vc-deduce-backend): Use default-directory in shell-mode
+	and compilation-mode (bug#7350).
+
 	* vc/smerge-mode.el (smerge-refine): Choose better default part to
 	highlight when one of them is empty.
 
--- a/lisp/vc/vc.el	Fri Nov 12 08:35:36 2010 -0500
+++ b/lisp/vc/vc.el	Fri Nov 12 08:44:46 2010 -0500
@@ -920,7 +920,8 @@
   (cond ((derived-mode-p 'vc-dir-mode)   vc-dir-backend)
 	((derived-mode-p 'log-view-mode) log-view-vc-backend)
 	((derived-mode-p 'diff-mode)     diff-vc-backend)
-	((derived-mode-p 'dired-mode)
+        ;; Maybe we could even use comint-mode rather than shell-mode?
+	((derived-mode-p 'dired-mode 'shell-mode 'compilation-mode)
 	 (vc-responsible-backend default-directory))
 	(vc-mode (vc-backend buffer-file-name))))
 
@@ -986,7 +987,7 @@
   (let ((backend (vc-responsible-backend default-directory)))
     (unless backend (error "Directory not under VC"))
     (list backend
-       (dired-map-over-marks (dired-get-filename nil t) nil))))
+          (dired-map-over-marks (dired-get-filename nil t) nil))))
 
 (defun vc-ensure-vc-buffer ()
   "Make sure that the current buffer visits a version-controlled file."