mirror of
https://github.com/correl/melpa.git
synced 2024-11-22 19:18:39 +00:00
Declare the build and archive alist vars early, and initialize them later.
This keeps the byte-compilation process happier, and allows melpa developers to reload the pkglist file using "M-x package-build-initialize"
This commit is contained in:
parent
e65a8fc0b0
commit
f31edc2997
1 changed files with 19 additions and 9 deletions
|
@ -63,6 +63,13 @@
|
|||
:group 'package-build
|
||||
:type 'string)
|
||||
|
||||
(defvar package-build-alist nil
|
||||
"List of package build specs.")
|
||||
|
||||
(defvar package-build-archive-alist nil
|
||||
"List of already-built packages, in the standard package.el format.")
|
||||
|
||||
|
||||
(defun package-build-find-parse-time (regex)
|
||||
"Find REGEX in current buffer and format as a proper time version."
|
||||
(format-time-string
|
||||
|
@ -334,15 +341,6 @@ If PKG-INFO is nil, an empty one is created."
|
|||
|
||||
|
||||
|
||||
(defvar package-build-alist
|
||||
(package-build-read-from-file package-build-alist-file)
|
||||
"List of package build specs.")
|
||||
|
||||
(defvar package-build-archive-alist
|
||||
(cdr (package-build-read-from-file
|
||||
(expand-file-name "archive-contents" package-build-archive-dir)))
|
||||
"List of already-built packages, in the standard package.el format.")
|
||||
|
||||
(defun package-build-dump-archive-contents ()
|
||||
"Dump the list of built packages back to the archive-contents file."
|
||||
(package-build-dump (cons 1 package-build-archive-alist)
|
||||
|
@ -367,4 +365,16 @@ If PKG-INFO is nil, an empty one is created."
|
|||
desc
|
||||
type)))))
|
||||
|
||||
(defun package-build-initialize ()
|
||||
"Load the pkglist and archive-contents files."
|
||||
(interactive)
|
||||
(setq
|
||||
package-build-alist (package-build-read-from-file package-build-alist-file)
|
||||
package-build-archive-alist (cdr (package-build-read-from-file
|
||||
(expand-file-name "archive-contents"
|
||||
package-build-archive-dir)))))
|
||||
|
||||
|
||||
(package-build-initialize)
|
||||
|
||||
;;; package-build.el ends here
|
||||
|
|
Loading…
Reference in a new issue