version of seq-reverse that works on sequences in Emacs 24.
Bump seq.el version to 1.2.
+2015-02-11 Artur Malabarba <bruce.connor.am@gmail.com>
+
+ * emacs-lisp/package.el (package--incompatible-p): New function.
+ Return non-nil if PKG has no chance of being installable.
+ (package--emacs-version-list): New variable.
+ (describe-package-1, package-desc-status)
+ (package-menu--print-info, package-menu--status-predicate):
+ Account for the "incompat" status.
+
2015-02-11 Martin Rudalics <rudalics@gmx.at>
* frame.el (toggle-frame-maximized, toggle-frame-fullscreen):
(pkg-dir
(insert (propertize (if (member status '("unsigned" "dependency"))
"Installed"
- (capitalize status)) ;FIXME: Why comment-face?
+ (if (equal status "incompat")
+ "Incompatible"
+ (capitalize status))) ;FIXME: Why comment-face?
'font-lock-face 'font-lock-comment-face))
(insert " in `")
;; Todo: Add button for uninstalling.
(defvar package-list-unsigned nil
"If non-nil, mention in the list which packages were installed w/o signature.")
+(defvar package--emacs-version-list (version-to-list emacs-version)
+ "`emacs-version', as a list.")
+
+(defun package--incompatible-p (pkg)
+ "Return non-nil if PKG has no chance of being installable.
+PKG is a package-desc object.
+Return value is a string describing the reason why the package is
+incompatible.
+
+Currently, this only checks if PKG depends on a higher
+`emacs-version' than the one being used."
+ (let* ((reqs (package-desc-reqs pkg))
+ (version (cadr (assq 'emacs reqs))))
+ (if (and version (version-list-< package--emacs-version-list version))
+ (format "`%s' requires Emacs %s, but current version is %s"
+ (package-desc-full-name pkg)
+ (package-version-join version)
+ emacs-version))))
+
(defun package-desc-status (pkg-desc)
(let* ((name (package-desc-name pkg-desc))
(dir (package-desc-dir pkg-desc))
((version-list-< version hv) "obsolete")
(t "disabled"))))
((package-built-in-p name version) "obsolete")
+ ((package--incompatible-p pkg-desc) "incompat")
(dir ;One of the installed packages.
(cond
((not (file-exists-p (package-desc-dir pkg-desc))) "deleted")
(`"installed" 'font-lock-comment-face)
(`"dependency" 'font-lock-comment-face)
(`"unsigned" 'font-lock-warning-face)
+ (`"incompat" 'font-lock-comment-face)
(_ 'font-lock-warning-face)))) ; obsolete.
(list pkg-desc
`[,(list (symbol-name (package-desc-name pkg-desc))
((string= sB "built-in") nil)
((string= sA "obsolete") t)
((string= sB "obsolete") nil)
+ ((string= sA "incompat") t)
+ ((string= sB "incompat") nil)
(t (string< sA sB)))))
(defun package-menu--description-predicate (A B)