diff options
author | Alex Kost <alezost@gmail.com> | 2014-10-10 23:50:15 +0400 |
---|---|---|
committer | Alex Kost <alezost@gmail.com> | 2014-10-13 14:59:35 +0400 |
commit | c2379b3c1fe169b56d7d960fa31b1d191a779b1b (patch) | |
tree | ed20b1173aafbf971e062b550d30ea8a01932cde /emacs/guix-main.scm | |
parent | 0546393164d30c6722ddbf17fc05c424a57e71a4 (diff) | |
download | guix-c2379b3c1fe169b56d7d960fa31b1d191a779b1b.tar guix-c2379b3c1fe169b56d7d960fa31b1d191a779b1b.tar.gz |
emacs: Add 'current' generation parameter.
* emacs/guix-main.scm (generation-param-alist): Add 'current' parameter.
* emacs/guix-base.el (guix-param-titles): Add title for 'current' parameter.
* emacs/guix-info.el: Display 'current' parameter.
(guix-generation-info-current, guix-generation-info-not-current): New faces.
(guix-generation-info-insert-current): New procedure.
* emacs/guix-list.el: Display 'current' column.
(guix-generation-list-get-current): New procedure.
Diffstat (limited to 'emacs/guix-main.scm')
-rw-r--r-- | emacs/guix-main.scm | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm index fe599fbf11..7e26876dfa 100644 --- a/emacs/guix-main.scm +++ b/emacs/guix-main.scm @@ -638,13 +638,14 @@ See 'entry-sexps' for details." (define (generation-param-alist profile) "Return an alist of generation parameters and procedures for PROFILE." - (list - (cons 'id identity) - (cons 'number identity) - (cons 'prev-number (cut previous-generation-number profile <>)) - (cons 'path (cut generation-file-name profile <>)) - (cons 'time (lambda (gen) - (time-second (generation-time profile gen)))))) + (let ((current (generation-number profile))) + `((id . ,identity) + (number . ,identity) + (prev-number . ,(cut previous-generation-number profile <>)) + (current . ,(cut = current <>)) + (path . ,(cut generation-file-name profile <>)) + (time . ,(lambda (gen) + (time-second (generation-time profile gen))))))) (define (matching-generations profile predicate) "Return a list of PROFILE generations matching PREDICATE." |