diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-08-06 09:37:27 +0100 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-08-06 09:37:27 +0100 |
commit | f79c4ec05e59bb3f56093394faa0bd74b3e32618 (patch) | |
tree | 443ccbda5ec1f1d7f06cfb725ec6eca883587781 | |
parent | ec044fd2bfd6257742418d621685017325cb24cc (diff) | |
download | emacs-scratch/package-faces.tar.gz |
Add customizable faces to the package menuscratch/package-faces
-rw-r--r-- | 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 60977a7340c..706f33499a0 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)) |