diff options
author | Glenn Morris <rgm@gnu.org> | 2012-05-08 20:06:08 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2012-05-08 20:06:08 -0700 |
commit | 666b903b912ca0aa2b1a034859b752b04f03141a (patch) | |
tree | add3234ca1ed7c2d5b18422b3f6982b34388d65b /lisp/emacs-lisp | |
parent | 8f6b6da8ecdcd37ecbb83778d35baa02d68621a3 (diff) | |
parent | 0a454caf059b4cc050984a41decc2344cd9a083f (diff) | |
download | emacs-666b903b912ca0aa2b1a034859b752b04f03141a.tar.gz emacs-666b903b912ca0aa2b1a034859b752b04f03141a.tar.bz2 emacs-666b903b912ca0aa2b1a034859b752b04f03141a.zip |
Merge from emacs-24; up to 2012-04-21T14:12:27Z!sdl.web@gmail.com
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/package.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 4b868f72899..66370c643bf 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -469,8 +469,11 @@ NAME and VERSION are both strings." Optional arg MIN-VERSION, if non-nil, should be a version list specifying the minimum acceptable version." (require 'finder-inf nil t) ; For `package--builtins'. - (let ((elt (assq package package--builtins))) - (and elt (version-list-<= min-version (package-desc-vers (cdr elt)))))) + (if (eq package 'emacs) + (version-list-<= min-version (version-to-list emacs-version)) + (let ((elt (assq package package--builtins))) + (and elt (version-list-<= min-version + (package-desc-vers (cdr elt))))))) ;; This function goes ahead and activates a newer version of a package ;; if an older one was already activated. This is not ideal; we'd at @@ -943,7 +946,7 @@ If the buffer does not contain a conforming package, signal an error. If there is a package, narrow the buffer to the file's boundaries." (goto-char (point-min)) - (unless (re-search-forward "^;;; \\([^ ]*\\)\\.el --- \\(.*\\)$" nil t) + (unless (re-search-forward "^;;; \\([^ ]*\\)\\.el ---[ \t]*\\(.*?\\)[ \t]*\\(-\\*-.*-\\*-[ \t]*\\)?$" nil t) (error "Packages lacks a file header")) (let ((file-name (match-string-no-properties 1)) (desc (match-string-no-properties 2)) |