From: Dmitry Gutov Date: Thu, 24 Oct 2013 01:27:29 +0000 (+0400) Subject: * lisp/vc/vc.el (vc-print-root-log): Always set `default-directory' X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1164 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8297b2cfdd3c0da92cc6625205f4533fcb3b01e9;p=emacs.git * lisp/vc/vc.el (vc-print-root-log): Always set `default-directory' value, whether we could auto-deduce `backend', or not. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cc302daa9cf..0e34bc5ef2e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2013-10-24 Dmitry Gutov + * vc/vc.el (vc-print-root-log): Always set `default-directory' + value, whether we could auto-deduce `backend', or not. + * progmodes/ruby-mode.el (ruby-smie-rules): Fix the "curly block with parameters" example. Simplify the "is it block or is it hash" check, but also make it more thorough. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 585b6d48d45..11cfeb403d4 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2330,10 +2330,10 @@ When called interactively with a prefix argument, prompt for LIMIT." (setq rootdir (vc-call-backend backend 'root default-directory)) (setq rootdir (read-directory-name "Directory for VC root-log: ")) (setq backend (vc-responsible-backend rootdir)) - (if backend - (setq default-directory rootdir) - (error "Directory is not version controlled"))) - (setq working-revision (vc-working-revision rootdir)) + (unless backend + (error "Directory is not version controlled"))) + (setq working-revision (vc-working-revision rootdir) + default-directory rootdir) (vc-print-log-internal backend (list rootdir) working-revision nil limit))) ;;;###autoload