[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master f4f4f93: emacs-lisp/package.el (describe-package-1)
From: |
Artur Malabarba |
Subject: |
[Emacs-diffs] master f4f4f93: emacs-lisp/package.el (describe-package-1): Describe incompatibility. |
Date: |
Sat, 14 Feb 2015 15:10:00 +0000 |
branch: master
commit f4f4f93e42a0ae572a62c9f64b90e4401232d9f4
Author: Artur Malabarba <address@hidden>
Commit: Artur Malabarba <address@hidden>
emacs-lisp/package.el (describe-package-1): Describe incompatibility.
---
lisp/ChangeLog | 1 +
lisp/emacs-lisp/package.el | 36 +++++++++++++++++++++++-------------
2 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 42b386f..3cc42a5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -5,6 +5,7 @@
(package-refresh-contents, package-initialize): Do build the
compatibility table.
(package--build-compatibility-table): New function.
+ (describe-package-1): Describe why a package is incompatible.
2015-02-14 Stefan Monnier <address@hidden>
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 64a646a..d8a4fc9 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1817,8 +1817,9 @@ the table."
(built-in (eq pkg-dir 'builtin))
(installable (and archive (not built-in)))
(status (if desc (package-desc-status desc) "orphan"))
+ (incompatible-reason (package--incompatible-p desc))
(signed (if desc (package-desc-signed desc))))
- (when (string= status "incompat")
+ (when incompatible-reason
(setq status "incompatible"))
(prin1 name)
(princ " is ")
@@ -1850,6 +1851,12 @@ the table."
(if signed
(insert ".")
(insert " (unsigned).")))
+ (incompatible-reason
+ (insert (propertize "Incompatible" 'face font-lock-warning-face)
+ " because it depends on ")
+ (if (stringp incompatible-reason)
+ (insert "Emacs " incompatible-reason ".")
+ (insert "uninstallable packages.")))
(installable
(insert (capitalize status))
(insert " from " (format "%s" archive))
@@ -1870,19 +1877,22 @@ the table."
(setq reqs (if desc (package-desc-reqs desc)))
(when reqs
(insert " " (propertize "Requires" 'font-lock-face 'bold) ": ")
- (let ((first t)
- name vers text)
+ (let ((first t))
(dolist (req reqs)
- (setq name (car req)
- vers (cadr req)
- text (format "%s-%s" (symbol-name name)
- (package-version-join vers)))
- (cond (first (setq first nil))
- ((>= (+ 2 (current-column) (length text))
- (window-width))
- (insert ",\n "))
- (t (insert ", ")))
- (help-insert-xref-button text 'help-package name))
+ (let* ((name (car req))
+ (vers (cadr req))
+ (text (format "%s-%s" (symbol-name name)
+ (package-version-join vers)))
+ (reason (if (and (listp incompatible-reason)
+ (assq name incompatible-reason))
+ " (not available)" "")))
+ (cond (first (setq first nil))
+ ((>= (+ 2 (current-column) (length text) (length reason))
+ (window-width))
+ (insert ",\n "))
+ (t (insert ", ")))
+ (help-insert-xref-button text 'help-package name)
+ (insert reason)))
(insert "\n")))
(insert " " (propertize "Summary" 'font-lock-face 'bold)
": " (if desc (package-desc-summary desc)) "\n")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master f4f4f93: emacs-lisp/package.el (describe-package-1): Describe incompatibility.,
Artur Malabarba <=