summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2019-10-04 18:30:34 +0200
committerStefan Kangas <stefankangas@gmail.com>2020-01-19 00:51:58 +0100
commitfabf0065c51ad0714e4ade2c5f44d6e81921d3fe (patch)
tree1c57346a13cb90a68332b99999ba6a384b7157a0 /lisp
parent5118394e5be1f4ae2d74d7aee08aa2c149af790a (diff)
downloademacs-fabf0065c51ad0714e4ade2c5f44d6e81921d3fe.tar.gz
Doc fixes in package.el
* lisp/emacs-lisp/package.el (package-process-define-package) (package-generate-description-file): Doc fixes. (package-generate-autoloads, package--write-file-no-coding) (package--archive-file-exists-p, package-desc-status): Add doc strings.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/package.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 91b32dfa79d..afe42c7d723 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -606,8 +606,10 @@ EXP should be a form read from a foo-pkg.el file.
Convert EXP into a `package-desc' object using the
`package-desc-from-define' constructor before pushing it to
`package-alist'.
-If there already exists a package by that name in
-`package-alist', replace that definition with the new one."
+
+If there already exists a package by the same name in
+`package-alist', insert this object there such that the packages
+are sorted with the highest version first."
(when (eq (car-safe exp) 'define-package)
(let* ((new-pkg-desc (apply #'package-desc-from-define (cdr exp)))
(name (package-desc-name new-pkg-desc))
@@ -953,7 +955,7 @@ untar into a directory named DIR; otherwise, signal an error."
pkg-dir))
(defun package-generate-description-file (pkg-desc pkg-file)
- "Create the foo-pkg.el file for single-file packages."
+ "Create the foo-pkg.el file PKG-FILE for single-file package PKG-DESC."
(let* ((name (package-desc-name pkg-desc)))
(let ((print-level nil)
(print-quoted t)
@@ -997,6 +999,7 @@ untar into a directory named DIR; otherwise, signal an error."
(defvar version-control)
(defun package-generate-autoloads (name pkg-dir)
+ "Generate autoloads in PKG-DIR for package named NAME."
(let* ((auto-name (format "%s-autoloads.el" name))
;;(ignore-name (concat name "-pkg.el"))
(generated-autoload-file (expand-file-name auto-name pkg-dir))
@@ -1177,12 +1180,14 @@ The return result is a `package-desc'."
;; signature checking.
(defun package--write-file-no-coding (file-name)
+ "Write file FILE-NAME without encoding using coding system."
(let ((buffer-file-coding-system 'no-conversion))
(write-region (point-min) (point-max) file-name nil 'silent)))
(declare-function url-http-file-exists-p "url-http" (url))
(defun package--archive-file-exists-p (location file)
+ "Return t if FILE exists in remote LOCATION."
(let ((http (string-match "\\`https?:" location)))
(if http
(progn
@@ -2820,6 +2825,7 @@ of these dependencies, similar to the list returned by
(push dep out)))))))))))
(defun package-desc-status (pkg-desc)
+ "Return the status of `package-desc' object PKG-DESC."
(let* ((name (package-desc-name pkg-desc))
(dir (package-desc-dir pkg-desc))
(lle (assq name package-load-list))