emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 94f01fe: vc-working-revision: Bind default-directory


From: Dmitry Gutov
Subject: master 94f01fe: vc-working-revision: Bind default-directory
Date: Sun, 17 May 2020 19:53:02 -0400 (EDT)

branch: master
commit 94f01fe206b554df94f7860892088cd22ed191dd
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    vc-working-revision: Bind default-directory
    
    * lisp/vc/vc-hooks.el (vc-working-revision):
    Bind default-directory to be on the safe side.
    Suggested by Ilya Ostapyshyn
    (https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg02301.html).
---
 lisp/vc/vc-hooks.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index 2ca9d3e..ce72a49 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -498,7 +498,7 @@ status of this file.  Otherwise, the value returned is one 
of:
   "Return the repository version from which FILE was checked out.
 If FILE is not registered, this function always returns nil."
   (or (vc-file-getprop file 'vc-working-revision)
-      (progn
+      (let ((default-directory (file-name-directory file)))
         (setq backend (or backend (vc-backend file)))
         (when backend
           (vc-file-setprop file 'vc-working-revision



reply via email to

[Prev in Thread] Current Thread [Next in Thread]