[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/package-faces f79c4ec: Add customizable faces to t
From: |
Artur Malabarba |
Subject: |
[Emacs-diffs] scratch/package-faces f79c4ec: Add customizable faces to the package menu |
Date: |
Thu, 06 Aug 2015 08:39:23 +0000 |
branch: scratch/package-faces
commit f79c4ec05e59bb3f56093394faa0bd74b3e32618
Author: Artur Malabarba <address@hidden>
Commit: Artur Malabarba <address@hidden>
Add customizable faces to the package menu
---
lisp/emacs-lisp/package.el | 77 +++++++++++++++++++++++++++++++++++++------
1 files changed, 66 insertions(+), 11 deletions(-)
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 60977a7..706f334 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2741,23 +2741,78 @@ Return (PKG-DESC [NAME VERSION STATUS DOC])."
(make-obsolete 'package-menu--print-info
'package-menu--print-info-simple "25.1")
+(defface package-built-in-face
+ '((t :inherit font-lock-builtin-face))
+ "Face used on the status of built-in packages."
+ :version "25.1")
+
+(defface package-external-face
+ '((t :inherit font-lock-builtin-face))
+ "Face used on the status of external packages."
+ :version "25.1")
+
+(defface package-available-face
+ '((t :inherit default))
+ "Face used on the status of available packages."
+ :version "25.1")
+
+(defface package-avail-obso-face
+ '((t :inherit font-lock-comment-face))
+ "Face used on the status of avail-obso packages."
+ :version "25.1")
+
+(defface package-new-face
+ '((t :inherit bold))
+ "Face used on the status of new packages."
+ :version "25.1")
+
+(defface package-held-face
+ '((t :inherit font-lock-constant-face))
+ "Face used on the status of held packages."
+ :version "25.1")
+
+(defface package-disabled-face
+ '((t :inherit font-lock-warning-face))
+ "Face used on the status of disabled packages."
+ :version "25.1")
+
+(defface package-installed-face
+ '((t :inherit font-lock-comment-face))
+ "Face used on the status of installed packages."
+ :version "25.1")
+
+(defface package-dependency-face
+ '((t :inherit font-lock-comment-face))
+ "Face used on the status of dependency packages."
+ :version "25.1")
+
+(defface package-unsigned-face
+ '((t :inherit font-lock-warning-face))
+ "Face used on the status of unsigned packages."
+ :version "25.1")
+
+(defface package-incompat-face
+ '((t :inherit font-lock-comment-face))
+ "Face used on the status of incompat packages."
+ :version "25.1")
+
(defun package-menu--print-info-simple (pkg)
"Return a package entry suitable for `tabulated-list-entries'.
PKG is a package-desc object.
Return (PKG-DESC [NAME VERSION STATUS DOC])."
(let* ((status (package-desc-status pkg))
(face (pcase status
- (`"built-in" 'font-lock-builtin-face)
- (`"external" 'font-lock-builtin-face)
- (`"available" 'default)
- (`"avail-obso" 'font-lock-comment-face)
- (`"new" 'bold)
- (`"held" 'font-lock-constant-face)
- (`"disabled" 'font-lock-warning-face)
- (`"installed" 'font-lock-comment-face)
- (`"dependency" 'font-lock-comment-face)
- (`"unsigned" 'font-lock-warning-face)
- (`"incompat" 'font-lock-comment-face)
+ (`"built-in" 'package-built-in-face)
+ (`"external" 'package-external-face)
+ (`"available" 'package-available-face)
+ (`"avail-obso" 'package-avail-obso-face)
+ (`"new" 'package-new-face)
+ (`"held" 'package-held-face)
+ (`"disabled" 'package-disabled-face)
+ (`"installed" 'package-installed-face)
+ (`"dependency" 'package-dependency-face)
+ (`"unsigned" 'package-unsigned-face)
+ (`"incompat" 'package-incompat-face)
(_ 'font-lock-warning-face)))) ; obsolete.
(list pkg
`[(,(symbol-name (package-desc-name pkg))