Function: package-vc--desc->spec

package-vc--desc->spec is a byte-compiled function defined in package-vc.el.gz.

Signature

(package-vc--desc->spec PKG-DESC &optional NAME)

Documentation

Retrieve the package specification for PKG-DESC.

The optional argument NAME can be used to override the default name for PKG-DESC.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/package-vc.el.gz
(defun package-vc--desc->spec (pkg-desc &optional name)
  "Retrieve the package specification for PKG-DESC.
The optional argument NAME can be used to override the default
name for PKG-DESC."
  (alist-get
   (setq name (or name (package-desc-name pkg-desc)))
   (if (and (package-desc-archive pkg-desc)
            (not (alist-get name package-vc-selected-packages
                            nil nil #'string=)))
       (alist-get (intern (package-desc-archive pkg-desc))
                  package-vc--archive-spec-alists)
     ;; Consult both our local list of package specifications, as well
     ;; as the lists provided by the archives.
     (apply #'append (cons package-vc-selected-packages
                           (mapcar #'cdr package-vc--archive-spec-alists))))
   '() nil #'string=))