diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-06-15 11:36:11 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-06-15 11:36:11 -0400 |
commit | 66bd25ab33bd0b8ddf6d2ced9c5910721f0b9cfb (patch) | |
tree | c38c696001eba80c383bf1c2e7526922a81af0b8 /lisp/startup.el | |
parent | d862673b610c728ce1b4402c0c88b73c2fbd2f42 (diff) | |
download | emacs-66bd25ab33bd0b8ddf6d2ced9c5910721f0b9cfb.tar.gz |
* lisp/emacs-lisp/package.el: Don't activate packages older than builtin.
(package-obsolete-list): Rename from package-obsolete-alist, and make
it into a simple list of package-desc.
(package-strip-version): Remove.
(package-built-in-p): Use package--builtin-versions.
(package-mark-obsolete): Simplify.
(package-process-define-package): Mark it obsolete if older than the
builtin version.
(package-handle-response): Use line-end-position.
(package-read-archive-contents, package--download-one-archive):
Simplify.
(package--add-to-archive-contents): Skip if older than the builtin or
installed version.
(package-menu-describe-package): Fix last change.
(package-list-unversioned): New var.
(package-menu--generate): Use it.
* lisp/Makefile.in (autoloads): Set autoload-builtin-package-versions.
* lisp/startup.el (package--builtin-versions): New var.
(package-subdirectory-regexp): Remove.
(package--description-file): Hard code its value instead.
* lisp/emacs-lisp/autoload.el: Manage package--builtin-versions.
(autoload--insert-text, autoload--insert-cookie-text): New functions.
(autoload-builtin-package-versions): New variable.
(autoload-generate-file-autoloads): Use them.
Remove the list of autoloaded functions/macros from the
(autoload...) comments.
Diffstat (limited to 'lisp/startup.el')
-rw-r--r-- | lisp/startup.el | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index bd1e0db03e6..52dd6b074ba 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -413,19 +413,18 @@ Warning Warning!!! Pure space overflow !!!Warning Warning :type 'directory :initialize 'custom-initialize-delay) -(defconst package-subdirectory-regexp - "\\([^.].*?\\)-\\([0-9]+\\(?:[.][0-9]+\\|\\(?:pre\\|beta\\|alpha\\)[0-9]+\\)*\\)" - "Regular expression matching the name of a package subdirectory. -The first subexpression is the package name. -The second subexpression is the version string. - -The regexp should not contain a starting \"\\`\" or a trailing - \"\\'\"; those are added automatically by callers.") +(defvar package--builtin-versions + ;; Mostly populated by loaddefs.el via autoload-builtin-package-versions. + (purecopy `((emacs . ,(version-to-list emacs-version)))) + "Alist giving the version of each versioned builtin package. +I.e. each element of the list is of the form (NAME . VERSION) where +NAME is the package name as a symbol, and VERSION is its version +as a list.") (defun package--description-file (dir) (concat (let ((subdir (file-name-nondirectory (directory-file-name dir)))) - (if (string-match package-subdirectory-regexp subdir) + (if (string-match "\\([^.].*?\\)-\\([0-9]+\\(?:[.][0-9]+\\|\\(?:pre\\|beta\\|alpha\\)[0-9]+\\)*\\)" subdir) (match-string 1 subdir) subdir)) "-pkg.el")) |