aboutsummaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2014-09-06 12:08:42 +0400
committerAlex Kost <alezost@gmail.com>2014-09-06 20:21:21 +0400
commit8ed08c76020b2c66169faf9a84a70cf4c121a6b8 (patch)
tree5bc4386c5db78cbc3aa72702e169eb9070c4d7b2 /emacs
parent8dd09fad528241caddc05d3b2544163235186cbf (diff)
downloadguix-8ed08c76020b2c66169faf9a84a70cf4c121a6b8.tar
guix-8ed08c76020b2c66169faf9a84a70cf4c121a6b8.tar.gz
emacs: Add a face for installed packages.
* emacs/guix-list.el (guix-package-list-installed): New face. (guix-package-list-get-name): Use it.
Diffstat (limited to 'emacs')
-rw-r--r--emacs/guix-list.el14
1 files changed, 11 insertions, 3 deletions
diff --git a/emacs/guix-list.el b/emacs/guix-list.el
index 0460d20f1b..08fb3cba5c 100644
--- a/emacs/guix-list.el
+++ b/emacs/guix-list.el
@@ -448,6 +448,11 @@ This macro defines the following functions:
(upgrade . ?U)
(delete . ?D)))
+(defface guix-package-list-installed
+ '((t :inherit guix-package-info-installed-outputs))
+ "Face used if there are installed outputs for the current package."
+ :group 'guix-package-list)
+
(defface guix-package-list-obsolete
'((t :inherit guix-package-info-obsolete))
"Face used if a package is obsolete."
@@ -478,10 +483,13 @@ likely)."
(defun guix-package-list-get-name (name entry)
"Return NAME of the package ENTRY.
-Colorize it with `guix-package-list-obsolete' if needed."
+Colorize it with `guix-package-list-installed' or
+`guix-package-list-obsolete' if needed."
(guix-get-string name
- (when (guix-get-key-val entry 'obsolete)
- 'guix-package-list-obsolete)))
+ (cond ((guix-get-key-val entry 'obsolete)
+ 'guix-package-list-obsolete)
+ ((guix-get-key-val entry 'installed)
+ 'guix-package-list-installed))))
(defun guix-package-list-get-installed-outputs (installed &optional _)
"Return string with outputs from INSTALLED entries."