]> git.eshelyaron.com Git - emacs.git/commitdiff
Use 'package-vc-p' in package-vc.el
authorPhilip Kaludercic <philipk@posteo.net>
Fri, 7 Oct 2022 16:58:02 +0000 (18:58 +0200)
committerPhilip Kaludercic <philipk@posteo.net>
Sat, 8 Oct 2022 09:57:38 +0000 (11:57 +0200)
* package-vc.el (package-vc-commit): Use it instead of 'eq'.
(package-vc-version): Use it instead of 'eq'.

lisp/emacs-lisp/package-vc.el

index d3850a5e2c0fce1bf374d0b4cdd134c8a91f3bac..e03a5f73b4be162a5539125a01205f8228d66ebe 100644 (file)
@@ -71,7 +71,7 @@
 
 (defun package-vc-commit (pkg)
   "Extract the commit of a development package PKG."
-  (cl-assert (eq (package-desc-kind pkg) 'vc))
+  (cl-assert (package-vc-p pkg))
   ;; FIXME: vc should be extended to allow querying the commit of a
   ;; directory (as is possible when dealing with git repositores).
   ;; This should be a fallback option.
@@ -82,7 +82,7 @@
 
 (defun package-vc-version (pkg)
   "Extract the commit of a development package PKG."
-  (cl-assert (eq (package-desc-kind pkg) 'vc))
+  (cl-assert (package-vc-p pkg))
   (cl-loop with dir = (package-desc-dir pkg) ;FIXME: dir is nil
            for file in (sort (directory-files dir t "\\.el\\'")
                              (lambda (s1 s2)