mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 22:41:06 -08:00
* lisp/emacs-lisp/package.el: Load package-quickstart without package.el
Speed up startup when `package-quickstart` is in use by making it possible to load the quickstart file without having to load `package.el` at all. (package-user-dir, package-directory-list, package-quickstart-file): Preload those variables. (package--get-activatable-pkg): New fun, extracted from `package-activate`. (package-activate): Use it. (package--activate-all): New function, extracted from `package-activate-all`. (package-activate-all): Use it and make the function preloaded. (package--archives-initialize): New function. (package-install): Use it. (list-packages): Avoid `switch-to-buffer`. (package-get-descriptor): New function. * lisp/startup.el (command-line): Simplify the code now that package-user-dir and package-directory-list are preloaded. * lisp/emacs-lisp/autoload.el (make-autoload): Add support for `:initialize #'custom-initialize-delay` in `defcustom`.
This commit is contained in:
parent
1433a12014
commit
9973019764
3 changed files with 68 additions and 42 deletions
|
|
@ -221,12 +221,18 @@ expression, in which case we want to handle forms differently."
|
|||
;; Convert defcustom to less space-consuming data.
|
||||
((eq car 'defcustom)
|
||||
(let ((varname (car-safe (cdr-safe form)))
|
||||
(initializer (plist-get (nthcdr 4 form) :initialize))
|
||||
(init (car-safe (cdr-safe (cdr-safe form))))
|
||||
(doc (car-safe (cdr-safe (cdr-safe (cdr-safe form)))))
|
||||
;; (rest (cdr-safe (cdr-safe (cdr-safe (cdr-safe form)))))
|
||||
)
|
||||
`(progn
|
||||
(defvar ,varname ,init ,doc)
|
||||
,(if (null initializer)
|
||||
`(defvar ,varname ,init ,doc)
|
||||
`(progn (defvar ,varname nil ,doc)
|
||||
(let ((exp ',init))
|
||||
(put ',varname 'standard-value (list exp))
|
||||
(,(eval initializer t) ',varname exp))))
|
||||
(custom-autoload ',varname ,file
|
||||
,(condition-case nil
|
||||
(null (cadr (memq :set form)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue