]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/vc/vc.el (vc-deduce-backend): Use default-directory in shell-mode
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 12 Nov 2010 13:44:46 +0000 (08:44 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 12 Nov 2010 13:44:46 +0000 (08:44 -0500)
and compilation-mode.

Fixes: debbugs:7350
lisp/ChangeLog
lisp/vc/vc.el

index 4b1e880e5477f24eb4b95b36641cc0016e1f5199..d7388d5b4f89937e2b6f2db094f7f0a7e1e96601 100644 (file)
@@ -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.
 
index 665dafb10df54976d4992ce5694e5faaa448e70e..56bf353b6b42ffde711d4c7a15773dbe8bf0c884 100644 (file)
@@ -920,7 +920,8 @@ Within directories, only files already under version control are noticed."
   (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 @@ current buffer."
   (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."