aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Kaludercic2022-10-23 13:02:25 +0200
committerPhilip Kaludercic2022-10-23 13:02:25 +0200
commit7640b0751ba1065f43ff93ed7ad2cc0d9dff9a97 (patch)
tree7dd859d113d62d7bc39b376e511c5519b057be77
parentaaa5ae90a90ba45c81bc7036ceedf5f15038c47e (diff)
downloademacs-7640b0751ba1065f43ff93ed7ad2cc0d9dff9a97.tar.gz
emacs-7640b0751ba1065f43ff93ed7ad2cc0d9dff9a97.zip
Add auxiliary function to query package specifications
* lisp/emacs-lisp/package-vc.el (package-vc-query-spec): Add inline function.
-rw-r--r--lisp/emacs-lisp/package-vc.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index 562c5340028..769f9ac5dc5 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -38,6 +38,7 @@
38;;; Code: 38;;; Code:
39 39
40(eval-when-compile (require 'rx)) 40(eval-when-compile (require 'rx))
41(eval-when-compile (require 'inline))
41(require 'package) 42(require 'package)
42(require 'lisp-mnt) 43(require 'lisp-mnt)
43(require 'vc) 44(require 'vc)
@@ -140,6 +141,13 @@ name for PKG-DESC."
140 nil nil #'string=))) 141 nil nil #'string=)))
141 spec)) 142 spec))
142 143
144(define-inline package-vc-query-spec (pkg-desc prop)
145 "Query the property PROP for the package specification for PKG-DESC.
146If no package specification can be determined, the function will
147return nil."
148 (inline-letevals (pkg-desc prop)
149 (inline-quote (plist-get (pacakge-vc-desc->spec ,pkg-desc) ,prop))))
150
143(defun package-vc--read-archive-data (archive) 151(defun package-vc--read-archive-data (archive)
144 "Update `package-vc-archive-spec-alist' with the contents of ARCHIVE. 152 "Update `package-vc-archive-spec-alist' with the contents of ARCHIVE.
145This function is meant to be used as a hook for 153This function is meant to be used as a hook for