aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/NEWS3
-rw-r--r--lisp/vc/vc.el4
2 files changed, 4 insertions, 3 deletions
diff --git a/etc/NEWS b/etc/NEWS
index d501c2ad872..32ceec1d362 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -173,6 +173,9 @@ directories with the help of new command 'dired-vc-next-action'.
173 173
174** Change Logs and VC 174** Change Logs and VC
175 175
176*** More vc commands that don't change VC state can be used from non-file buffers.
177Such non-file buffers should have default-directory under vc.
178
176*** New command 'vc-dir-root' uses the root directory without asking. 179*** New command 'vc-dir-root' uses the root directory without asking.
177 180
178*** New commands 'vc-dir-mark-registered-files' (bound to '* r') and 181*** New commands 'vc-dir-mark-registered-files' (bound to '* r') and
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 9b12d449785..65775f8e46e 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1074,11 +1074,9 @@ BEWARE: this function may change the current buffer."
1074 (progn ;FIXME: Why not `with-current-buffer'? --Stef. 1074 (progn ;FIXME: Why not `with-current-buffer'? --Stef.
1075 (set-buffer vc-parent-buffer) 1075 (set-buffer vc-parent-buffer)
1076 (vc-deduce-fileset not-state-changing allow-unregistered state-model-only-files))) 1076 (vc-deduce-fileset not-state-changing allow-unregistered state-model-only-files)))
1077 ((and (derived-mode-p 'log-view-mode) 1077 ((and (not buffer-file-name)
1078 (setq backend (vc-responsible-backend default-directory))) 1078 (setq backend (vc-responsible-backend default-directory)))
1079 (list backend nil)) 1079 (list backend nil))
1080 ((not buffer-file-name)
1081 (error "Buffer %s is not associated with a file" (buffer-name)))
1082 ((and allow-unregistered (not (vc-registered buffer-file-name))) 1080 ((and allow-unregistered (not (vc-registered buffer-file-name)))
1083 (if state-model-only-files 1081 (if state-model-only-files
1084 (list (vc-backend-for-registration (buffer-file-name)) 1082 (list (vc-backend-for-registration (buffer-file-name))