diff options
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/ert-font-lock.el | 1 | ||||
-rw-r--r-- | lisp/emacs-lisp/package-vc.el | 14 |
2 files changed, 10 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/ert-font-lock.el b/lisp/emacs-lisp/ert-font-lock.el index c6fd65e1507..58c6c0311cd 100644 --- a/lisp/emacs-lisp/ert-font-lock.el +++ b/lisp/emacs-lisp/ert-font-lock.el @@ -36,6 +36,7 @@ ;;; Code: (require 'ert) +(require 'ert-x) (require 'newcomment) (require 'pcase) diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index 34610102aa0..e168096e153 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -265,13 +265,13 @@ asynchronously." (add-hook 'package-read-archive-hook #'package-vc--read-archive-data 20) -(defun package-vc-commit (pkg) - "Return the last commit of a development package PKG." - (cl-assert (package-vc-p pkg)) +(defun package-vc-commit (pkg-desc) + "Return the last commit of a development package PKG-DESC." + (cl-assert (package-vc-p pkg-desc)) ;; FIXME: vc should be extended to allow querying the commit of a ;; directory (as is possible when dealing with git repositories). ;; This should be a fallback option. - (cl-loop with dir = (package-desc-dir pkg) + (cl-loop with dir = (package-desc-dir pkg-desc) for file in (directory-files dir t "\\.el\\'" t) when (vc-working-revision file) return it finally return "unknown")) @@ -359,7 +359,11 @@ asynchronously." requires)))) (list :kind 'vc) (package--alist-to-plist-args - (package-desc-extras pkg-desc)))) + (let ((extras (copy-alist (package-desc-extras pkg-desc)))) + (setf (alist-get :commit extras) + (package-vc-commit pkg-desc)) + extras) + ))) "\n") nil pkg-file nil 'silent)))) |