mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-28 07:45:00 +00:00
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.
This commit is contained in:
parent
5118394e5b
commit
fabf0065c5
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user