[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/package-vc-fixes 04ade0508d 14/14: Track 'default-directory' whi
From: |
Philip Kaludercic |
Subject: |
scratch/package-vc-fixes 04ade0508d 14/14: Track 'default-directory' while updating source packages |
Date: |
Wed, 9 Nov 2022 03:52:03 -0500 (EST) |
branch: scratch/package-vc-fixes
commit 04ade0508dfc5aaf2d3045771b4d2127ccef3194
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
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.
---
lisp/emacs-lisp/package-vc.el | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index 93a96abb68..d2ee63da87 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -544,19 +544,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)))))
- scratch/package-vc-fixes 6ba14d437b 10/14: Expand 'package-vc--unpack-1' documentation, (continued)
- scratch/package-vc-fixes 6ba14d437b 10/14: Expand 'package-vc--unpack-1' documentation, Philip Kaludercic, 2022/11/09
- scratch/package-vc-fixes ed0caa9032 04/14: Mark 'package-vc-install-selected-packages' as interactive, Philip Kaludercic, 2022/11/09
- scratch/package-vc-fixes c94b80caf1 05/14: Autoload 'package-vc-install-selected-packages', Philip Kaludercic, 2022/11/09
- scratch/package-vc-fixes c7b485da75 07/14: Fix 'package-vc-selected-packages' documentation, Philip Kaludercic, 2022/11/09
- scratch/package-vc-fixes 8956d833b3 12/14: Fix generation of documentation for source packages, Philip Kaludercic, 2022/11/09
- scratch/package-vc-fixes fe4b9fbbd3 03/14: Rename '-ensure-packages' to -install-selected-packages', Philip Kaludercic, 2022/11/09
- scratch/package-vc-fixes b19bf809f8 06/14: Mark 'package-vc-update' as interactive, Philip Kaludercic, 2022/11/09
- scratch/package-vc-fixes 55af74cd1e 08/14: Fix the docstring for 'package-vc--version', Philip Kaludercic, 2022/11/09
- scratch/package-vc-fixes 95882b0567 09/14: Clarify 'package-vc--build-documentation' docstring, Philip Kaludercic, 2022/11/09
- scratch/package-vc-fixes 12a7853844 11/14: Remove references to internal symbols from public docstrings, Philip Kaludercic, 2022/11/09
- scratch/package-vc-fixes 04ade0508d 14/14: Track 'default-directory' while updating source packages,
Philip Kaludercic <=
- scratch/package-vc-fixes f23742da36 13/14: Allow specifying a :lisp-dir for package descriptions, Philip Kaludercic, 2022/11/09