core: rename some function arguments to more explicit pkg-name

This commit is contained in:
syl20bnr 2015-08-09 00:27:21 -04:00
parent 52f2fa206b
commit 64be291221
1 changed files with 19 additions and 19 deletions

View File

@ -877,23 +877,23 @@ to select one."
:initial-value t))
(not (object-assoc pkg-name :name configuration-layer-packages)))))
(defun configuration-layer//get-package-directory (pkg)
"Return the directory path for PKG."
(let ((pkg-desc (assq pkg package-alist)))
(defun configuration-layer//get-package-directory (pkg-name)
"Return the directory path for package with name PKG-NAME."
(let ((pkg-desc (assq pkg-name package-alist)))
(cond
((version< emacs-version "24.3.50")
(let* ((version (aref (cdr pkg-desc) 0))
(elpa-dir (concat user-emacs-directory "elpa/"))
(pkg-dir-name (format "%s-%s.%s"
(symbol-name pkg)
(symbol-name pkg-name)
(car version)
(cadr version))))
(expand-file-name (concat elpa-dir pkg-dir-name))))
(t (package-desc-dir (cadr pkg-desc))))))
(defun configuration-layer//get-package-dependencies (pkg)
"Return the dependencies alist for PKG."
(let ((pkg-desc (assq pkg package-alist)))
(defun configuration-layer//get-package-dependencies (pkg-name)
"Return the dependencies alist for package with name PKG-NAME."
(let ((pkg-desc (assq pkg-name package-alist)))
(cond
((version< emacs-version "24.3.50") (aref (cdr pkg-desc) 1))
(t (package-desc-reqs (cadr pkg-desc))))))
@ -912,34 +912,34 @@ to select one."
(when reqs2 (setq reqs (append reqs2 reqs)))))
reqs))
(defun configuration-layer//get-package-version-string (pkg)
"Return the version string for PKG."
(let ((pkg-desc (assq pkg package-alist)))
(defun configuration-layer//get-package-version-string (pkg-name)
"Return the version string for package with name PKG-NAME."
(let ((pkg-desc (assq pkg-name package-alist)))
(when pkg-desc
(cond
((version< emacs-version "24.3.50") (package-version-join
(aref (cdr pkg-desc) 0)))
(t (package-version-join (package-desc-version (cadr pkg-desc))))))))
(defun configuration-layer//get-package-version (pkg)
"Return the version list for PKG."
(let ((version-string (configuration-layer//get-package-version-string pkg)))
(defun configuration-layer//get-package-version (pkg-name)
"Return the version list for package with name PKG-NAME."
(let ((version-string (configuration-layer//get-package-version-string pkg-name)))
(unless (string-empty-p version-string)
(version-to-list version-string))))
(defun configuration-layer//get-latest-package-version-string (pkg)
"Return the version string for PKG."
(let ((pkg-arch (assq pkg package-archive-contents)))
(defun configuration-layer//get-latest-package-version-string (pkg-name)
"Return the version string for package with name PKG-NAME."
(let ((pkg-arch (assq pkg-name package-archive-contents)))
(when pkg-arch
(cond
((version< emacs-version "24.3.50") (package-version-join
(aref (cdr pkg-arch) 0)))
(t (package-version-join (package-desc-version (cadr pkg-arch))))))))
(defun configuration-layer//get-latest-package-version (pkg)
"Return the versio list for PKG."
(defun configuration-layer//get-latest-package-version (pkg-name)
"Return the versio list for package with name PKG-NAME."
(let ((version-string
(configuration-layer//get-latest-package-version-string pkg)))
(configuration-layer//get-latest-package-version-string pkg-name)))
(unless (string-empty-p version-string)
(version-to-list version-string))))