From: Stefan Monnier Date: Fri, 12 Nov 2010 13:44:46 +0000 (-0500) Subject: * lisp/vc/vc.el (vc-deduce-backend): Use default-directory in shell-mode X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~45^2~267 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ebff325e4317a1ff8d6a86976a2dc9f78697b21a;p=emacs.git * lisp/vc/vc.el (vc-deduce-backend): Use default-directory in shell-mode and compilation-mode. Fixes: debbugs:7350 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4b1e880e547..d7388d5b4f8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-11-12 Stefan Monnier + * 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. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 665dafb10df..56bf353b6b4 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -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."