From: Bob Rogers <rogers@rgrjr.dyndns.org>
To: 7350@debbugs.gnu.org
Subject: bug#7350: 24.0.50; make vc-deduce-backend smarter
Date: Sat, 6 Nov 2010 18:18:08 -0400 [thread overview]
Message-ID: <19669.54304.980911.220632@rgr.rgrjr.com> (raw)
I notice that vc-root-diff only works if the current buffer is
visiting a version-controlled file, and in certain other buffer modes.
In particular, it works in dired-mode, where it uses the
default-directory, but not in shell-mode, which is not one of the
explicit special cases. ISTM that using default-directory would make a
better default case, since that ought to DTRT in the majority of cases.
Indeed, one might be able to get rid of some of the other
vc-deduce-backend cases, since most such modes seem to need to set up
the right default-directory anyway.
-- Bob Rogers
http://www.rgrjr.com/
------------------------------------------------------------------------
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 665dafb..ddeb546 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -920,9 +920,9 @@ 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)
- (vc-responsible-backend default-directory))
- (vc-mode (vc-backend buffer-file-name))))
+ (vc-mode (vc-backend buffer-file-name))
+ (default-directory
+ (vc-responsible-backend default-directory))))
(declare-function vc-dir-current-file "vc-dir" ())
(declare-function vc-dir-deduce-fileset "vc-dir" (&optional state-model-only-files))
next reply other threads:[~2010-11-06 22:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-06 22:18 Bob Rogers [this message]
2010-11-07 20:03 ` bug#7350: 24.0.50; make vc-deduce-backend smarter Stefan Monnier
2010-11-07 21:41 ` Bob Rogers
2010-11-08 17:47 ` Stefan Monnier
2010-11-08 21:05 ` Bob Rogers
2010-11-12 13:48 ` Stefan Monnier
2010-11-14 23:21 ` Bob Rogers
2010-11-15 16:05 ` Stefan Monnier
2010-11-17 4:43 ` Bob Rogers
2010-11-17 13:31 ` Stefan Monnier
2010-11-19 2:27 ` Bob Rogers
2010-11-20 19:54 ` Bob Rogers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19669.54304.980911.220632@rgr.rgrjr.com \
--to=rogers@rgrjr.dyndns.org \
--cc=7350@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.