diff options
author | Philip Kaludercic <philipk@posteo.net> | 2022-11-09 09:35:11 +0100 |
---|---|---|
committer | Philip Kaludercic <philipk@posteo.net> | 2022-11-17 20:37:28 +0100 |
commit | 2ec02024ab70802b793ecd9b0bbc5a5c81398516 (patch) | |
tree | 99f29a32d7a9537bb1ba05329b91f085a5d7841b /lisp/emacs-lisp | |
parent | d67b66f8abb72369d77bd800301eb74b8b9ad321 (diff) | |
download | emacs-2ec02024ab70802b793ecd9b0bbc5a5c81398516.tar.gz emacs-2ec02024ab70802b793ecd9b0bbc5a5c81398516.tar.bz2 emacs-2ec02024ab70802b793ecd9b0bbc5a5c81398516.zip |
Track 'default-directory' while updating source packages
* lisp/emacs-lisp/package-vc.el (package-vc-update): Add the source
directory to the identifier list, in case the remaining
'vc-do-command' arguments are all read-time constants.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/package-vc.el | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index 548e7880110..8031bea490f 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -564,19 +564,22 @@ installed package." ;; ;; If there is a better way to do this, it should be done. (letrec ((pkg-dir (package-desc-dir pkg-desc)) - (empty (make-symbol empty)) - (args (list empty empty empty)) + (empty (make-symbol "empty")) + (args (list empty empty empty empty)) (vc-filter-command-function (lambda (command file-or-list flags) (setf (nth 0 args) command (nth 1 args) file-or-list - (nth 2 args) flags) + (nth 2 args) flags + (nth 3 args) default-directory) (list command file-or-list flags))) (post-upgrade (lambda (command file-or-list flags) (when (and (memq (nth 0 args) (list command empty)) (memq (nth 1 args) (list file-or-list empty)) - (memq (nth 2 args) (list flags empty))) + (memq (nth 2 args) (list flags empty)) + (or (eq (nth 3 args) empty) + (file-equal-p (nth 3 args) default-directory))) (with-demoted-errors "Failed to activate: %S" (package-vc--unpack-1 pkg-desc pkg-dir)) (remove-hook 'vc-post-command-functions post-upgrade))))) |